<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">No, the kernel poll is not supported on AIX.<div><br></div><div>AIX has pollset interface like epoll but seems can not be used by erts. Is this the reason of thread_waitlock? </div><div><br></div><div>Our test scenario is quite simple. Create 1000 erlang processes or more to execute our main function repeatedly. This function do nothing special but call a linkded-in driver with port_control/3 and do some template rendering then return. The whole function does not have any IO operations.</div><div><br></div><div>During the test on a 2 cores AIX, we found no thread_waitlock() call in the strace log, which was full of poll() call.</div><div><br></div><div>With same test scenario on a 4 cores Centos with kernel-poll off, there is no sys call in the strace log(even without poll() call). Cpu will be consumed perfectly and we can gain quite high system throughput.</div><div><br></div><div>But when migrating to 4cores or 8cores AIX, thread_watilock() appears and there is lots of context switches according to vmstat. As a result, the throughput drop dramatically compared with Centos.</div><div><br></div><div>So, what is role of poll() in the scenario, or in the erlang processes scheduling?</div><div><br></div><div>BR</div><div><br></div><div><br></div><div><div><div>ÔÚ 2011-9-2£¬ÉÏÎç12:51£¬ Jon Watte дµÀ£º</div><br class="Apple-interchange-newline"><blockquote type="cite">Did you enable kernel_poll? And does AIX actually support a suitable kernel polling mechanism (like epoll, etc)?<div><br></div><div>Sincerely,</div><div><br></div><div>jw</div><div><br clear="all"><br>--<br>Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. <br>
<br>
<br><br><div class="gmail_quote">On Thu, Sep 1, 2011 at 3:01 AM, caox <span dir="ltr"><<a href="mailto:caox@lightpole.net">caox@lightpole.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><span style="font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"><div><span style="font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-size:14px;border-collapse:collapse;line-height:18px">hi</span></div>
<div><span style="font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"><br></span></div><span style="white-space:pre-wrap"> </span>we have a application used to run on centos but now we want to migrate it to AIX. During the test on Aix, we found the cpu scaling of the system is quite disappointing. With 8 cores and erlang smp auto, there were very high system cpu consumption and lots of thread_wait_lock call in the truss(strace) log, which would not appear on centos under the same test scenario. And the sys call will disappear if we turn smp off.</span><div>
<span style="font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"><span style="white-space:pre-wrap"> </span> So we guess there is something wrong with smp on Aix, perhaps caused by the schedulers switching. But we don't know where the thread_wait_call is from and what it is for. </span></div>
<div><span style="font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"><span style="white-space:pre-wrap"> </span>By the way, it is quite strange that the smp description of erl shell would be smp32:8 with smp auto on the 8 cores aix.</span></div>
<div><span style="font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"><span style="white-space:pre-wrap"> </span>Is there any hint to fix the problem? Appreciate your help.</span></div>
</div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></body></html>