[Dovecot] imaptest updates
I spent the last 5 hours or so updating my imaptest tool. It's beginning to become almost like a real IMAP client. http://dovecot.org/tools/imaptest10.c contains a version that compiles against Dovecot v1.0 (instead of against CVS HEAD).
imaptest is this tool that I've been using for a few years to do stress testing. It can create a lot of dummy IMAP client connections which execute some commands. Today I added some new features to it:
- Support for pipelining commands (where allowed by IMAP spec). Looks like it about doubles the throughput. "no_pipelining" option disables this.
- Support for MULTIAPPEND extension. When multiple mails are APPENDed one after another this extension is used to save them all in one transaction.
- Previous versions gave an error when trying to append large mails. Now large mails work too.
- By default the commands are executed in one specific order. Using "random" option randomizes the order.
- You can separately specifify probabilities of how often to execute each command. 0 means never, 100 means always, 10 means 10% of the time and so on. 100,30 means that it's always executed, and then it's executed again and again with 30% probability.
The basic way to run it is:
./imaptest user=test pass=password host=imap.domain.org mbox=/home/user/mail/dovecot clients=1
Or if you want to run multiple users, you can use user=test%d which will use users test1..test100 (the size is hardcoded in USER_RAND define).
If you want to do benchmarking, you can set it to run for specified amount of time, and you should also give random number generator the same seed every time:
./imaptest seed=123 secs=300
If you want to test/benchmark only the login+logout speed, use:
./imaptest - select=0
To create a lot of long-running clients doing STATUS and NOOPs:
./imaptest clients=100 - logout=0 status=50 noop=50 delay=100
To test copying messages:
./imaptest copybox=Trash
By default LOGIN command is used. If you want to try AUTHENTICATE:
./imaptest auth=100
Hmm. I guess that's about it. The list of commands that you can use starts from line 134. You can use either the long names or the short names.
Timo Sirainen wrote:
I spent the last 5 hours or so updating my imaptest tool. It's beginning to become almost like a real IMAP client. http://dovecot.org/tools/imaptest10.c contains a version that compiles against Dovecot v1.0 (instead of against CVS HEAD).
Hmm, I didn't get it to compile:
imaptest10.c: In function client_new': imaptest10.c:1203: warning: dereferencing
void *' pointer
imaptest10.c:1203: error: void value not ignored as it ought to be
(Solaris Sparc 32-bit, gcc 3.3.2, using pre-rc27=dovecot-latest.tar.gz)
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
Chris Wakelin wrote:
Timo Sirainen wrote:
I spent the last 5 hours or so updating my imaptest tool. It's beginning to become almost like a real IMAP client. http://dovecot.org/tools/imaptest10.c contains a version that compiles against Dovecot v1.0 (instead of against CVS HEAD).
Hmm, I didn't get it to compile:
imaptest10.c: In function
client_new': imaptest10.c:1203: warning: dereferencing
void *' pointer imaptest10.c:1203: error: void value not ignored as it ought to be(Solaris Sparc 32-bit, gcc 3.3.2, using pre-rc27=dovecot-latest.tar.gz)
Best Wishes, Chris
I commented out the assert in line 1203 and now I get
Undefined first referenced symbol in file inet_addr src/lib/liblib.a(compat.o) getsockopt src/lib/liblib.a(network.o) inet_pton src/lib/liblib.a(network.o)
...
so I'm guessing it's missing a #include. I'm not a great expert at this so I don't know what's missing (seems to me that arpa/inet.h gets included by network.h and should satisfy these ...)
Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
On Sun 11 Mar 2007 at 04:32PM, Timo Sirainen wrote:
On Sun, 2007-03-11 at 13:10 +0000, Chris Wakelin wrote:
Undefined first referenced symbol in file inet_addr src/lib/liblib.a(compat.o) getsockopt src/lib/liblib.a(network.o) inet_pton src/lib/liblib.a(network.o)
Add -lnsl (and maybe -lsocket?)
Yes, you need both.
-dp
-- Daniel Price - Solaris Kernel Engineering - dp@eng.sun.com - blogs.sun.com/dp
participants (3)
-
Chris Wakelin
-
Dan Price
-
Timo Sirainen