开发者

throttle cpu usage of a web request

开发者 https://www.devze.com 2023-03-06 09:30 出处:网络
I have a website where every 20 minutes or so a very expensive page is hit which pegs the cpu at 100% and all my users suffer. The responsiveness of th开发者_开发问答is page is not important so I was

I have a website where every 20 minutes or so a very expensive page is hit which pegs the cpu at 100% and all my users suffer. The responsiveness of th开发者_开发问答is page is not important so I was wondering besides Thread.Sleep(), is there was a good way to stop this request from eating the cpu?

Cheers!


Set the Thread.Priority to Lowest. The CPU utilization will still be 100%, but higher priority threads will not suffer much.

0

精彩评论

暂无评论...
验证码 换一张
取 消