The real context here is elasticsearch but I'm curious what would happen more generally (minecraft / jetty / etc). When an OS process is out of system memory, you can see this behavior by checking swap. If a box isn't swapping then it doesn't need more memory (I believe this is mostly always true).
What would the OS see if the JVM is starved with too low of a -Xmx
value? Would the JVM spend time managing internal pages? Would this come across as CPU wait / load? Or is the only way to be sure is by using java-aware tooling to reach into the JVM and observe more precisely?