什么是-XX:JAVA_OPTS中的MaxPermSize? [重复]

时间:2022-03-13 04:48:01

This question already has an answer here:

这个问题在这里已有答案:

In a JBoss server configuration java options are given as below.

在JBoss服务器配置中,java选项如下所示。

JAVA_OPTS="-Xms128m -Xmx6144m -XX:MaxPermSize=128m

JAVA_OPTS =“ - Xms128m -Xmx6144m -XX:MaxPermSize = 128m

As of my understanding -Xms and -Xmx are minimum and maximum memory(RAM) allocating to JBoss to run the server. What is the meaning of -XX:MaxPermSize in this one? And what is the preferred value for this?

据我所知-Xms和-Xmx是分配给JBoss运行服务器的最小和最大内存(RAM)。 -XX:MaxPermSize在这个中是什么意思?这个的首选值是多少?

1 个解决方案

#1


1  

-XX:MaxPermSize and -XX:PermSize are used to reserved memory for the permanent memory area.

-XX:MaxPermSize和-XX:PermSize用于永久存储区的保留存储器。

This is where the class and methods definitions are stored.

这是存储类和方法定义的地方。

It is outside the Heap.

它在堆之外。

By default, the size is 64 MB (it depends on Operating System, JVM,...).

默认情况下,大小为64 MB(取决于操作系统,JVM,...)。

Be aware that if you use reflection it could be full in a period short of time. So if you use Spring, be aware of this.

请注意,如果使用反射,它可能会在短时间内变满。所以如果你使用Spring,请注意这一点。

The best is that you activate gc log and show what happens when your app is running.

最好的方法是激活gc日志并显示应用程序运行时会发生什么。

Permgen has been removed in Java 8.

Permgen已在Java 8中删除。

Hope it helps!

希望能帮助到你!

#1


1  

-XX:MaxPermSize and -XX:PermSize are used to reserved memory for the permanent memory area.

-XX:MaxPermSize和-XX:PermSize用于永久存储区的保留存储器。

This is where the class and methods definitions are stored.

这是存储类和方法定义的地方。

It is outside the Heap.

它在堆之外。

By default, the size is 64 MB (it depends on Operating System, JVM,...).

默认情况下,大小为64 MB(取决于操作系统,JVM,...)。

Be aware that if you use reflection it could be full in a period short of time. So if you use Spring, be aware of this.

请注意,如果使用反射,它可能会在短时间内变满。所以如果你使用Spring,请注意这一点。

The best is that you activate gc log and show what happens when your app is running.

最好的方法是激活gc日志并显示应用程序运行时会发生什么。

Permgen has been removed in Java 8.

Permgen已在Java 8中删除。

Hope it helps!

希望能帮助到你!