My debian 8 machine has 2 drives. Sometimes I move/copy files from drive A to drive B. Drive B is slow, so the file system cache is full causing the system to be slow/unresponsive when copying large files. To avoid that i wanted to limit the file system cache to be used for device B. Therefore i changed the setting /sys/class/bdi/MAJOR:MINOR/max_ratio
from 100
to 20
. However that doesn't seem to take effect because dirty pages are still filled the same way as before according to /proc/meminfo
.
What am I missing? Do I need to do anything to reload those settings? Is there another way to limit file system cache for a specific device?
I have already tried mount option "sync". That works, but makes drive B terribly slow.
echo 3 | sudo tee /proc/sys/vm/drop_caches
helps to get the speed back to normal ranges, sometimes immediately, sometimes after a short time. No idea about the root cause; I suspect locking issues for several cores. – dirkt Nov 15 '17 at 10:52