Hacker News new | ask | show | jobs
by AnotherGoodName 752 days ago
Memory managed languages won’t do long term garbage collection till memory is nearly full.

I suspect they just need to pass in -xmx options to the jvm to avoid this.

3 comments

Not sure what long term garbage collection means. Because the JVM will GC all objects at any point if they are unused.

If you're referring to full GC you can configure how often that happens and by default it doesn't just wait until memory is nearly full.

Even if this wasn't factually incorrect, default max heap size on the JVM is 25% of system RAM.
I actually wish this were true because of more predictable gc pauses
With G1GC there is a setting called MaxGCPauseMillis which can give you predictability.