Rocky Linux 9 キャッシュメモリサイズ(buff/cache)を削除する方法

環境
Rocky Linux release 9.0 (Blue Onyx)

操作方法
1.キャッシュしているメモリサイズ(buff/cache)を確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# free
total used free shared buff/cache available
Mem: 1790640 1062212 529748 35640 198680 539048
Swap: 2097148 621652 1475496
# free total used free shared buff/cache available Mem: 1790640 1062212 529748 35640 198680 539048 Swap: 2097148 621652 1475496
# free
               total        used        free      shared  buff/cache   available
Mem:         1790640     1062212      529748       35640      198680      539048
Swap:        2097148      621652     1475496

2.「buff/cache」を削除します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo sysctl vm.drop_caches=1
vm.drop_caches = 1
# sudo sysctl vm.drop_caches=1 vm.drop_caches = 1
# sudo sysctl vm.drop_caches=1
vm.drop_caches = 1

3.再度確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# free
total used free shared buff/cache available
Mem: 1790640 1120480 472664 35640 197496 480780
Swap: 2097148 609876 1487272
# free total used free shared buff/cache available Mem: 1790640 1120480 472664 35640 197496 480780 Swap: 2097148 609876 1487272
# free
               total        used        free      shared  buff/cache   available
Mem:         1790640     1120480      472664       35640      197496      480780
Swap:        2097148      609876     1487272

 

Rocky Linux 9

Posted by arkgame