Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Why do you allocate memory in java? If you'd run out of system memory, gc will do its job.
-
@ganjaman to have a controlled environment.
Also up until some particular version of java8 jvm can kill docker container if run w/o heap limitations -
To OP: stress tests, imitation of real use-cases, monitoring memory consumption.
2x might be an overkill, esp if your app uses 8G under normal circumstances. Picking proper limitations is individual to each app -
@leduyquang753 ever considered upgrading from java4?
@netikras docker is a fair point, but i dont see any reason on actual hardware -
@ganjaman virtual machines -- memory baloon [overcommitted vmware's memory]. Rougue jvms could make the whole esx unstable.
Iron -- shared environments, oomk, memleaks that could be triggered by corner-case scenarios and capable to choke the whole os [assuming oomk is disabled]
desktop apps - ... It's quite obvious
overall it's better practice to run your apps in strictly controlled envs. -
@ganjaman with oome you could at least get a heap dump triggered for post-mortem analysis. Oomk, dead os -- they leave you no such ability
Related Rants
How do you determine how much memory to allocate for your applications?
Sufficient memory * 2?
question
jvm
java