Any issues with pipelining requests?

Steven Grimm sgrimm at
Wed Apr 18 06:50:24 UTC 2007

No problems. Memcached guarantees you'll receive fully-formed responses 
to all the requests over a given connection, in the order the requests 
were sent.

Obviously if you're using the UDP interface, your network might give you 
out-of-order delivery.

Those results are just what I'd expect -- you're eliminating (or at 
least greatly reducing) network round-trip time as a limitation on your 


Dustin Sallings wrote:
>     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