Tuesday, October 11, 2005

 

TCP_CORK

Found an interesting, linux specific tcp socket option. It is called TCP_CORK and what it does is prevent the kernel from sending non-full tcp frames. This should improve performance but has certain implications. The main problem is that we don't want the content to be kept in the buffer for 'too long' (and how long is too long?). So we have to make sure we uncork the socket if we want the data to be sent immediately. The approach I am using for Flora is that we keep the socket corked as long as we know that there is more data coming. As soon as the socket buffer becomes empty we uncork the connection and let any lingering data to be sent to the client.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?