memcached performance ?
gglobot at gmail.com
Tue May 29 02:28:29 UTC 2007
howard chen wrote:
> pls take a look:
I adopeted a several layer caching system, in my case i need speed for
read and write. So i designed a system around 1 file server for 20 web
file server use a ramfs exported partition with nfs (very big, more than
20GB), it will store small files that can be read or write by web
servers, and maintain consistency between them...
each web server run a memcached to keep consistency between sessions.
When a data must be modified buy a client, it will first lock the file
on the file server (other can still read it, but not write it), when the
cached data are to old, read from file server again, merge data, and
write it in file server and memcached.
when a client want to read data, it will check the cache, if the cache
is older than file server, it will read from file server and set the cache.
the file status functions (the php func filemtime() especially) are very
fast (a few micro seconds), but i havn't tested it with nfs yet. And i
am worried about how NFS work internally, what is the process of file
change notification, is it fast enought to keep with the speed ? or will
it slow down my system. this is my biggest worry and i would like to
have your opinions.
between web servers and files server there is a 1Gb/s line (LAN), the
file server is very powerfull... and Web server s are also powerfull but
a lot less ram (4GB)
ps: I use a mysql server on the file server for backup evry 5minutes.
pps: the system is fault tolerent, if a memcached is unavailable, it
will relay on file server exclusivly. and vis versa.
More information about the memcached