Optimizing MPIs for multi-cores : Thoughts by Eran

Nice blogs by Eran, Optimizing MPIs for multi-cores : Thoughts, and also this presentation Functions + Messages + Concurrency = Erlang by Joe Armstrong is pretty good if you need to understand some dynamics of multi-cores and concurrency. In my opinion, Some of his points are open to argument, yet he present a different perspective, obviously helped by his experience with Erlang.

Advertisements

Overhead of Servers on VM’s

I was doing a performance tests, and initially trying to run them on virtualized hardware. We ran them first on EC2, then on a Xen based virtualized layer, and finally on real hardware. We observed that the virtualized version is much slower (15 TPS on virtualized vs. 290 TPS on real hardware, almost as 20 times slower!!). Still not sure wheather this applies to servers in general or is this a special case. However, if this is a general result, for servers (which usually has high IO/ CPU overhead) virtualization is really looking bad.

Role of Trust: about "Sri Lanka cricket: an example of what we can do together"

I saw this post by Dr. Sanjiva, function g_f_changeUrlForLog(oLink, query, siteid, itemid, userid, valuea) { //var url = ‘/track?a=’ + valuea + ‘&q=’ + encodeURIComponent(query) + ‘&site=’ + siteid + ‘&item=’ + itemid + ‘&user=’ + userid + ‘&u=’ + encodeURIComponent(‘http://www.ask.com/web?q=’ + encodeURIComponent(query)) + ‘&l=dir&o=100106&gc=1’; var url = ‘/track?a=’ + valuea + ‘&q=’ + encodeURIComponent(query) + ‘&site=’ + siteid + ‘&item=’ + itemid + ‘&user=’ + userid + ‘&u=’ + (‘http://www.ask.com/web?q=’ + encodeURIComponent(query)) + ‘&l=dir&o=100106&gc=1’; oLink.href = url; }Sri Lanka cricket: an example of what we can do together, and I can not agree more. To add my two cents, in my opinion, a part of the problem is that we—Sri Lankans—have lost faith on each other. This faith, the belief that others would not exploit although one has lower his own guard is a great thing, and it always yields a team, which is greater than a sum of it’s parts.
One of the example of this trust the history can offer is Phalanx formation practised by Greeks (and later by Swiss) to great effect. One of the key features of the formation is that each man is protected not by his own shield, but by the one hold by the guys in the right, which gave each guy maximum freedom on the battlefield. Then, each man has literally placed his life in the hand of the guy to his right, and trust him to carry out the job. Result was a formidable formation—for instance, Aleksandr the Great used this to its full effect—which was legendry until after decades later Roman’s out maneuver them in Battle of Magnesia through the flank (topic of interest, but not relevant to our discussion).
However, it is so easy to preach, and very hard to carry it out, because the trust is mutual. In game theory, Prisoner’s dilemma shows how hard (probabilistically) for two untrusting guys to trust each other. For example, with the traffic in the Kandy road, it takes close to 2 hours to drive from Flower road to Gampaha—28km—which says we drive about 14km/hour. I am sure if we all can drive with order, we can get to the destination much faster—I mean how can you drive slower than 15km/h? However, none of us (including me who soon learnt the hard way that no quarter is given there) trust others to not to exploit it if we drive nicely.
So my concluding remark is that trust is such a great thing. Each of us by ourselves can only do so much, and it takes teams to make difference. The trust—or should I say faith, which assures each guy to play his own role, is the key in a great team. But, trust is mutual where it is so hard to keep and easy to break. Every time someone exploit someone else, he contributes to this inertia of untrust by making victim’s heart bit more untrustful, and the society (or the team) as a whole takes a step back. You do it over a long time, we get where we are.

Drools and CEP

Drools 5.0 now supports CEP and workflows. I did not get to checkout the workflow support yet, but CEP using rules is a topic I have been involved while at the extreme Lab @ IU. Although it is not apparent, CEP network (different compositions of event streams) and the Rete algorithm, which is the underline algorithm for Drools, both share much in the sense that both construct a tree to represent queries and match events by propagating them through the tree. We worked on creating a layer on top of Drools to handle CEP, but by supporting events from Drools deep down, Drools have enabled concurrent processing, whereas the layer we build on top of Drools have to be synchronized because Drools is not thread safe. It is going to be a versatile tool to build new applications/ usecases.