Outils pour utilisateurs

Outils du site


tech:disque_cache_flush_sync_io_purge

Disque cache flush sync io purge

Source :

drop_caches.sh

echo 3 |sudo tee /proc/sys/vm/drop_caches
#!/bin/bash
sync
echo 3 >/proc/sys/vm/drop_caches
swapoff -a && swapon -a
# (move data, modified through FS -> HDD cache) + flush HDD cache
sync
 
# (slab + pagecache) -> HDD (https://www.kernel.org/doc/Documentation/sysctl/vm.txt)
echo 3 > /proc/sys/vm/drop_caches 
 
blockdev --flushbufs /dev/sda
hdparm -F /dev/sda
 
#  Command that should be run before unplug, flushes everything guaranteed
echo 1 > /sys/block/sdX/device/delete

watch the progress of a `sync` operation Source : http://unix.stackexchange.com/questions/48235/can-i-watch-the-progress-of-a-sync-operation

watch grep -e Dirty: -e Writeback: /proc/meminfo
awk '{print $9}' /sys/block/sda/stat
tech/disque_cache_flush_sync_io_purge.txt · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki