Rules or guidelines for setting the heap size for java server -
i'm not interested specific application or environment. although i'm facing problem application deployment now, i'm interested in more general solution.
are there rules on how big set heap size on java server? (especially now, i'm working tomcat 7). -xms , -xmx can specify minimum respectively maximum values heap size. based on applications deployed on server, how know maximum , minimum heap size set. there generic way find it, or more empirical, related deployed application(s) ? - 'related deployed appliccation(s)' mean must know application doing, database work, user interface work, or other memory consumer things.
this empirical - observe application , see how behaves.
and there more - starter, read memory pools , how size them. if it, @ http://www.javaperformancetuning.com/ - there's lot of materials tuning memory issues, , more.
now, in usual case, should not bother -xms. set -xmx whatever value application needs (observe, find out). jvm increases size of memory pools when needs to, , decreases them accordingly. make sure, don't outofmemoryerrors. , then, application memory bottlenecks (like, example full gc's, or long stop-the-world phase), , size pools and/or configure gc if need to.
Comments
Post a Comment