How can I disable swappiness just for Mariadb and not for other applications on the same EC2 Instance?
-
17-03-2021 - |
문제
I have an EC2 instance where DB(Mariadb) runs on the same EC2 instance as the other applications. MySQL documentation suggests to disable swappiness since DB doesn't like swap. How can I disable swappiness just for Mariadb and not for all other users/apps ? Thanks Moe
올바른 솔루션이 없습니다
다른 팁
Plan A (if possible): Use "huge pages" for the buffer_pool. They can't be swapped, thereby helping keep from swapping MariaDB.
Plan B: Use swappiness = 1 -- This, in theory, discourages the OS from swapping any process. It will still swap if it is absolutely necessary. At that point, perhaps it is better to slow down some process(es) rather than crashing?
제휴하지 않습니다 dba.stackexchange