Hacker News new | ask | show | jobs
by xxs 837 days ago
it is, trying running stop-the-world type of a garbage collection along with page-in-out, etc.

>cache impacted by those applications’ file I/O

Which cache? The disk one, that depends on the available memory, with pretty much all free memory being a disk cache. In the cases of swapping, there is no disk cache left, effectively.

1 comments

That is not how paging works. The swap area is also a cache in every sense of the word. And the kernel will swap out pages that clearly are accessed less frequently than another page, even if that page is the buffer cache. When used like that, swapping is a way of getting more disk cache.

Generally speaking, systems do not swap out pages only under memory pressure. That design would be ineffective. When memory pressure is high enough, you've already lost.