[Vm-dev] Slow Unix socket write()s?

Andreas Raab andreas.raab at gmx.de
Wed Feb 18 02:38:16 UTC 2009


Folks -

I've been doing a bit of load-testing on our servers and thing that 
surprised me was that even in moderate load tests the VM appears to be 
spending some 20-30% of its total execution time in 
Socket>>primSocket:sendData:startIndex:count:. This is roughly at a 
throughput of 10Mbit so nothing spectacular and a long ways before we 
hit our bandwidth limits.

Given that the primitive in the Unix VM appears to be a vanilla call to 
write() I cannot possibly imagine what could cause this to take that 
much time. Also, all of these sends are guarded so socketSendDone: 
returned true prior to calling the send function (socketSendDone: takes 
about 2% total time in the profiles).

Has anyone seen similar behavior or has an idea on how to find out what 
is going on? If this is known write() behavior I would definitely 
consider putting this into a pthread for our servers. It is currently by 
far the biggest bottleneck that I can see.

Any ideas?

Cheers,
   - Andreas


More information about the Vm-dev mailing list