I have an old workstation running kernel
Linux desktop 5.4.0-74-lowlatency #83~18.04.1-Ubuntu SMP PREEMPT Tue May 11 17:19:13 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
and when I run
echo 1 > /proc/sys/vm/vfs_cache_pressure
to allow directory structure to be cached better and then run
rsync path/to/A path/to/B
multiple times where both A and B contain approximately 6.5 million files (~2.5 TB per directory) I randomly get long pauses (1-15 seconds) which freeze both the desktop and audio output. I get nothing in “sudo journalctl -f” until some software starts to fail (e.g. pulseaudio emits a warning about too high latency). With low “vfs_cache_pressure” the expected behavior would be to be able to keep dentries for those 13 million files and the repeated rsync calls should be pretty fast and not cause high I/O nor memory management load.
I’ve been running with the above setting of “1” for years and I’m pretty sure I haven’t noticed this issue before kernel 5.4 series so I think the kernel behavior has degraded.
I’m pretty sure I’m not running out of RAM so this is probably a change in the dentry cache behavior or some other part of the kernel memory management.