[openamq-dev] timing

Martin Lucina mato at imatix.com
Fri Aug 24 12:58:40 CEST 2007


Nick,

ndl at ravenbrook.com said:
> On the machine whose stats I posted yesterday
> http://lists.openamq.org/pipermail/openamq-dev/2007-August/000215.hmtl
> this loop takes about ten seconds to run. (I cranked the loop size
> down just to check that setup and teardown times aren't dominating the
> runtime.)

This is not normal.  If I take your code and test it here
(additionally writing a PAL script to declare the exchange and the
shared queue), I get the following times:

MT, debug build:

[dezo:tmp ibase-mtd mt,debug]$ time ./publish

real	0m0.934s
user	0m0.441s
sys	0m0.399s
[dezo:tmp ibase-mtd mt,debug]$ time ./publish

real	0m1.200s
user	0m0.484s
sys	0m0.386s
[dezo:tmp ibase-mtd mt,debug]$ time ./publish

real	0m0.846s
user	0m0.422s
sys	0m0.300s

Which gives an average of about 10286 messages per second.

MT, release build:

[dezo:tmp ibase-mtr mt,release]$ time ./publish

real	0m0.887s
user	0m0.360s
sys	0m0.360s
[dezo:tmp ibase-mtr mt,release]$ time ./publish

real	0m0.627s
user	0m0.302s
sys	0m0.292s
[dezo:tmp ibase-mtr mt,release]$ time ./publish

real	0m0.729s
user	0m0.332s
sys	0m0.370s

Which gives an average of about 13646 messages per second.

Granted, this is on hardware that is different from yours, but in a
similar class (Intel Pentium D 2.8Ghz dual core, 4 GB RAM, x86_64).

> By the way, the time taken to retrieve these 10k messages is about 0.1
> seconds, which is more what I would have expected (100k messages
> retrieved per second).

I'm not sure what you mean by "time taken to retrieve these messages"?
Do you mean that you publish the 10k messages to a shared queue and then
run a (separate) receiver to consume those messages off that queue?

-mato


More information about the openamq-dev mailing list