Speed tests =========== Recently, I received a mail asking if I compared the speed of qpopper with pop3lite. I did not (yet), but I felt I should compare it. Unfortunately, I don't have qpopper at hand now, so I tested cucipop (which I used until I replaced it with pop3lite) instead. All of this was tested on an AMD-K6 300 box with 64Mb of memory (from which 22Mb was available when I ran the tests). Speed Test #1 ------------- o prepare a pretty big mail (dd if=/dev/zero of=huge count=8192) o send as attachment (resulting mail size: 5671229 bytes) o configure fetchmail. my .fetchmailrc contains: poll "localhost" protocol pop3 user algernon pass secret mda "/usr/lib/sendmail %s" o (my sendmail is postfix) o launch cucipop 1.31-14 (apop+pam) o launch /usr/bin/time -o cucipop.log -a -v fetchmail -va o cucipop.log contains: Command being timed: "fetchmail -va" User time (seconds): 1.91 System time (seconds): 14.25 Percent of CPU this job got: 51% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:31.68 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 1251 Minor (reclaiming a frame) page faults: 192 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 o launch pop3lite 0.1.1 (monolithic) (see end of this file for compile time options) o launch /usr/bin/time -o pop3lite.log -a -v fetchmail -va o pop3lite.log contains: Command being timed: "fetchmail -va" User time (seconds): 1.71 System time (seconds): 5.84 Percent of CPU this job got: 33% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:22.30 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 1251 Minor (reclaiming a frame) page faults: 192 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 Well... That's something I find surprising. I thought cucipop will be much faster. o launch pop3lite 0.1.1 (modular) (see end of this file for compile time options) o launch /usr/bin/time -o pop3lite-modular.log -a -v fetchmail -va o pop3lite-modular.log contains: Command being timed: "fetchmail -va" User time (seconds): 1.97 System time (seconds): 13.61 Percent of CPU this job got: 71% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.74 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 1251 Minor (reclaiming a frame) page faults: 192 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 Although this one got 71% of CPU while cucipop only 51%, it is still faster, even if I add some penalty (let's say 9 seconds). Speed test #2 ------------- o prepare a mailbox with lots and lots of small messages (1000 messages, each 539 bytes long) o launch cucipop o launch /usr/bin/time -o cucipop-small -a -v fetchmail -va o cucipop-small contains: Command being timed: "fetchmail -va" User time (seconds): 41.29 System time (seconds): 84.14 Percent of CPU this job got: 71% Elapsed (wall clock) time (h:mm:ss or m:ss): 2:55.22 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 677574 Minor (reclaiming a frame) page faults: 113077 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 o launch pop3lite 0.1.1 (monolithic) o launch /usr/bin/time -o pop3lite-small -a -v fetchmail -va o pop3lite-small contains: Command being timed: "fetchmail -va" User time (seconds): 39.04 System time (seconds): 69.58 Percent of CPU this job got: 65% Elapsed (wall clock) time (h:mm:ss or m:ss): 2:45.02 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 677574 Minor (reclaiming a frame) page faults: 113077 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 Well, well, well. It seems that pop3lite is faster in this case too! o launch pop3lite 0.1.1 (modular) o launch /usr/bin/time -o pop3lite-modular-small -a -v fetchmail -va o pop3lite-modular-small contains: Command being timed: "fetchmail -va" User time (seconds): 41.15 System time (seconds): 92.09 Percent of CPU this job got: 71% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:06.67 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 677574 Minor (reclaiming a frame) page faults: 113077 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 At last! A result I expected! However, the difference should not be this much. POP3Lite compile-time options ----------------------------- (monolithic) CFLAGS="-O3 -mcpu=i586 -march=i586" ../configure \ --disable-static --enable-compile-warnings --disable-debugging \ --with-builtin-modules=mailbox,connectlog,pam,apop,expire,sabotage \ --without-module-support --enable-standalone (modular) CFLAGS="-O3 -mcpu=i586 -march=i586" ../configure \ --disable-static --enable-compile-warnings --disable-debugging \ --with-modules=mailbox,connectlog,pam,apop,expire,sabotage \ --with-module-support --enable-standalone TODO ---- o Measure the daemons with time (when they run from inetd) o Measure them with time when they receive many connections, either in parallel, or one after another. Both when they are run from inetd, and in standalone mode. Gergely Nagy \ mhp/|8] 8@free.bsd.hu