Brian "Krow" Aker (krow) wrote,
Brian "Krow" Aker
krow

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

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.
Subscribe
  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment