Thanks for the infos.

I was thinking the same thing you were thinking, that it might be 32-bit
JVM, but when I run "java -version" I am getting:

 java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

Isn't that confirming that this is a 64-bit JVM?

ALSO FYI, I did test where I also added "-d64" parameter to the
CATALINA_OPTS, and same thing happened.

Jim

On Tue, Mar 31, 2020 at 11:10 AM Olaf Kock <tom...@olafkock.de> wrote:

>
> On 31.03.20 17:02, o haya wrote:
> > Hi,
> >
> > I am running Tomcat 9.02 under RHEL 7 (under Oracle JDK 1.8), and I would
> > like to increase the memory that is available to Tomcat when it is
> running.
> >
> > I have tried sourcing the following:
> >
> > JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server \
> > -Xms4096m -Xmx4096m -XX:NewSize=256m -XX:MaxNewSize=256m
> > -XX:+DisableExplicitGC \
> > -Djava.security.egd=file:/dev/./urandom -d64"
>
> You want to use CATALINA_OPTS for memory settings, not JAVA_OPTS.
>
> JAVA_OPTS are used for every JVM start, including when you run
> shutdown.sh - that one needs only a minimal amount of memory for short
> time.
>
> > and also:
> >
> > CATALINA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server \
> > -Xms4096m -Xmx4096m -XX:NewSize=256m -XX:MaxNewSize=256m
> > -XX:+DisableExplicitGC \
> > -Djava.security.egd=file:/dev/./urandom"
>
> your CATALINA_OPTS will be combined with the JAVA_OPTS, so that you
> configure the memory twice.
>
> But -Xms and -Xmx are the way to configure the memory.
>
> > but even with those, when I check memory using "free", it is only using
> > about 1.5GB.
> >
> > Can someone tell me how I can accomplish this?
>
> Sounds suspiciously like you're running on 32bit, either the OS or JVM.
> Upgrade to 64bit to have access to more memory.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to