java - Socket performance on linux -


From my last query, the following:

I see linux Socket display with the above example I get round travel time of ~ 65μsec. If I do two fees on file system then it goes down to ~ 45μsec, should be extra time using localhost sockets because I hit network stack I am here.

Is there an OS configuration that can fasten the local host socket as a named pipe?

  uname -a Linux fiatpap1d 2.4.21-63.ELhugemem # 1 SMP Mercury Oct 28 23:12:58 EDT 2009 i686 Athlon i386 GNU / Linux  
< P> Thanks advance!

With the above example, I get round travel time of 65 μsec i if i file If I make two fees on the system then it goes down to ~ 45μsec, it should be extra time using localhost sockets because I'm killing a network stack.

Yes, and it should be expected.

FIFO, rather the initial communication method His state is essentially a bool variable reads and writes, like fixed size, go through pre-allocated buffer. Thus OS can optimize operation.

Sockets are more complex than the state machine of their full TCP, buffering is dynamic and bidirectional (resend, send buffer separately). This means that when you write something in the local socket, you have some kind of dynamic memory management that Linux tries to avoid as much as possible: zero-copy / single-copy is applied everywhere . Yet, obviously, because the call has to go through more code, they become slower.

Finally, compared to more SOCKS than FIFO, 20us difference is clearly the performance of Linux sockets.

PS uses a single connection without optimization for network code of 65us rtt = ~ 35us 1 s / 35us = ~ 30 per second in seconds, which seems right about.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -