????????????????????Java????????-Xmx??-Xms??????????????????????棬??????????????Java?????????????檔????????Java????????????????????????????????????Java???????????????????????????Щ??????????????á???Щ?????????

?????? ????Objects??

?????? ??Classes??

?????? ????Theads??

?????? ???????????Native data structures??

?????? ???????Native code??

???????????????????????????????ó??????л????????????????仯??????????????????????????????????????????????????????????????????????Native????????????????????ж??С??-Xmx??????????棺-XX??MaxPermSize????????????-Xss????????????????檔????????С??????С?????StackOverflow?????????????????????????

??????-Xmx?? + ??-XX??MaxPermSize?? + ????? * ??-Xss?? + ???????

??????????沿???????????????????棬??NIO??socket????????JNI????????????jvm????5%???????????????????????JVM??????100??????-Xmx1024m -XX??MaxPermSize=256m -Xss512k

???????jvm??????????????????????1024m + 256m + 100*512k + ??0.05 * 1330m?? = 1396.5m

?????????????1.5 * ?????????????????????????tomcat??????????С??棬??????????????MaxPermSize??256M???????????????????Щ??

?????????????????????????????????????????????????????????????????????????????????棬???????????ù??????????棬?????????????