Re: [zeromq-dev] Newbie questions re HWM and Async/Sync io
On 21 March 2016 at 08:15, Aaron Koolen-Bourke wrote: > Hi all. > Thing is, from what I can tell I then need to move to polling and not > blocking receives, which not only keeps the thread busy looping, but seems > to be quite expensive (There seems to be a sleep timer in there or some > such). This just kills performance. Is there any support for a completely > event driven system in ZMQ/CZMQ? Hi Aaron, CZMQ uses libzmq's poll APIs, which depending on your system will pick out the best option to poll on file descriptors. On Linux for example it will use epoll, on Windows it will use select and so on. So there's no busy looping, so don't worry about performances. Sorry but I'm not sure about the HWM issue, hopefully someone else can give their 2c on that. Kind regards, Luca Boccassi ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Newbie questions re HWM and Async/Sync io
Hi all. Slowly getting my ZMQ evaluation application together but I've discovered a couple of things I'm hoping have some as-yet undiscovered (to me) answers. I was noticing that my message feeder was blocking at the HWM and latency was taking a hit so I've been experimenting with different HWM values along the pipeline. 2000, (workers*1000) and various things like that. However I have noticed that sometimes I'll use a value at one point in the chain and the whole program hangs. Everyone is blocked on waiting for messages. This doesn't make obvious sense to me. NOTE: I'm waiting for a start signal before any messages are sent so I'm not setting the HWM "mid action". Is there any info on why it might hang and how to avoid it? I'm worried that it's not deterministic with value and could just happen in a real application. Secondly I've noticed that when I try and write something like a worker in the "recommended way" by using ZMQ messages for all communication - messages, start, stop etc. I get to the point where I need to both receive some data on a socket, and get a command that signals I should cleanup and exit my thread (I'm using CZMQ actors). Thing is, from what I can tell I then need to move to polling and not blocking receives, which not only keeps the thread busy looping, but seems to be quite expensive (There seems to be a sleep timer in there or some such). This just kills performance. Is there any support for a completely event driven system in ZMQ/CZMQ? Many thanks Aaron CZMQ, ZMQ 4.1.4, Windows ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev