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