It's a strange place to be in the clouds, yesterday accidentally found in the application pool recycling settings for IIS, only set the recovery based on virtual memory limit, which caused the CPU to have regular fluctuations. In this blog post, we will report the small discovery on the way to cloud computing.
Before we used the Ali server (virtual machine) encountered a dilemma:
If you open the virtual memory paging file, will cause high CPU, in high concurrency will cause CPU 100%, the system does not respond to the fault, see cloud Computing Road-Ali Cloud: Enable Windows virtual memory raised CPU 100% failure.
If the virtual memory paging file is turned off, it will cause Windows to restart automatically if the virtual memory is not enough for a short period of time, as detailed in the cloud computing road-Ali Cloud: Disabling the reboot caused by Windows virtual memory.
The problem was temporarily solved by adding physical memory (8g->16g), but this is not a long-term solution, and not only does it matter who pays for the extra cost (the Aliyun memory price ratio is inherently low), and even 16G of memory does not guarantee that virtual memory is not enough.
So we turned the focus to how to avoid the problem in 8G memory. The single w3wp process used by our applications consumes about 2G of memory during peak access times, with a total of approximately 5G of memory consumed during the peak of the visit due to the 2 worker processes set up for the Web garden. This may be the case that virtual memory is not enough under the condition of instantaneous large concurrency and GC recovery. In response to this situation, we have taken two measures:
Cancel the Web Garden, using only 1 w3wp.
Set the application pool recycle policy to force a recycle when the memory consumed by the w3wp process reaches a certain value.
The Application pool recycle policy setting is shown in the following illustration:
As you can see from the illustration above, the recycle strategy is to force a recycle when the w3wp process consumes more than 6G of virtual memory.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/cloud-computing/