Any issues with pipelining requests?

Dustin Sallings dustin at
Wed Apr 18 06:45:51 UTC 2007

	I made a change to my java memcached library over the weekend to  
support pipelining requests.  In a few ways this simplified my code,  
but it was a rather large performance gain.

	In the ``300,000 26-byte sets'' benchmark that came up last week, I  
found that my java client took about 30s to perform all of the same  
sets, but it took 5 or 6 seconds for netcat to do the same on the  
same box given pre-computed chunk of sets.

	With pipelining, my java client did the same sets in 15s -- 3x  
slower than what I'd consider ``as fast as possible'' or 2x faster  
than my pre-pipeline state.  I'm pretty happy with that since that  
was pre-profiling.

	However, I was just reading on the twisted list that there may be a  
problem sending requests without waiting for the results.  I am  
receiving and processing results roughly as fast as they can come  
over the wire if that makes a difference.  I just don't wait to  
process a response before sending the next request.

	Are there any potential problems with this?

Dustin Sallings

More information about the memcached mailing list