Answer the question
In order to leave comments, you need to log in
Optimal memcache settings on VPS?
Good afternoon.
1) Installed Memcache and then Memcached PHP Extension.
What are the optimal parameters to set in the etc/sysconfig/memcached file:
PORT="11211"
USER="memcached"
MAXCONN=""
CACHESIZE=""
OPTIONS=""
Answer the question
In order to leave comments, you need to log in
one.
The MAXCONN, CACHESIZE and OPTIONS parameters are selected experimentally depending on the nature of the load and on the available resources.
You can estimate the amount of memory required for caching (the CACHESIZE parameter) by the size of your file cache. If your project has a file cache of 3 GB, then using memcached with 256 MB of memory will not be effective due to frequent ousting.
There is no universal setting rule.
You just need to understand what these numbers are:
MAXCONN is approximately the number of simultaneous connections that the server will work out in pcs.
CACHESIZE - size of space in RAM in MB.
Therefore, find out how much free RAM you have, estimate how much you can allocate for memcached and write.
For some reason, I doubt that you have 50GB of RAM on your VPS, so find out this point before writing 50000.
Just an installed and configured memcached server does not cache anything by itself.
Caching is done within the application.
Look there (installed the cache, read the cache) if it works, then it works "normally")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question