Hi,

I would like to use memCache and MySQL to handle PHP sessions in a
live environment. Unlike most of the examples out there that employ
write-through caching, our sessions change greatly from page view to
page view, so write-through would not help and I will be using write-
back caching. I am very happy with my testing so far, but have just
this question before I put the work into production.

The memcached server will sit on the same box as the MySQL server.
Given that on any given machine MySQL will try and take as much memory
as it can, does the invocation of memcached, with a memory allocation
that exceeds the available memory, cause the OS (linux) to pull the
difference from the mySql server instance, or does it use swap to make
up the difference ?
In other words what would happen if :

I have 4 GIGs of memory
2 GIG are being used by MySQL
I startup memcached with a memory allocation of 3 GIG.

Does memcached ignore the missing GIG, or does it use swap?, or does
it steal it from MySQL?

In real terms, I have the following setup :

CentOS 2.6.18-53.el5PAE  -  athlon i386 GNU/Linux
8 Gig memory
MySql 5.0.51
Memcached allocation 4 GIG

thanks for any help,

best

Richard

Reply via email to