[omniORB] Many context switches in idle application

Lucca-Daniau, Marc-Francois (GE Healthcare) Marc-Francois.Lucca-Daniau at med.ge.com
Tue Nov 23 15:54:24 GMT 2010


Hello,
 
Configuration : OmniORB 4.1.4 C++ / Visual '98 6.0 SP6 / Windows XP
embedded SP3
Host : Xeon Pentium 4 - HT disabled (so one logical core)
 
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.
 
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.
 
Debugging the OmniORB core shows that an Omni thread is iterating
quickly around a select() with a short timeout:
 
SocketCollection.cc(929):
 
CORBA::Boolean
SocketCollection::Select() {
...
if (rfds.fd_count) {
// Windows select() ignores its first argument.
count = select(0, &rfds, 0, 0, &timeout);
}
 
We tried to run the application after making the select() to block:
 
count = select(0, &rfds, 0, 0, NULL /*&timeout*/);
 
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.
 
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.
 
Any idea ?
 
Regards,
 
Marc-F. LUCCA-DANIAU
General Electric Healthcare Buc
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20101123/db1908c3/attachment.htm


More information about the omniORB-list mailing list