[zeromq-dev] Trouble with Python bindings

Josip Lisec josiplisec at gmail.com
Tue Jul 21 12:27:42 CEST 2009


> Hello Josip,
>
>> When calling .receive method with block argument set to False
>> application takes up to 80% of processor time! Calling the method  
>> with
>
> Calling nonblocking receive in infinite loop?

Yes (inside an thread created with Twisted)

>> block=True (default) application runs, in terms of processor time and
>> memory normally, but sent messages are never received, which,
>> unfortunately, makes 0MQ quite unusable.
>
> I gave a quick try to zmq-1.0.0 on Mac OS X 10.5, Python 2.5.1 with  
> Darwin 9.0.0 i386 kernel and looks ok.
>

Application works now, I actually had a version downloaded from SVN  
few hours after 1.0.0 was announced -- that seems to be the problem as  
I later tested the code with 1.0.0 and SVN revision 1599 -- it worked  
ok with both versions.

> Can you please repeat following tests? (keep the order of starting  
> test programs)
>
> -------- Latency test
> zmq_server
> python perf/tests/zmq/py_remote_lat.py localhost lo0 lo0 1 10000
> python perf/tests/zmq/py_local_lat.py localhost 1 10000
>
> local_lat side should print
>
> message size: 1 [B]
> roundtrip count: 10000
> Your average latency is 151  [us]
>
> ---------- Throughput test
> zmq_server
> python perf/tests/zmq/py_local_thr.py localhost lo0 1 1000000
> python perf/tests/zmq/py_remote_thr.py localhost 1 1000000
>
> local_thr side should print
>
> message size: 1 [B]
> message count: 1000000
> Your average throughput is 633732 [msg/s]
> Your average throughput is 5.07 [Mb/s]
>
> malo

Here are the results produced by 1.0.0:

Latency test:
message size: 1 [B]
roundtrip count: 10000
Your average latency is 229  [us]

Throughput test:
message size: 1 [B]
message count: 1000000
Your average throughput is 284801 [msg/s]
Your average throughput is 2.28 [Mb/s]

(I guess it's a lot slower than yours as I'm actually on a Hackintosh  
with Intel Celeron M and 1GB of RAM)

Cheers,
Josip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090721/a63261e6/attachment.htm>


More information about the zeromq-dev mailing list