We are running Zabbix APP server and DB server on 2 VM's. These VM's have 4 vCPU's and 8GB of memory.
On the DB server, we were experiencing very sluggish graph rendering and seeing a fair amount of swap space usage, and often getting the alert of Disk IO is overloaded on Zabbix DB Server. The DB itself resides on the SAN
We found a setting in RHEL called "Swappiness" that basically tells the OS how aggressively to switch processes out of memory and into swap space. This also applies to Ubuntu. This setting's range is from 0 - 100. By default, it is set to 60.
We set this to 0 and everything started to breathe much easier. The CPU cycles eased up, swap space usage went to almost zero and graph rendering got much more snappy. You can see where we changed this setting in the graphs at the bottom of the page.
Here is a snippet of an editorial about the swappiness setting:
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM,
this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
• swappiness can have a value of between 0 and 100
• swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
• swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache
The default setting in most systems including Ubuntu and RHEL is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical desktop installation. A value of swappiness=10 is recommended, but feel free to experiment.
Note: Server installations have different performance requirements to desktop systems, and the default value of 60 is likely more suitable.
To check your current running swappiness simply run:
To make the change in a temporary state (until you reboot) run: (you can make this permanent by running sysctl -p)
To make this permanent you can run:
and add the line
On the DB server, we were experiencing very sluggish graph rendering and seeing a fair amount of swap space usage, and often getting the alert of Disk IO is overloaded on Zabbix DB Server. The DB itself resides on the SAN
We found a setting in RHEL called "Swappiness" that basically tells the OS how aggressively to switch processes out of memory and into swap space. This also applies to Ubuntu. This setting's range is from 0 - 100. By default, it is set to 60.
We set this to 0 and everything started to breathe much easier. The CPU cycles eased up, swap space usage went to almost zero and graph rendering got much more snappy. You can see where we changed this setting in the graphs at the bottom of the page.
Here is a snippet of an editorial about the swappiness setting:
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM,
this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
• swappiness can have a value of between 0 and 100
• swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
• swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache
The default setting in most systems including Ubuntu and RHEL is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical desktop installation. A value of swappiness=10 is recommended, but feel free to experiment.
Note: Server installations have different performance requirements to desktop systems, and the default value of 60 is likely more suitable.
To check your current running swappiness simply run:
Code:
cat /proc/sys/vm/swappiness
Code:
sudo sysctl vm.swappiness=10
Code:
vim /etc/sysctl.conf
Code:
vm.swappiness=10
Comment