▲ | userbinator 4 days ago | |||||||||||||||||||||||||
Under no/low memory contention on some workloads this may represent a non-trivial drop in performance due to stale, anonymous pages taking space away from more important use WTF? | ||||||||||||||||||||||||||
▲ | creshal 4 days ago | parent [-] | |||||||||||||||||||||||||
Welcome to the wonderful world of Java programs. When your tomcat abomination pulls in 500 dependencies for one method call each, and 80% of the methods aren't even called in regular use except to perform dependency injection mumbo jumbo during the 90 seconds your tomcat needs to start up, you easily end up with 70% of your application's anon pages being completely useless, but if you can't banish them to swap, they'll prevent the code on the hot path from having any memory left over for file caching. So even if you never run into OOM situations, adding a couple gigabytes of swap lets you free up that many gigabytes of RAM for file caching, and suddenly your application is on average 5x faster - but takes 3 seconds longer to service that one obscure API call that needs to dig all those pages back up. YMMV if you prefer consistently poor performance over inconsistent but usually much better performance. | ||||||||||||||||||||||||||
|