Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multithread socketWrite0 performance

807580Sep 16 2009 — edited Sep 16 2009
Hi,

Is there a known issue related to the scaling of socketWrite in a multi-socket multi-thread environment?

We are having an application which makes n separate connections to a database server and use them to insert huge amount of data using the jdbc interface.

We are analyzing the performance of the operation if more threads are introduced and data divided among these operations. We are on an 8 core box. Though we have enough resources, the scaling is not seen as we introduce more threads beyond a point.

Profiling shows the bottleneck around socketWrite0(FileDescriptor fd, byte[] b, int off, int len) operation on SocketOutputStream. This particular function is not scaling with more number of threads and less data per thread.
In fact we are seeing some negative scaling too.

I am guessing something in the native implementation of the function is playing a role in this when more sockets co-exist and lot of writing is done on these sockets. Any suggestions on an alternate approach or any tuning which can be done at the socket level to improve the performance?

Thanks,
Kiran
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2009
Added on Sep 16 2009
12 comments
290 views