Tomcat:调整内存比例 [英] Tomcat: adjust memory proportions

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

问题描述

我有一个运行在Windows 2008 Server上的Tomcat实例,内存为4GB。服务器专用于这一个应用程序,所以我非常希望能够将大部分RAM专用于Tomcat。我的Tomcat设置目前有以下java选项:

I have a Tomcat instance running on a Windows 2008 Server with 4GB of RAM. The server is dedicated to this one application, so I would quite like to be able to dedicate most of the RAM to Tomcat. My Tomcat setup currently has the following java options:

-Xms256m

-Xmx1600m

-Xmx1600m

我想增加RAM的数量,最好是大约3GB(显然我知道怎么做,只需增加-Xmx值)。但是,如果我将最大堆空间增加到1600MB以上,Tomcat就会拒绝启动。我读过的几个网站都说Tomcat不能使用超过40%的可用RAM,这看起来与我所看到的一致。

I'd like to increase the amount of RAM, preferably up to about 3GB (obviously I know how to do that, just increase the -Xmx value). However, Tomcat refuses to start up if I increase the maximum heap space beyond 1600MB. Several websites that I have read say that Tomcat cannot use more than 40% of the available RAM, which seems consistent with what I'm seeing.

有没有办法增加Tomcat可以使用的内存的比例,这样我就可以增加Tomcat可以使用的内存的数量

Is there a way of increasing the proportion of memory that Tomcat can use, so that I can increase the amount of memory that Tomcat can use?

谢谢,
Rik

Thanks, Rik

推荐答案

尽管有一个64位服务器我只安装了32位Java / Tomcat。我卸载了Java和Tomcat并安装了64位版本,一切正常。似乎问题是32位Java只能处理1.5 GB。

Despite having a 64 bit server I only had 32 bit Java/Tomcat installed. I uninstalled Java and Tomcat and installed 64 bit versions and everything worked fine. it seems that the issue was that 32 bit Java can only address 1.5 GB.

谢谢,
Rik

Thanks, Rik

这篇关于Tomcat:调整内存比例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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