The optimal parameters for memcache on a VPS?

0 like 0 dislike
11 views
Good afternoon.

1) Installed Memcached, then Memcached PHP Extension.
What are the best settings you need to set in file etc/sysconfig/memcached:
PORT="11211" USER="memcached" MAXCONN=" CACHESIZE=" OPTIONS="

If the memory on the VPS:
55062b7ce764.jpg

On the website, the manual I used was the following:
MAXCONN="2048" Maximum number of connections
CACHESIZE="4096" the Amount of actual RAM on the server
And by analogy I put MAXCONN = 25000, CACHESIZE = 50000. Right?

2) How can I make sure that memcache and memcached PHP, everything is normal cacheroot? Maybe the team is there for ssh or a particular directory, where you can watch...
Thanks in advance.
by | 11 views

2 Answers

0 like 0 dislike
Universal rules no setup.
You just need to understand what these numbers:
MAXCONN is approximately the number of simultaneous connections that the server will work.
CACHESIZE - the amount of space in RAM in MB.

So find out how much free RAM you have, estimate how much you can allocate for memcached and write.
Somehow, I doubt that you are on a VPS 50GB of RAM, so before you write 50000 figure out this point.

Just installed and configured the memcached server itself doesn't cache.
Caching is performed inside the application.
Here and there you will see(set the cache read the cache) if it works, then works "normally")
by
0 like 0 dislike
1.
The parameters MAXCONN, CACHESIZE and OPTIONS are selected experimentally depending on the nature of the load and available resources.

To estimate the amount of memory needed for caching (CACHESIZE option), the size of your file cache. If you have the project file cache is 3 GB, the use of memcached c 256MB memory will not be effective due to frequent displacement.

Taken from here: https://dev.1c-bitrix.ru/learning/course/?COURSE_I...

If all the memory to give memcached, then the rest will be nothing left.

2. For "to make sure that the" use https://github.com/lagged/memcache.php
This script shows the use of a reserved memory cache. Ie periodically monitors the condition, it is possible to estimate, add, or conversely, to remove the amount of memory allocated for memcached
by

Related questions

0 like 0 dislike
5 answers
0 like 0 dislike
6 answers
asked Mar 22, 2019 by Nepofigist
0 like 0 dislike
4 answers
asked Mar 21, 2019 by DenisO
0 like 0 dislike
1 answer
0 like 0 dislike
7 answers
asked Sep 4, 2019 by dr187
110,608 questions
257,186 answers
0 comments
33,909 users