News for hackers. Stuff that matters.
Re:Interesting commands for the Linux shell by ptero on Thursday September 14, 2017 @08:29AM (#15247247)
I get that part. I was wondering if by doing it all at once you somehow gain significantly over doing it normally. I doubt it, but prepared to learn otherwise. If it is much quicker to swap everything in maybe it is worthwhile to expose this functionality directly instead of doing hacks like swap off/on.
Re:Interesting commands for the Linux shell by joosters on Thursday September 14, 2017 @08:40AM (#15247321)
It depends on when you next need to use the system. If it is immediately after the memory hogging code exits, there's probably not much of a win.

But if you run the memory hogging program, then go to lunch, if the swapoff/swapon is triggered before you get back, you will be avoiding the delays entirely.

Re:Interesting commands for the Linux shell by BenjiWiebe on Thursday September 14, 2017 @11:27AM (#15248980)
In my experience, it makes a big difference. My swap is on a hard drive, which can handle the sequential reading of the swap quite quickly. Whereas the random accessing of it in normal use is much slower per byte.