Rate This Document
Findability
Accuracy
Completeness
Readability

Modifying Cache Parameters

Purpose

Modify some cache parameter settings at the operating system layer to improve server performance.

Procedure

Modify the parameters based on the following table.

Table 1 Cache parameters

Linux Parameter

Description

Operation

swappiness

Policy of using the swap partition and memory. A larger value indicates more active use of the swap partition, and a smaller value indicates more active use of the memory.

Run the vim /etc/sysctl.conf command. Press i to enter the insert mode. Add vm.swappiness = 1 to the bottom of the file. Press Esc, type :wq!, and press Enter to save the file and exit. Run the sysctl -p command to make the settings take effect.

dirty_ratio

Percentage of dirty data allowed in the memory

echo 5 > /proc/sys/vm/dirty_ratio