views:

86

answers:

2

Hi all,

is there any way to throttle the cpu usage of a windows service that is written in .NET, either inside the service code or outside. Setting the current thread to the lowest priority is not an option but as soon as exceptions start to occur the cpu load goes up, is it possible to limit this?

thx in advance,

greetings

+4  A: 

You need to take a closer look at your application. Why is it throwing exceptions, and why are those exceptions using so much CPU?

Justin Ethier
A: 

These days’ memory band-width and usage of the processor cache is as match of a problem is CPU time.

I don’t know of a OS that has kept up...

You could try using a Thread.Sleep to sleep for 50% of the wall time, messy but may work.

Ian Ringrose