@eric,
Yes, I need to stay on dedicated machine, can't go for cloud based solution - client restrictions.
What "client restrictions"? To what do you refer?
I'm dealing with 1 website that has sudden high traffic spikes due to advertising which I can't control so I need to ensure that all web related software is preset to handle much more requests, have adjusted limits like ulimit, child processes etc.
To be clear on this: do you have adjusted setting, OR do you want and still have to adjust settings??
There is tons of settings in Apache, Nginx, DB, linux level that can be adjusted to allow more requests per second.
True, but not necessary in your case, I presume.
I am assuming that you have some javascript serving advertisements, am I correct?
Are you aware that you can run the javascript from another domain and/or server, in order to reduce the workload on the current server?
Are you also aware that any script, resulting in those traffic spikes, should be reviewed and/or rewritten (a form of good practice)?
In the current case, you should be aware that you have been
- delivered external ads (read: they are static and the number of ads will probably be relatively minimal)
- delivered external ads dynamically (read: they are loaded from an external server at each request, resulting in the question why you have the OUTGOING traffic)
and parts of simple solution should hence be lying in (amongst others)
- caching of one or more (static) ads (hence preventing a lot of incoming traffic)
- serving ads directly from an external server (hence preventing a lot of outgoing traffic on your own server)
and that would simply requiring (amongst others) the rewriting of the script serving the external ads.
To be honest, if you are relying on a third party (providing income with ads), you should select a different third party OR if you have been creating your own script or code (to serve external ads to provide income), you should optimize the code/script.
In many ways, I have the feeling that all the alterations in the world cannot change your server´s performance, as long as the code/script (serving ads) is not optimal.
Please explain the factual situation in more detail and/or provide some of the output logs.
Kind regards.....