Friday January 23, 2009
libmemcached cleanup and enhancements
I have been pretty busy this morning applying patches and cleaning up the code in libmemcached. I started out with a patch from Toru Maesaka adding stat analysis from your memcached cluster:
trond@razor> memstat -a --server=server1,server2,server3 Memcached Cluster Analysis Report Number of Servers Analyzed : 3 Average Item Size (incl/overhead) : 567 bytes Node with most memory consumption : server1:11211 (7572852 bytes) Node with least free space : server1:11211 (59536012 bytes remaining) Node with longest uptime : server1:11211 (667s) Pool-wide Hit Ratio : 0%
I have also pushed a small optimization for parsing the buffer returned from the client (in the text protocol) that operates directly on the receive buffer instead of calling memcached_io_read to read out a single byte.
When the source have compiler warnings it makes it hard to spot if you introduce a new one, so I went through the source and removed all of the compiler warnings. With a warning free source code I toggled the compiler flags, so that warnings should be treated as errors. So the next time someone tries to push a patch introducing a warning, the Solaris build bots will scream out on #memcached on irc.freenode.net.
I also improved the test I had written for the noreply
I feel that we have made a lot of progress on libmemcached lately, so I'm looking forward to the next release!!!
Posted at 12:22PM Jan 23, 2009 by trond in Memcached | Comments[0]