I've been looking at enabling the CPU Limit for a website.
Under Advanced Settings for the appropriate Application Pool I set
CPU Limit: 95000
Limit Action: NoAction
Limit Interval: 5
After leaving this for a night, I checked the event logs to see how often that the worker process would have been recycled. To my horror it would have done so every few minutes, implying the server was maxed out for much of the night which is incorrect, logged total cpu usage never gets over 50%.
Using Task manager, Resource Manager and PerfMon during the day and adjusting the above values, they all agreed that overall cpu usage averaged 13%, however PerfMon differed when you looked at the individual process cpu usage (counter: Process\% Process Time(w3wp) reporting 30%-40% average. This counter managed to reach the high 300% which after reading here is because its a sum of all usage across all cores and not normalised like the other counters.
Now my problem appears that the IIS CPU limiting bases its decision on this counter and thus wants to wrongly recycle the process.
This is a windows 2008 x64 standard edition installation on bare metal, quad core, IIS is the only role installed. I've configured both the BIOS and windows power management for performance as I wondered if the ramping up/down of the cpu speed might have affected this but it hasn't.
I don't need to diagnose high cpu usage, we just want to have the process correctly recycled if it ever reaches a high level.
I assume I must have missed some dependency setting elsewhere, and now at a loss as how to correctly implement this cpu limiting.