Sporadic performance for REST queries


I've written a CGI script to query information from our TeamCity server via the REST API and have discovered that the performance is sporadic.  While the performance is normally OKish (around 0.4 to 0.6 seconds to do 21 queries) it often goes way slower than this, taking many seconds to do the same number or queries.  So I started running "top" on the server to see what was happening and while the machine is mostly idle every so often the java process running the TeamCity server starts chewing up loads of CPU for a while before returning to the normal low level of CPU activity.  It looks like any REST query during these spikes gets stalled, so I guess there's some kind of lock in effect blocking them.  How can I go about working out what's causing these spike?  And are there any settings I can change to prevent such spikes blocking REST queries?


1 comment
Comment actions Permalink


From what you are saying it looks like the server gets loaded sometimes and that slows everything down. This does not look like REST-related issue, but rather a server-wide one (web UI will probably also be slow).

Please review these sections in our doc:
Hangs and thread dumps
Server Performance

I guess you can start with the thread dumps and take several while the server is CPU-hungry. Profiling snapshot would be best to be analyzed.


Please sign in to leave a comment.