I searched with “Why do I need a swapfile?” and “Why does a computer need a swapfile/” and the first page of results didn’t tell me anything technical. Rather to turn it off or to not use it in high RAM circumanstances or how to actually turn it on.
I was told once for a Windows machine that programs dimension large portions of memory and with more processess the computer needs a swap file since all or many of those processess do ask the system for large memory sizes but in the end don’t use it very much. Like the whole webpage in RAM for a browser and like 100’s tabs opened.
But I sense a bit that is not correct and even not true.
Can someone explain to me why a computer — and I hope it will be a Windows or Linux computer answer — needs swap file?
My system just went down to 125MB again and got slow and now I used swap on and now it just works? How is that possible? Checking top says I have 8GB swap now (partition) and I needed to killall my browser (many many tabs) enabled swap with swap on, restarted browser, opened all the tabs again but no slow down? On top of that, top (the process) says computer uses 0KB swap?