Get the App
SLTechnology News&Howtos  ›  Database  › 

Swap depletion treatment method

Shulou Source: shulou.com Published: 2022-06-01 05:57:22 11月13日 Update

100% of the swap resources of the production database server are occupied, resulting in a high load of memery.

1.cd / proc finds that the process that takes up the most resources is mysql.

Resources occupied by swap can be freed by mysql service restart

Configure parameters in my.cnf at the same time

Innodb_flush_method=O_DIRECT

Can effectively bypass the trap of swap

Because setting innodb_flush_method=O_DIRECT can bypass linux's own caching mechanism and directly use mysql's cache.

Detailed reference

Http://blog.itpub.net/7728585/viewspace-1980262/

Tags: Resources caches services maximum valid parameters simultaneously data databases servers mechanisms processes traps references production configuration methods processing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn Shulou Tech Info MySQL Linux