You are not logged in.
I've been using Arch for a while now and this always bugged me. To my understanding this is because of the page/buffer cache building up when doing file operations, which is good for performance. But it keeps building to the point at which the system has to swap out applications to make way for the page cache? And when the system is swapping, it keeps swapping in and out constantly until the file operation is done, making the system less responsive.
I've seen this happen in Arch, PopOS and Elementary OS so far. So I thought this was normal for Linux. But recently I installed Linux Mint and I don't see this happening in that distro. During file operations, page cache builds up up to a point where the system has 80-120mb memory free and stops increasing any further. There is no swapping activity whatsoever when copying or moving files. The system is as responsive as ever and the files are copied/moved faster than on Arch.
So these are my questions:
1. Why does Arch (and many other distros) let the page cache build up so much that the system has to resort to swapping?
2. Why does, the same distros mentioned above, keeps swapping data in and out throughout the entire period of copying/moving files?
3. Why is this not happening in Linux Mint? Does Mint have any special settings to prevent this?
4. How do I make Arch behave like Mint (when doing file operations)?
Last edited by SandaruLJ (2020-01-11 03:27:47)
Offline
if you were to do..
cat /proc/sys/vm/swappinessOn Linux-Mint vs Arch is there a difference?
My uninformed (as I don't have Mint to test) guess is that Mint is set to be more swapish.
FWIW my system (vanilla kernel) is 60.
Edit: Oh Look! It's in the Wiki!
https://wiki.archlinux.org/index.php/Swap#Swappiness
Last edited by Zod (2020-01-09 15:19:04)
Offline
On Linux-Mint vs Arch is there a difference?
No. Swappiness is set to 60 in both. I've tried setting it to 10 and even 0 on Arch, but it doesn't change the behaviour at all.
BTW, do you experience this behaviour as well? This is normal right?
Offline
No. Swappiness is set to 60 in both. I've tried setting it to 10 and even 0 on Arch, but it doesn't change the behaviour at all.
BTW, do you experience this behaviour as well? This is normal right?
Nope, can't say as this has ever caught my eye. Maybe a difference in the amount of stuff I move around or perhaps hardware, eg faster drive or whatnot.
Offline
Which kernels, which IO schedulers? I find that the IO scheduler can have quite an impact on perceived responsiveness on file operations.
Offline
And when the system is swapping, it keeps swapping in and out constantly until the file operation is done, making the system less responsive.
This could quite easily be random graphics freezes and have nothing to do with "swapping in". There's little quantitative or qualitative information to go on here.
Try linux-lts and see it if "improves responsiveness" (if defined as lack of freezes). (For comparison, Mint uses linux-5.0 something or another.)
Last edited by sabroad (2020-01-09 17:49:15)
--
saint_abroad
Offline
Which kernels, which IO schedulers? I find that the IO scheduler can have quite an impact on perceived responsiveness on file operations.
Kernel: 5.4.8-arch1-1
IO Scheduler: mq-deadline
I tried switching to every IO scheduler available on Arch (kyber, bfq, none) but there was no difference. Mint also uses mq-deadline.
Offline
This could quite easily be random graphics freezes and have nothing to do with "swapping in". There's little quantitative or qualitative information to go on here.
Yes. I think this is the problem. Thanks for the link.
Try linux-lts and see it if "improves responsiveness" (if defined as lack of freezes). (For comparison, Mint uses linux-5.0 something or another.)
I will switch to linux-lts and report back with the results.
Offline
Yep. That was it. When using linux-lts, there is very minimal swap activity during file operations and it doesn't affect the responsiveness of the UI at all. With linux, there was significant swap activity. I guess I will stick to linux-lts until they fix it. Thanks for the responses guys!
Offline