Solve Problems related to high CentOS memory consumption
At work, the DBA reported that a server ran some big data, and the server could not be remotely connected. An error was reported. If the log was caught, the DELL engineer detected the problem and the system reinstalled,
Now some big data will be reported as shown in the figure. Because the server is far away from the local data center in a remote city, ssh cannot be logged on, so the iDRAC Remote Management Card is used to connect to the machine, connect to the server on the console and see the following error:
1. memory usage: In the dd process, the kernel uses a large amount of memory as the disk data cache, because 8.5 TB is written;
2. From the device perspective, the memory is mainly consumed in the buff:
3. dd if =/dev/zero of =/data $ I/test bs = 1 M count = 9000000 conv = fdatasync &
Function of the fdatasync parameter:
1) ensure that the data is refreshed to the disk; 2) the file metadata is not flushed to the disk;
Due to feature 2), The buff usage surge;
Specific reference: http://www.2cto.com/ OS /201205/131568.html
4. Run echo 3>/proc/sys/vm/drop_caches to clear the buff/cache. The memory of the device has been restored to normal;
Sar-r-f/var/log/sa/sa17
Memory usage surge. Generally, it is caused by a business program.