-
Notifications
You must be signed in to change notification settings - Fork 6
限制网站硬件资源用量 #106
Copy link
Copy link
Closed
Labels
ServerThe invisible heroThe invisible hero
Description
需求
由于 某网站 CPU 占用过高原因排查 这次事故的出现,就需要给各个网站设置一定的硬件资源配额,以免一个网站出问题,将其他网站都拖垮。
限制网站 CPU 用量
比如要将一个网站所使用的 CPU 限制在 30% 的水平上,按如下流程进行操作即可:
打开 IIS 管理器 → 展开服务器节点 → 点击应用程序池 → 右键点击要设置 CPU 配额的网站 → 点击“高级设置”
在 CPU 一项中,“限制”这里填入 30000,将其除以 1000 后再以百分比作为单位,就是 30%。
限制操作选择 Throttle,表示严格将该网站所能使用的 CPU 资源限制在该水平。ThrottleUnderLoad 表示如果 CPU 空闲,网站可以使用超过限额的 CPU,这不满足我们的需求,所以不选该项。
- 关键字:
iis limit cpu usage - IIS 8.0 CPU Throttling: Sand-boxing Sites and Applications
限制网站内存用量
目前尚未配置,如必须实现该需求,可按文章 Managing IIS Server Memory Usage 中所说的方法进行操作。
但是 IIS Best Practices 这篇文章给出的建议,又说尽量不要限制网站内存用量,目前网站用的内存也不多,那就先不管了。
- 关键字:
iis limit memory usage - Managing IIS Server Memory Usage
- How to limit the memory used by an application in IIS?
- IIS Best Practices
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ServerThe invisible heroThe invisible hero