On May 7, 2007, at 1:12 PM, Perrin Harkins wrote:
I didn't know that BDB does shared memory caching.
And no socket overhead too. All the calls are in-process.
that's interesting. since its not persistant, i figured it just
released everything once you closed the file.
> Primary key lookups in MySQL over local sockets are very fast --
> faster than memcached.
Really ? I had read that they were about the same, but that mysql
selects are blocking & FIFO , while memcached is threaded and
supports concurrent access.
Memcached is single-threaded and uses non-blocking I/O. It's a very
different approach from a multi-threaded daemon like MySQL, and should
scale better ultimately. However, for simple lookups, the network
overhead from the TCP socket that memcached requires seems to outweigh
any advantages. MySQL can use a pipe instead of a TCP socket, which
it does automatically when you connect to a server on localhost.
if you've got a dedicated system on this from mysql that works. but
the blocking nature of mysql selects means that you're bringing in
the overhead from other mysql apps onto your mp application -- which
you might not want on a per-request basis.
before i switched to nginx, i was using lighttpd as my port80 proxy
server. some people started posting to the list because of an odd
behavior from their servers configured with virtual hosts. they
eventually realized that when the system wasn't making use of the
mysql query caching, the requests were blocking with all the other
mysql traffic. i think it was because all the selects happen in one
synchronous process. the end result though, was that requests per
second went from 3k to 30. its definitely an edge case in regards
to this functionality -- but its something that has made me wary of
mysql for anything that is needed on a per-page basis unless i'm
already using sesisons on that page.
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -