The CPU usage of the site has been monitored in the last two days. If you want to restrict the site to a maximum of three cores on a 4-core server, you can set the maximum CPU usage of the site to 75%;
(1) Use scheduled tasks to regularly execute the following powershell scripts;
<# Script's function: Set affinity of w3wp.exe to cpu1, cpu2, cpu3 Script Editor: snil Date: 2014-08-08 refer to website: http://technet.microsoft.com/zh-cn/subscriptions/index/system.diagnostics.process.processoraffinity http://waynes-world-it.blogspot.com/2009/06/processor-affinity-on-windows-server.html #> $ w3wps = Get-process-processname "w3wp" foreach ($ w3wp in $ w3wps) {$ w3wp. processoraffinity = 0x0e}
For an explanation of "0x0e", refer to: http://technet.microsoft.com/zh-cn/subscriptions/index/system.diagnostics.process.processoraffinity
(2) manual operation designation; (this method is time-sensitive and requires manual operation once a day, which is temporary ;)
1. Open the resource manager and find the site to be qualified. Right-click and select "set affinity ..."
650) This. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-Right: 0px; "Title =" image "border =" 0 "alt =" image "src =" http://img1.51cto.com/attachment/201408/8/907015_1407467656UFTo.png "Height =" 149 "/>
2. Check the specified CPU and click OK;
650) This. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-Right: 0px; "Title =" image "border =" 0 "alt =" image "src =" http://img1.51cto.com/attachment/201408/8/907015_1407467657aRCk.png "Height =" 244 "/>
(3) Use wsrm limitation. (This function is not recommended. The wsrm function has been canceled after server 2012 and is replaced by some hyper-V functions)
This article from the "fate with wishes" blog, please be sure to keep this source http://281816327.blog.51cto.com/907015/1537320