?

Log in

No account? Create an account

Memcached, Speaking of Performance...

« previous entry | next entry »
May. 13th, 2009 | 03:40 pm

I've been looking at the cost recently of fetches for libmemcached, and seeing if there was anything I could do to increase performance.

What did I find? Half the cost currently is in the snprintf() sitting at the protocol sender.

Half!

Good news about this?

If you are using the new binary protocol with Memcached this goes away completely :)

snprintf() sucks.
pastedGraphic.tiff

Link | Leave a comment |

Comments {4}

Artur Bergman

(no subject)

from: crucially
date: May. 14th, 2009 06:04 am (UTC)
Link

what tool generated that?

Reply | Thread

Brian "Krow" Aker

(no subject)

from: krow
date: May. 14th, 2009 06:15 am (UTC)
Link

Valgrind calling callgrind. I then visualize data in Kcachegrind (which I run in a virtual machine on my Mac).

Reply | Parent | Thread

James Antill

Think of *printf() as a mini language

from: illiterat
date: May. 15th, 2009 05:40 am (UTC)
Link

It's been known for a long time that *printf() isn't "fast", but you don't need to go all the way to a binary format to fix that.

Reply | Thread

Brian "Krow" Aker

Re: Think of *printf() as a mini language

from: krow
date: May. 15th, 2009 05:42 am (UTC)
Link

The binary protocol for memcached it all around better. Parses faster, consumes less space on the wire, increases key size... it is a big winner.

Reply | Parent | Thread