DWQA QuestionsCategory: ServerFind Magento Server Parameter Settings
hicoogle asked 2 weeks ago

Find Magento Server Parameter Settings
Hardware parameters of this service:
CPU:8 Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
Memory: 8Gb
Hard Disk: 1TThe web service installation includes:
nginx 1.1
php 5.3.18
mysql 5.5.27The number of website products is about 30,000, PV is about 100,000 and IP10,000.Due to my lack of experience in server, using top to view, memory is always insufficient. Almost only about 100M of available memory is left. This problem has been bothering me for several weeks, so I have to ask you guys here to provide some reference materials for younger brother, younger brother is very grateful here!

2 Answers
Best Answer
gaosboy answered 2 weeks ago

Linux memory has a concept of “system allocation, unused”. Top can see that memory is the value of system allocation, not the real value of use. If you want to determine how much memory the system occupies, you can see the details of the memory through the free command.

 # free -m
             total       used       free     shared    buffers     cached
Mem:          1997       1972         24          0        221       1309
-/+ buffers/cache:        441       1555
Swap:         1911         28       1883

The first line, total: total memory 1997M; used: use 1972M (this is actual allocation, not actual use) idle 24M (not allocated, not unused) buffers: 221M (allocated, unused, recyclable) cached: 1309M (allocated, unused, recyclable)
In the second line, use: 441M (actual use) free: 1555M (actual idle)
That is to say, there are several equations.
The total of the first line = the first line used + the first line free
Total in the first line = used in the second line + free in the second line
Free in the second line = buffers in the first line + cached in the first line

Airy answered 2 weeks ago

Good question, sit back and wait for the bull to reply.
It seems that Linux memory management strategy is different from Windows. It always takes up as much free memory as possible. It’s normal to have 100 M left. Don’t panic. In addition, the zombie process in top needs attention, not much.Iostat is also very important, but I don’t know exactly how to look at it. Wait for Daniel downstairs to answer in detail.

hicoogle replied 2 weeks ago

Based on the configuration of php-fpm, I calculated how much memory each process occupies, and then gave the value of max_children. My 8G memory is set to 4 G memory. The rest is allocated 1G to mysql, and then to Magento cache directory mounted to memory to allocate 1G. There is 2G left. I installed the APC cache and allocated 1G, leaving 1G for other processes in the system. It’s almost the same, but it can be adjusted according to the actual situation.