Java插件JVM参数
我们正在使用 Debian Squeeze 以及iceweasel 和 sun java6,
java-common 0.40 Base of all Java packages
sun-java6-bin 6.22-1 Sun Java(TM) Runtime Environment (JRE) 6
sun-java6-jre 6.22-1 Sun Java(TM) Runtime Environment (JRE) 6
sun-java6-plugin 6.22-1 The Java(TM) Plug-in, Java SE 6
iceweasel 3.5.15-1 Web browser based on Firefox
当从 Web 加载小程序时,我们需要限制 java 使用的内存量。 默认情况下,我们看到它使用大约 400MB,这是一个非常高的值,因为它在具有 512-1024MB RAM 的信息亭终端中运行。
在运行iceweasel的用户的文件夹中,有一个.java/deployment文件夹,其中包含一个deployment.properties文件:
#deployment.properties
#Fri Feb 11 08:07:23 UTC 2011
deployment.version=6.0
deployment.capture.mime.types=true
deployment.browser.path=/usr/bin/firefox
#Java Deployment jre's
#Fri Feb 11 08:07:23 UTC 2011
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.0.platform=1.6
deployment.javaws.jre.0.osname=Linux
deployment.javaws.jre.0.path=/usr/lib/jvm/java-6-sun-1.6.0.22/jre/bin/java
deployment.javaws.jre.0.product=1.6.0_22
deployment.javaws.jre.0.osarch=i386
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=true
deployment.javaws.jre.0.args=
如果运行小程序时down不存在,则会创建此文件。我设定 Deployment.javaws.jre.0.args=-Xmx128m 但似乎没有遵循它
我一直在调整参数,其中一些似乎很受尊重 -Xms 和 -Xmn 但不确定哪个是我必须设置的参数限制java可以使用的内存总量。 我总是得到:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3007 user 20 0 **379m** 34m 8184 S 0.7 3.6 0:04.84 java
问候
we are using Debian Squeeze with iceweasel and sun java6
java-common 0.40 Base of all Java packages
sun-java6-bin 6.22-1 Sun Java(TM) Runtime Environment (JRE) 6
sun-java6-jre 6.22-1 Sun Java(TM) Runtime Environment (JRE) 6
sun-java6-plugin 6.22-1 The Java(TM) Plug-in, Java SE 6
iceweasel 3.5.15-1 Web browser based on Firefox
we need to limit the amount of memory java uses when an applet is loaded from the web.
By default we see it is using arround 400MB which is a very high value since it is running in kiosk terminals with 512-1024MB of RAM.
in the folder of the user running iceweasel there is a .java/deployment folder with a deployment.properties file:
#deployment.properties
#Fri Feb 11 08:07:23 UTC 2011
deployment.version=6.0
deployment.capture.mime.types=true
deployment.browser.path=/usr/bin/firefox
#Java Deployment jre's
#Fri Feb 11 08:07:23 UTC 2011
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.0.platform=1.6
deployment.javaws.jre.0.osname=Linux
deployment.javaws.jre.0.path=/usr/lib/jvm/java-6-sun-1.6.0.22/jre/bin/java
deployment.javaws.jre.0.product=1.6.0_22
deployment.javaws.jre.0.osarch=i386
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=true
deployment.javaws.jre.0.args=
This file is created if down't exists when an applet is run. I set
deployment.javaws.jre.0.args=-Xmx128m but don't seem to follow it
I had been tweaking with the parameters and some of them seem to be honored -Xms and -Xmn but not sure which is the parameter I must set to limit the total amount of memory java can use.
I always get:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3007 user 20 0 **379m** 34m 8184 S 0.7 3.6 0:04.84 java
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,设置 Xmx for java 插件的唯一方法是通过 java 控制面板。它的默认值会覆盖其他设置。
As far as I can recall the only way to set the Xmx for java plugin is via the java control panel. It has got default value there that overrides the other settings.