0

We have a backend webapp installed on tomcat 8 that has a GUI part written in Apache wicket MVC (version 1.4) - the wicket GUI fails to respond the moment the server starts doing heavy processing.

On average the CPU sits around 85% utilization. The page may refresh after a minute and may never return.

How can I give the wicket a higher priority, either in the code or the server settings to get it to respond under high load? I wouldn't mind it stealing CPU from the backend threads if needed.

Some clarification : the whole app is a single war, so the wicket and the "backend" threads run in the same jvm under the same webapp. The wicket page does not seem to need any important busy objects that the other threads uses.

0

If the two applications are strongly cuopled, as in the wiket part makes blocking (synchronous) calls to the processing part, the only thing you can do is find why the processing app blocks and try optimizing it.

If instead you can decouple them then the cleanest solution would be to split the webapps in two different tomcat instances first, and if you don't have it you can put in front a reverse proxy so the change is transparent.

This way you have even more visibility at which of the apps uses more CPU, or you can give more priority to whichever you wish, eg. on linux nice / renice.

Another benefit is that the number of threads that tomcat can handle is fixed, so putting both applications in the same instance one app can use all threads blocking the other.

Hope this helps

3
  • I added the clarification - So its just a single application, not a real backend-frontend system. – psyopguy May 11 '16 at 11:35
  • can't really separate the two ... the GUI actually gives tweaking access to the service and it uses many inner object changeable variables. – psyopguy May 11 '16 at 18:24
  • Adjusted my reply based on your info. In short, if the apps are so coupled then you have to modify your code. – Fredi May 12 '16 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.