I have a Windows server machine on Amazon EC2 (m4.2xlarge) which handles web requests, does some processing using an app A and returns the results. Problem is, this app A is highly CPU intensive and ends up taking up to 100% CPU. This creates two problem -
- Returning results take time [I am absolutely ok with this]
- Since CPU is being used almost to 100%, my server is not able to handle the subsequent web requests and returns error for web services. [This is the problem] I don't want any web service call to be dropped, them returning results late is alright with me.
I tried reducing CPU affinity for app A, but this isn't helping me much. Any other ideas such that there is enough CPU free to handle the web requests, and remaining is used for processing of app A.
P.S. I am interested in the answer from a general server setup point of view. Not necessarily AWS related.