<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.6036" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010>Hello,</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010>Configuration : OmniORB 4.1.4 C++ / Visual '98 6.0 SP6
/ Windows XP embedded SP3</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010>Host : Xeon
Pentium 4 - HT disabled (so one logical core)</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010>Our
application has >30 processes, each processs creates and activates from one
to several servants, using only the default root POA. OmniNames is used as the
naming service to interconnect.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010>Using MS
Sysinternals Process Explorer, we see that each process has ~70 context switches
/ second when the application is idle, with almost no CPU usage and no page
fault.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010>Debugging
the OmniORB core shows that an Omni thread is iterating quickly around a
select() with a short timeout:</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010>SocketCollection.cc(929):</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>CORBA::Boolean</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>SocketCollection::Select() {</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>...</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>if</FONT></FONT><FONT size=2> (rfds.fd_count)
{</FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2><FONT color=#008000 size=2><FONT color=#008000 size=2>// Windows select()
ignores its first argument.</FONT></FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2><FONT size=2>count = select(0, &rfds, 0, 0, </FONT><FONT
size=2><FONT size=2>&timeout</FONT></FONT><FONT
size=2>);</FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2><FONT size=2>}</DIV></FONT></FONT></SPAN></FONT>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010>We tried to
run the application after making the select() to block:</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>count = select(0, &rfds, 0, 0, NULL </FONT><FONT color=#008000
size=2><FONT color=#008000 size=2>/*&timeout*/</FONT></FONT><FONT
size=2>);</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>Application works well after that patch, and context switches go down to
1~2 per second for each process, due to other application threads that perform
some periodic work at a low rate.</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>We tried to understand why that select should not block in OmniORB
design, we start to think this is for the "poll" ORB feature (application uses
only blocking invocations), but we are not sure yet.</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>Any idea ?</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>Regards,</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>Marc-F. LUCCA-DANIAU</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=715511414-23112010><FONT
size=2>General Electric Healthcare Buc</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=715511414-23112010></SPAN></FONT> </DIV></BODY></HTML>