Erich Specht

Greenhorn
+ Follow
since Mar 05, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Erich Specht

Tim Holloway wrote:This is not good. You only have maybe 2-3% CPU usage accounted for out of 100% user-state CPU consumed.



I found the problem - the LogiXML Scheduler service. Killing that java process brought the CPU usage down to 0. Tomcat (without my reporting app back in webapps) started in 662 ms!

Thank you so much for your help. I'll take this up with the software vendor.
8 years ago

Tim Holloway wrote:However, you have a CPU reading of 100% and whatever it is, it isn't Tomcat/Java, which is a barely-visible 1.6%. Can you do the vanilla "top", which shows high-CPU users are the head of the listing?



Thank you so much. Feels like we're getting somewhere. Here's the output of top:
8 years ago

Tim Holloway wrote:A "top" screen display may provide us with some insight.


Here's the output from top -m:
8 years ago

Tim Holloway wrote:What bothers me is that you're using 8G of swap space.



free -m is showing that none of the swap is used - 8G is free
8 years ago

Tim Holloway wrote:I think something ate all the RAM before Tomcat got there.



I've doubled the amount of ram to 8GB, but it is still taking 123500 ms to load without my main application sitting in the webapps folder. When I do a free -m, I get the following:

total used free shared buffers cached
Mem: 8192 710 7481 0 0 95
-/+ buffers/cache: 614 7577
Swap: 8192 0 8192

So I'm still only using 710MB of RAM (this is with the following suggested settings: -Xms512m -Xmx1024m.

Upping it to -Xms1024m -Xmx1024m, it takes 138500 ms to load and free -m shows:

total used free shared buffers cached
Mem: 8192 713 7478 0 0 95
-/+ buffers/cache: 617 7574
Swap: 8192 0 8192


So it appears that the -Xms and -Xmx flags aren't doing anything.

The way I'm trying to pass that is with this info in my setenv.sh file:

JAVA_HOME=/pub/cust/jdk1.7.0_17
CATALINA_HOME=/usr/tomcat7
CATALINA_OPTS="-server -d64 -Xms1024m -Xmx1024m -XX:PermSize=288m -XX:MaxPermSize=288m -XX:-DisableExplicitGC -XX:CompileThreshold=8000 -Djava.awt.headless=true -Xloggc:$CATALINA_HOME/logs/gc.log -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-HeapDumpOnOutOfMemoryError"


Do you know what I am doing wrong?

Also, does anyone know of any diagnostic commands I can run to get a better idea why this is running so slow?
8 years ago

Tim Holloway wrote:Try shrinking the Xms value down to about 512M maybe. Also, you might want to kick the Xmx down to 1024M temporarily.



I tried your settings and after tomcat started up in 136900 ms, free -m shows:

total used free shared buffers cached
Mem: 4096 643 3452 0 0 212
-/+ buffers/cache: 431 3664
Swap: 4096 0 4096

I'm thinking of allocating additional RAM, however the memory settings in CATALINA_OPTS don't seem to affect boot up time too much.
8 years ago

Tim Holloway wrote:It sounds like you don't have access to the host OS or I'd ask you how much physical RAM the server has and what the CPU load is.



I do. Here's the output of free -m:
total used free shared buffers cached
Mem: 4096 579 3516 0 0 212
-/+ buffers/cache: 367 3728
Swap: 4096 0 4096

I appreciate you looking this over.

==> EDIT

That was before starting tomcat again. After starting it (in 134800 ms), free -m shows:

total used free shared buffers cached
Mem: 4096 636 3459 0 0 212
-/+ buffers/cache: 424 3671
Swap: 4096 0 4096


What I find interesting is that only 636mb is used although I'm specifying the following in the setenv.sh script:

-Xms3072m -Xmx3072m -XX:PermSize=288m -XX:MaxPermSize=288m

Shouldn't that be taking up most of my RAM right away?

8 years ago

Jaikiran Pai wrote:

Erich Specht wrote:it was taking over 1 million ms to load the default projects and one additional


What is that 1 additional application? Does the startup time improve if that application isn't included in the deployments?



That application is a reporting application we created using LogiXML. I removed that application from the webapps folder and it took the startup time down to 137099 ms, which is a whole lot quicker. The other apps it deployed are host-manager, ROOT, manager, and examples.

I also noticed that it takes a couple minutes during startup before anything shows in the logs. Then this message appears:
INFO: An older version 1.1.24 of the APR based Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of 1.1.27

I installed that using RPM, but I'm going to remove that and reinstall native manually if I can.
8 years ago

Raks Kr wrote:ok can you copy and paste first 15-20 line of web.xml over here.



Here are the portions that aren't commented out. Thanks for getting back to me.

Erich

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee">
<servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> -<init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> -<init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> -<init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> -<init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet>
<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> <url-pattern>*.jspx</url-pattern> </servlet-mapping>
<session-config> <session-timeout>30</session-timeout> </session-config>
... LOTS OF MIME MAPPINGS ...
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
8 years ago

Raks Kr wrote:Provide web.xml over here.


The web.xml and server.xml are unchanged. And this site won't allow me to attach xml files to the post.
8 years ago
I'm new to Tomcat and I was told by a software vendor that it needs to be installed without symbolic links. I installed it according to the instructions here http://tomcat.apache.org/tomcat-7.0-doc/setup.html and when it was taking over 1 million ms to load the default projects and one additional, I tried installing Tomcat Native Library, but it still takes incredibly long to start up and is real slow for each page load.

I have the following in my $CATALINA_HOME/bin/setenv.sh file:

JAVA_HOME=/pub/cust/jdk1.7.0_17
CATALINA_HOME=/usr/tomcat7
CATALINA_OPTS="-server -Xms3072m -Xmx3072m -XX:PermSize=288m -XX:MaxPermSize=288m -XX:-DisableExplicitGC -XX:CompileThreshold=8000 -Djava.awt.headless=true -Xloggc:$CATALINA_HOME/logs/gc.log -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-HeapDumpOnOutOfMemoryError"

the last few items in CATALINA_OPTS regarding garbage collection were from something I was reading to diagnose the problem.

Is there something I can do to speed things up?
8 years ago