Updated C client, performance, etc...
Sean Chittenden
sean at chittenden.org
Thu Nov 11 17:48:18 PST 2004
Howdy all. I've updated the API and am calling this 1.0 RC1. List of
changes since the last release include:
*) BUG: Found a stack bug that was showing its face on FreeBSD AMD64
(likely other 64 bit OSes) but not on i386.
*) PERFORMANCE: Removed calls to strlen(3) and replaced them with the
compile time sizeof operator. This resulted in about a 10sec speedup
in a 90sec test. Right now, using only 25% of the CPU, I'm able to get
about fifty thousand requests a second (could probably get more, but
stats are broken in the server on amd64 at the moment).
*) Added different hashing schemes (read more below).
*) Performed various linting activities (found nothing major).
For your downloading pleasure:
http://people.FreeBSD.org/~seanc/libmemcache/
As for future goals, I need to clean up error handling a bit and make
some decisions about what to do if a server craps out. I also need to
integrate my shared memory thought droppings. As for performance, the
list of things that could be done for performance on the client end of
things includes:
*) Using kqueue(2) instead of select(2) would probably be a nice
winner, but I don't want to deal with interface portability quite yet
(besides, one file descriptor on a select(2) call isn't too terrible).
*) Using mmap(2) for buffers instead of malloc(3)'ed memory (not having
to copy data from kernel to user and visa versa is always good).
*) A binary protocol. The current protocol requires a tad bit of
searching, but it's not bad. I don't imagine there would be much of a
speedup to be had here, but it's an option.
...but I doubt it'll buy much to go down those routes... no app is
going to be limited by libmemcache's performance (that I'm aware of).
-sc
--
Sean Chittenden
More information about the memcached
mailing list