Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CPU Performance

 
K.Suresh Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<pre>Hi Friends,
I have developed a web phone using Servlet, Ajax and Jetty 7.0 for Continuation class. The web server is Tomcat.5.5.27.
In the testing phase I logged in 50 users initially i didn't get any issues but after 5 hours my application took 50% of CPU usage.
I tried to figure out the issue but i couldn't.Please help me to come out from this issues.
The main theme of my application is I am sending request to the servlet .In that servlet the request
has been hold for a minute.If any event occurred with in a minute the request will be resumed. This will happen for every user
continuously until he logout.For holding the request I am using Jetty 7.0 Continuation class.


Thanks and Regards,
Suresh Kumar K
</pre>
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mixing two Java servlet implementations in the same applications sounds like a recipe for disaster to me, Im surprised it works at all. Why not use Jetty for everything?

In any case, if this was my problem I would use the Tomcat Management application to examine the state of the request Threads. You may find some very long running requests stuck in a loop somewhere. I once uncovered a bug where a request was stuck trying to open a connection to a java spaces server that nolonger existed.

Bill
 
K.Suresh Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden,
Thanks for your reply,I have taken thread dump but i don't know how to analyze and find the problem .
Please tell me the way....

Thanks and Regards,
Suresh Kumar K
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not talking about analyzing a Thread dump, I am talking about monitoring the request threads with the Management application. There is a display which will show you the status of each request Thread, including the number of milliseconds it has run so far.

By viewing this display frequently you should be able to see what normal usage patterns look like.

I have to say that holding requests for extended periods is contrary to the request/response design pattern most servlets use.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic