应用服务器最大内存限制 [英] Application Servers Maximum Memory Limit
问题描述
服务器(Jboss,Tomcat等)可以使用多少内存?例如,如果服务器有128GB的内存,它可以使用至少100GB的内存吗?我在本地使用这些参数:
How much memory can a server (Jboss, Tomcat etc...) use? For example if the server has 128gb memory, can it use at least 100gb of it? I'm using these parameters for my local:
-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512
这些参数是否可以配置为使用100gb?
Can these parameters configured for usage of 100gb?
推荐答案
我们使用它来运行一个24GB的64位JVM,其中亚秒级GC暂停,同时每秒提供100多页请求:
We use this to run a 24GB 64-bit JVM with sub-second GC pauses while serving 100+ page requests per second:
-Xms24g -Xmx24g -XX:MaxPermSize=256m -XX:NewRatio=4 -XX:SurvivorRatio=8
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC
-XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled
-XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68
如果服务器有内存,则不应该有任何理由指定100GB。由于我们使用的是32GB以下,我们还使用 -XX:+ UseCompressedOops
来减少64位寻址的开销。此外,我们使用 -XX:+ UseLargePages
来获得更好的性能,但是您必须首先为您的操作系统启用大页面支持。
There shouldn't be any reason you can't specify 100GB if you server has the memory. Since we're using under 32GB we also use -XX:+UseCompressedOops
to reduce the overhead of 64-bit addressing. Additionally we use -XX:+UseLargePages
for better performance, however you have to enable large page support for your OS first.
这篇关于应用服务器最大内存限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!