Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

限制网站硬件资源用量 #106

Closed
Dream4ever opened this issue Nov 16, 2020 · 0 comments
Closed

限制网站硬件资源用量 #106

Dream4ever opened this issue Nov 16, 2020 · 0 comments
Labels
Server The invisible hero

Comments

@Dream4ever
Copy link
Owner

Dream4ever commented Nov 16, 2020

需求

由于 某网站 CPU 占用过高原因排查 这次事故的出现,就需要给各个网站设置一定的硬件资源配额,以免一个网站出问题,将其他网站都拖垮。

限制网站 CPU 用量

比如要将一个网站所使用的 CPU 限制在 30% 的水平上,按如下流程进行操作即可:

打开 IIS 管理器 → 展开服务器节点 → 点击应用程序池 → 右键点击要设置 CPU 配额的网站 → 点击“高级设置”

在 CPU 一项中,“限制”这里填入 30000,将其除以 1000 后再以百分比作为单位,就是 30%。

限制操作选择 Throttle,表示严格将该网站所能使用的 CPU 资源限制在该水平。ThrottleUnderLoad 表示如果 CPU 空闲,网站可以使用超过限额的 CPU,这不满足我们的需求,所以不选该项。

限制网站内存用量

目前尚未配置,如必须实现该需求,可按文章 Managing IIS Server Memory Usage 中所说的方法进行操作。

但是 IIS Best Practices 这篇文章给出的建议,又说尽量不要限制网站内存用量,目前网站用的内存也不多,那就先不管了。

@Dream4ever Dream4ever added the Server The invisible hero label Nov 16, 2020
@Dream4ever Dream4ever changed the title Windows 服务器 IIS 网站设置硬件资源配额 限制网站硬件资源用量 Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server The invisible hero
Projects
None yet
Development

No branches or pull requests

1 participant