Answer the question
In order to leave comments, you need to log in
How to prevent swap in Linux?
From 02:00 to 06:00 (the area of the chart's splitting) I du
also played around with the transfer of files. Around 04:00, due to IOwait (apparently), some of the processes decided to get into swap. This has already happened on this server, but treating such situations with a reboot is no longer handy. Where he could, he restarted services (mysql, nginx, sphinx), where the restart did not help, he killed and restarted.
Now the server looks like this:/usr/bin/slabtop --sort=c
Active / Total Objects (% used) : 23432931 / 23747426 (98.7%)
Active / Total Slabs (% used) : 2735840 / 2735866 (100.0%)
Active / Total Caches (% used) : 106 / 186 (57.0%)
Active / Total Size (% used) : 10643029.64K / 10793250.76K (98.6%)
Minimum / Average / Maximum Object : 0.02K / 0.45K / 4096.00K
8301820 8299960 99% 1.00K 2075455 4 8301820K ext4_inode_cache
8400040 8376094 99% 0.19K 420002 20 1680008K dentry
4174747 4173905 99% 0.10K 112831 37 451324K buffer_head
534422 278544 52% 0.55K 76346 7 305384K radix_tree_node
2122702 2121946 99% 0.06K 35978 59 143912K size-64
33174 33121 99% 0.62K 5529 6 22116K proc_inode_cache
185 185 100% 32.12K 185 1 11840K kmem_cache
15588 15586 99% 0.58K 2598 6 10392K inode_cache
ext4_inode_cache
to dentry
restart without rebooting the server? Answer the question
In order to leave comments, you need to log in
>> but treating such situations with a reboot is no longer handy.
In such a situation, I do swapoff and swapon. When you start the first one, the memory will be transferred back from disk to RAM.
And there are no answers to questions.
# sync
# cat /proc/sys/vm/drop_caches
# echo > 1 > /proc/sys/vm/drop_caches
free pagecache# echo > 2 > /proc/sys/vm/drop_caches
free dentries and inodes# echo > 3 > /proc/sys/vm/drop_caches
free pagecache, dentries and inodes Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question