Log in

No account? Create an account

Multi-delete libmemcached, it is all about the pipe lining...

« previous entry | next entry »
Dec. 18th, 2007 | 01:10 am

So what happens when you pipe line a bunch of data into a socket?

Much better performance:

Testing mdelete_generate 1.542 [ ok ]
Testing delete_generate 5.720 [ ok ]

The theory in all of the re-factoring I have done for the next version of libmemcached is to allow me to pipe line more data into a socket. AKA, operations that can be packed into a single TCP payload should be. This allows me to make much better use of the network.

I've had support for this for get since nearly the beginning:

Testing get_read 6.848 [ ok ]
Testing mget_read 2.786 [ ok ]

It has always made a big difference in performance. Delete is just the first operator, next on this list is all of the storage operators (set, add, cas, and replace).

BTW the key to making the multi-delete operations work? Re-factoring.

The more time I spend on making the operations in the library well behaved via their interfaces, the easier it is to add features like this.

Link | Leave a comment |

Comments {1}

(no subject)

from: jamesd
date: Dec. 19th, 2007 02:52 am (UTC)

Nicely done. Fewer packets to switch and interrupts to process on their arrival are good things.

Reply | Thread