This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes CPU Performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "CPU Performance" Watch "CPU Performance" New topic
Author

CPU Performance

K.Suresh Kumar
Ranch Hand

Joined: Nov 21, 2007
Posts: 41
<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

Joined: Mar 22, 2000
Posts: 12761
    
    5
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

Joined: Nov 21, 2007
Posts: 41
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

Joined: Mar 22, 2000
Posts: 12761
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CPU Performance
 
Similar Threads
servlet beginner confused
Disable Directory Listings (Jetty webcontainer)
AJAX,WebSockets, XMPP?
ServletExec and RequestDispatcher
GWT works but Jetty doesn't