简体   繁体   中英

Performance — response time slows down

We have a Java EE application(jsp/servlet,jdbc) running on Apache-tomcat server. The response time slows with time. It slows down at faster rate when continuously worked on.

The response time is back to normal after restart of the server.

I connected Jconsole to the server and I am attaching the screen shot of the heap memory usage,which goes up when doing intensive work and garbage collector kicks off periodically and the memory usage comes down. However, when testing towards the end, despite kicking off garbage collector manually the response time is not going down. II also checked the connections and they seem to be closing off properly. ie I do not notice any zcx 堆内存使用情况

Any help is appreciated.

How much slower are the response times? Have you done any profiling or logging to help know which parts of your app are slower? It might be useful to setup a simple servlet to see if that also slows down as the other does. That might tell you if Tomcat or something in your app is slowing down.

Did you fine-tune your tomcat memory settings? Perhaps you need to increase perm gen size a bit. eg -XX:MaxPermSize=512M

You can know it for sure if you can get a heap dump and load it to a tool like MemoryAnalyzer.

Attach with jvisualvm in the JDK. It allows you to profile Tomcat and find where the time goes.

My guess right now is the database connections. Either they go stale or the pool runs dry.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM