3 ms·
Fail fast is in most situations better than swap hell.
by VectorLock 4y ago
Fail fast is in most situations better than swap hell.
- whartung 4y agoIndeed. As a Java shop, the last thing you want to do is swap. Garbage Collection and Swap tend to be very bad cohabitants.
- kevincox 4y agoYeah, no swap probtnakes sense for GCed languages. If you are going to touch all of the memory frequently it doesn't make sense to try to swap it out. You are better off forcing Linux to swap out filesystem cache which at least has a chance of not being used in the next minute. The only real thing that you may be missing is SSH being swapped out and some other system processes but those may be 2MiB altogether. Maybe an option would be disabling swap just for the JVM. IDK if that is something you can do with cgroups. But if 99% of your anonymous RAM is pinned anyways there is little to gain.