There are a few reasons why this is hard:<p>* Lack of information -- in order to pick the right parameters, the system needs to know what you're trying to achieve (e.g., do you want to minimize latency or maximize throughput?). Communicating that more effectively than just specifying parameters is challenging.<p>* Instead of telling the system what you want, it can try to figure it out -- to <i>some</i> extent -- by observing program behavior and dynamically fiddling with value. The problem with this approach is that it creates feedback loops that muddle things beyond repair.<p>* Optimization over a high dimensional space is hard. As an example (even with just one dimension), see this bit from Doug Lea's talk about why dynamic tuning of spinning vs. blocking on concurrency constructs doesn't work: <a href="https://youtu.be/sq0MX3fHkro?t=39m48s" rel="nofollow">https://youtu.be/sq0MX3fHkro?t=39m48s</a><p>* Writing systems that never reboot[1] <i>and</i> are efficient is very hard. Dynamic variables usually require inserting checks at runtime that can't be optimized away by an AOT compiler. This is where a speculatively-optimizing JIT comes in handy, but JITs aren't appropriate for all uses, and even where they are, good optimizing JITs are notoriously hard to write.<p>--<p>> Why does the JVM still need messing around GC settings to get acceptable performance/memory usage?<p>OpenJDK's HotSpot does fairly reasonable auto-tuning now (known as "GC ergonomics"). You can pick either the throughput collector and <i>maybe</i> set your young-gen ratio, or G1 and set a maximum-pause goal. Along with the maximum heap size, those are just three values, one of which is binary, another is often unnecessary and the third can be a very rough estimation. This should be more than enough for the vast majority of systems, certainly with Java 8. Much of the GC tuning parameters you see in the wild are old remnants from before GC ergonomics, that people are afraid to pull out.<p>[1]: <a href="http://steve-yegge.blogspot.co.il/2007/01/pinocchio-problem.html" rel="nofollow">http://steve-yegge.blogspot.co.il/2007/01/pinocchio-problem....</a>