Swap depletion treatment method
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/