[zeromq-dev] WSAWaitForMultipleEvents versus WSAPoll

Steven McCoy steven.mccoy at miru.hk
Sat Oct 30 06:14:00 CEST 2010


ØMQ is using a select() event loop on Windows and I slapped in
WSAWaitForMultipleEvents() for Windows in a PGM test utility pgmping.  The
question is whether there is a performance difference?  Poor Google Fu
brings up an old article suggesting select() is better on Windows XP, but
not so for Vista,

http://www.unwesen.de/articles/waitformultipleobjects_considered_expensive

However I am running on 2008 R2 and testing with WSAPoll() instead of
select(), test results are shown for simultaneously sending 10,000
packets-per-second (pps) and receiving 10,000pps.

*Before with WSAWaitForMultipleEvents() yields the following,*

2010-10-30 11:53:24 : s=10004.2 avg=2301.5 min=179.0 max=15400.0 stddev=2186.3
us o=84.84 i=84.84 mbit
2010-10-30 11:53:26 : s=9990.2 avg=2515.1 min=180.0 max=13427.0
stddev=2226.5 us o=84.72 i=84.72 mbit
2010-10-30 11:53:28 : s=9999.0 avg=2329.8 min=182.0 max=14915.0
stddev=2370.0 us o=84.79 i=84.79 mbit
2010-10-30 11:53:30 : s=10008.8 avg=2388.5 min=181.0 max=15363.0
stddev=2515.2 us o=84.88 i=84.87 mbit
2010-10-30 11:53:32 : s=10001.8 avg=2443.8 min=182.0 max=9554.0
stddev=2017.9 us o=84.82 i=84.82 mbit
2010-10-30 11:53:34 : s=9960.4 avg=2381.0 min=182.0 max=13911.0
stddev=2296.8 us o=84.46 i=84.46 mbit
2010-10-30 11:53:36 : s=10029.6 avg=2571.1 min=182.0 max=11843.0
stddev=2252.1 us o=85.05 i=85.05 mbit
2010-10-30 11:53:38 : s=10002.8 avg=2673.5 min=182.0 max=13428.0
stddev=2352.8 us o=84.84 i=84.82 mbit
2010-10-30 11:53:40 : s=9991.1 avg=2403.3 min=176.0 max=12577.0
stddev=2318.6 us o=84.74 i=84.72 mbit
c2010-10-30 11:53:42 : s=9952.9 avg=2808.6 min=179.0 max=17350.0
stddev=2826.7 us o=84.40 i=84.40 mbit
2010-10-30 11:53:44 : s=5625.7 avg=2892.9 min=181.0 max=12288.0
stddev=2548.1 us o=85.03 i=47.71 mbit


*After with WSAPoll() yields these results,*

2010-10-30 11:51:01 : s=10045.6 avg=4720.5 min=183.0 max=20277.0 stddev=3859.8
us o=85.20 i=85.19 mbit
2010-10-30 11:51:03 : s=9997.6 avg=4352.9 min=182.0 max=15150.0
stddev=3189.8 us o=84.78 i=84.78 mbit
2010-10-30 11:51:05 : s=10030.7 avg=4222.4 min=178.0 max=16485.0
stddev=3331.1 us o=85.06 i=85.06 mbit
2010-10-30 11:51:07 : s=10026.9 avg=3161.6 min=178.0 max=13648.0
stddev=2801.2 us o=85.03 i=85.03 mbit
2010-10-30 11:51:09 : s=9926.9 avg=4568.8 min=178.0 max=16016.0
stddev=3108.5 us o=84.18 i=84.18 mbit
2010-10-30 11:51:11 : s=10037.2 avg=4627.8 min=186.0 max=18744.0
stddev=3405.0 us o=85.12 i=85.12 mbit
2010-10-30 11:51:13 : s=9957.0 avg=11790.4 min=180.0 max=42707.0
stddev=9622.7 us o=84.44 i=84.44 mbit
2010-10-30 11:51:15 : s=9985.7 avg=7290.3 min=183.0 max=22407.0
stddev=4977.6 us o=84.69 i=84.68 mbit
2010-10-30 11:51:17 : s=10023.0 avg=5165.2 min=185.0 max=22363.0
stddev=3918.1 us o=85.01 i=84.99 mbit
2010-10-30 11:51:19 : s=10033.4 avg=4446.6 min=182.0 max=21381.0
stddev=3632.9 us o=85.10 i=85.08 mbit
2010-10-30 11:51:21 : s=9988.9 avg=2430.0 min=181.0 max=12344.0
stddev=2104.8 us o=84.72 i=84.71 mbit
2010-10-30 11:51:23 : s=9960.4 avg=4805.9 min=187.0 max=21428.0
stddev=3744.7 us o=84.47 i=84.46 mbit
2010-10-30 11:51:25 : s=10033.4 avg=5808.9 min=179.0 max=20414.0
stddev=4316.2 us o=85.09 i=85.08 mbit
2010-10-30 11:51:27 : s=9895.6 avg=7602.8 min=181.0 max=34578.0
stddev=6773.5 us o=83.91 i=83.91 mbit
2010-10-30 11:51:29 : s=10063.9 avg=6295.6 min=178.0 max=32367.0
stddev=6068.1 us o=85.35 i=85.34 mbit
2010-10-30 11:51:31 : s=10061.2 avg=5387.2 min=179.0 max=20160.0
stddev=4298.6 us o=85.33 i=85.32 mbit

Which shows that the average, maximum, and standard deviation of latency is
worse with WSAPoll().

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101030/43883112/attachment.htm>


More information about the zeromq-dev mailing list