There is a standard size for increasing Tomcat memory

Asked

Viewed 641 times

1

Hello, there is a standard size for increasing Tomcat memory, through the Xmx and Xms parameters?

  • 2

    This "pattern" you quoted is the one that is already set not? You want to increase?

1 answer

2

There is a recommended standard for increasing Tomcat memory, as you know, the increase is by editing the Xms and Xmx parameters, which will be passed to the JVM at the time of the server startup. For the values used by jvm, the following details should be taken into account:

1 - Values passed to Xms(Initial Memory Allocation) and Xmx(Maximum Memory Allocation) must be 1024 multiples.

  • Xms value should not be less than 1m, default is 2m.
  • Xmx the maximum value is 2G in jvm’s on 32 Bit architecture, the default is 64m.

Values can be passed in bytes, Kbytes and Mbytes in the format:

-Xms6291456

-Xms6144k

-Xms6m

2 - For Tomcat, a good rule for you to adopt is the following:

The maximum memory value (Xmx) must be equal to or twice the initial value (Xms);

Ex:

-Xms256m

-Xmx512m

I usually always use double.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.