We have written a custom RESTful webservice using java APIs deployed on IBM WAS. The 2 main operations of this webservice are document upload and retrieval into and from a system. During performance testing, we generated 500 concurrent requests on the webservice. Each request took an average of 50 seconds to process which is too high. However, when we send a single request, it is processed within fraction of seconds like 0.03 secs. Need tips on how to increase performance. Maybe via some configurations in WAS? Or via changes to the code. Anything will help!
The first thing to focus on is finding out why your web service is slow. Is it maybe using a lot of memory, so that if it has to process many requests at the same time, the JVM will spend a lot of time on garbage collection? That's just a wild guess. Without knowing anything about the details of your code, it's very hard to tell why it is slow and what would be an effective way to fix the problem.
How are you timing the requests, out of curiosity?
posted 1 year ago
1. We are using tools such as Dyna Trace and Jmeter to do analysis on the Performance run. The reports show 100 % memory utilization on the websphere application server during the course of the run.
2. What would be the default number of concurrent requests that a webservice can process?
3. Our server configuration is
OS: AIX 184.108.40.206
No. of Processors: 4
Speed: 3425 MHz
posted 1 year ago
Since there is such a huge disparity between how fast a single request is processed compared to a few hundred simultaneous requests I would guess at some resource contention somewhere.
1. Do you have detailed logging in there (debug stuff) that you can use to trace where the code is being held up?
2. Do you know at what point the slow down occurs (these are often quite sudden rather than gradual)? if not, might be an idea to do a number of runs with increasing numbers of requests...eg 10, 50, 100. That won't take long.
(1) is going to be more useful, as it's most likely to show you where the contention lies. However it can be a slow process, so may as well do (2) at the same time.
Dave Tolls wrote:Since there is such a huge disparity between how fast a single request is processed compared to a few hundred simultaneous requests I would guess at some resource contention somewhere.
Websphere handles incoming web request with a specific pool of threads. By default this pool size is 50 (if I remember well); up to 50 concurrent requests, you'll get 50 concurrent threads running simultaneously on your was instance (of course the SO will switch execution context among threads, in a manner that's totally transparent to you); exceeding requests are simply queued (no active thread). At least, that's what I remember :-)
As Dave suggests,the more active threads you have, the more content for resources (cpu time; datasource; and so on) you get, and you should notice a degratation of performances. Giving more power to servers isn't always a good choice (nor a viable approach, like in your case, where you have not WAS installed on a virtual machine). I would suggest to you to try a different approach, for example delegating the actual processing of the business logic of your webservice in a background (asynchronous) task.
Another suggestion: times ago, I was running a WAS instance on an IBM i (formerly: AS400) server. I was told that IBM i OS handles interactive jobs differently from batch jobs, the latter being generally speaking more performant (jobs are elaborated in separated resource pools).
I'm not an expert of AIX nor I know if it works like IBM i, but why dont' try to talk with your sysadmin ?