Wow.<div><br></div><div>This is absolutely incredible. We were hoping it would be better, but this is even better than I had imagined (partially because the Twisted performance is even worse than I thought). In particular the stability of all the zmq based queues is really impressive. In my mind, this means that to first order, we really are hitting the latency/throughput of the loopback interface and that this limitation is stable under load. This is really significant, because it means the performance in a real cluster could be improved by using a fast interconnect. Also, this brings our task granularity down to ~ 1 ms, which is a big deal. This *really* sets us apart from the traditional load balancing that a batch system does. Can you rerun this test keeping the CPU effort at 0, but sending a large buffer with each task. Then vary the size of that buffer (512, 1024, ...). I want to see how zmq scales in the throughput sense. Twisted is especially horrible in this respect.</div>
<div><br></div><div>I am also quite impressed at how little we loose in moving to Python for the actual scheduling. That is still very good performance, especially taking into account the dependency handling that is going on. I have some ideas about performance testing that that will make a very good story for a paper.</div>
<div><br></div><div>This is really great and we definitely need to start reviewing this soon.</div><div><br></div><div>Cheers,</div><div><br></div><div>Brian</div><div><br><div class="gmail_quote">On Thu, Oct 21, 2010 at 11:53 PM, MinRK <span dir="ltr"><<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>I have my first performance numbers for throughput with the new parallel code riding on ZeroMQ, and results are fairly promising. Roundtrip time for ~512 tiny tasks submitted as fast as they can is ~100x faster than with Twisted.</div>
<div><br></div><div>As a throughput test, I submitted a flood of many very small tasks that should take ~no time:</div><div><div>new-style:</div><div>def wait(t=0):</div>
<div> import time</div><div> time.sleep(t)</div></div><div>submit:</div><div>client.apply(wait, args=(t,))</div><div><br></div><div>Twisted:</div><div>
task = StringTask("import time; time.sleep(%f)"%t)</div><div>submit:</div><div>client.run(task)</div><div><br></div><div>Flooding the queue with these tasks with t=0, and then waiting for the results, I tracked two times:</div>
<div>Sent: the time from the first submit until the last submit returns</div><div>Roundtrip: the time from the first submit to getting the last result</div><div><br></div><div>Plotting these times vs number of messages, we see some decent numbers:</div>
<div>* The pure ZMQ scheduler is fastest, 10-100 times faster than Twisted roundtrip</div><div>* The Python scheduler is ~3x slower roundtrip than pure ZMQ, but no penalty to the submission rate</div><div>* Twisted performance falls off very quickly as the number of tasks grows</div>
<div>* ZMQ performance is quite flat</div><div><br></div><div>Legend:</div><div>zmq: the pure ZMQ Device is used for routing tasks</div><div>lru/weighted: the simplest/most complicated routing schemes respectively in the Python ZMQ Scheduler (which supports dependencies)</div>
<div>twisted: the old IPython.kernel</div><div><br></div><div><img src="cid:ii_12bd2af6afc0eab2" alt="roundtrip.png" title="roundtrip.png"></div><div><img src="cid:ii_12bd2af38d3422df" alt="sent.png" title="sent.png"><br>
</div><div>Test system:</div><div>Core-i7 930, 4x2 cores (ht), 4-engine cluster all over tcp/loopback, Ubuntu 10.04, Python 2.6.5</div><div><br></div><font color="#888888"><div>-MinRK</div><div><a href="http://github.com/minrk" target="_blank">http://github.com/minrk</a></div>
</font></blockquote></div><br><br clear="all"><br>-- <br>Brian E. Granger, Ph.D.<br>Assistant Professor of Physics<br>Cal Poly State University, San Luis Obispo<br><a href="mailto:bgranger@calpoly.edu">bgranger@calpoly.edu</a><br>
<a href="mailto:ellisonbg@gmail.com">ellisonbg@gmail.com</a><br>
</div>