增加Tomcat堆大小 [英] Increasing Tomcat Heap Size

查看:202
本文介绍了增加Tomcat堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试增加tomcat的堆大小(以便我可以优化GeoServer性能),我所做的是:

I'm trying to increase the heap size of tomcat (so i can optimize GeoServer performance), what i did is:

  • 将tomcat默认文件中的JAVA_OPTS值更改为:

JAVA_OPTS =-Djava.awt.headless = true –Xmx3072m -XX:MaxPermSize = 512m"

JAVA_OPTS="-Djava.awt.headless=true –Xmx3072m -XX:MaxPermSize=512m"

  • 重新启动tomcat
  • 当我检查JVM值时显示:

    When I checked JVM values is shows:

    可用内存:440.33 MB总内存:495.06 MB最大内存:2969.62 MB

    Free memory: 440.33 MB Total memory: 495.06 MB Max memory: 2969.62 MB

    我不确定这是否好.

    推荐答案

    -Xmx 将设置最大堆大小. JVM将根据需要分配更多的内存,直至达到该限制.如果出于某种原因要在JVM启动时为堆分配更多的内存,请使用 -Xms 选项和 -Xmx 选项.

    -Xmx will set the maximum heap size. The the JVM will allocate more memory as needed up to that limit. If you, for some reason, want to allocate more memory for the heap at JVM start, use the -Xms option in addition to the -Xmx option.

    有关详细信息,请参见 Oracle文档

    See the Oracle docs for details.

    此外,这些选项涉及RAM,因此HD空间不相关.

    Also, these options refer to RAM, so the HD space is not relevant.

    这篇关于增加Tomcat堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆