the write strategy of the client implement affects the set performance dramatically?

Dean Harding dean.harding at dload.com.au
Wed Mar 5 01:54:44 UTC 2008


Maxim Dounin wrote:
> You may note that first packet was ack'ed after 100ms - default delayed 
> ack timeout in FreeBSD.  Since your next packet is small - OS waits 
> before sending it, and sends only after previous packet was ack'ed.  And 
> since memcached don't get the whole request, it has nothing to answer - 
> so ack was sent only after timeout.
> 
> Setting net.inet.tcp.delayed_ack to 0 makes times much more real:

I would suggest that you simply send the packet in one write() call, 
rather than setting TCP_NODELAY. Since memcache has a maximum size of 
1MB anyway, you're not going to be creating impossibly big memory 
buffers (hopefully).

Dean.



More information about the memcached mailing list