搬瓦工VPS(BandwagonHost)教程系列6-“high CPU usage”限制和解决

搬瓦工 VPS 作为国内来说是性价比较高的商家,在资源管控方面挺严格的。尤其是对CPU的使用限

制。如果你在使用搬瓦工过程中出现服务器速度变慢,或者干脆无法连接,那么其中一个原因是

你的CPU超过使用限制。要确认是否这个问题,你可以登录KiwiVM,如果出现下图




那么就可以确认是CPU 限制的问题。这里我们先说搬瓦工的CPU 使用政策,再讲问题的原因和解决

方法。


首先,根据搬瓦工给出的 TOS,Fair Share Policy – VPS service 一项,也就是关于 CPU 使用的限
制是允许在短时间内可以大幅度的使用 CPU,但是确保 1 小时内的平均 CPU 负载不会超过以下额
度:
Regular plans:(常规套餐)
OVZ 5G Plan: 20% of 1 core
OVZ/KVM 10G Plan: 25% of 1 core
OVZ/KVM 20G Plan: 50% of 1 core
OVZ/KVM 40G Plan: 75% of 1 core
OVZ/KVM 80G Plan: 100% of 1 core
OVZ/KVM 160G Plan: 100% of 1 core + 50% of 2nd core
OVZ/KVM 320G Plan: 100% of 2 cores
OVZ/KVM 480G Plan: 100% of 3 cores
OVZ/KVM 640G Plan: 100% of 4 cores
OVZ/KVM 960G Plan: 100% of 6 cores
OVZ/KVM 1280G Plan: 100% of 8 cores
Promo plans:(特价套餐 部分已经买不到了)
OVZ 3G/128M Promo plan: 10% of 1 core
OVZ 5G/256M Promo plan: 14% of 1 core
OVZ 5G/512M Promo plan: 17% of 1 core
OVZ 30G/4G RAM Promo plan: 50% of 1 core
V3 10G/512M Promo plan: 17% of 1 core
V3 20G/1G Promo plan: 25% of 1 core
V3 40G/2G Promo plan: 50% of 1 core
V3 80G/4G Promo plan: 100% of 1 core
V3 160G/8G Promo plan: 100% of 1 core + 50% of 2nd core
V3 320G/16G Promo plan: 100% of 2 cores
V3 CN2GIA 10G/512M Promo plan: 50% of 1 core
V3 CN2GIA 20G/1G Promo plan: 100% of 1 core
V3 CN2GIA 40G/2G Promo plan: 100% of 1 core + 50% of 2nd core
V3 CN2GIA 80G/4G Promo plan: 100% of 2 cores
V3 CN2GIA 160G/8G Promo plan: 100% of 3 cores
V3 CN2GIA 320G/16G Promo plan: 100% of 4 cores
Micro and Petite plans:(日本东京 1 机房,人称“传家宝”套餐)
OVZ Micro-64 Plan: 10% of 1 core
OVZ Micro-96 Plan: 13% of 1 core
OVZ Micro-128 Plan: 15% of 1 core
KVM Petite-128 Plan: 15% of 1 core
BETA KVM Plan(BETA KVM套餐): 20% of 1 core
当你 VPS 的 CPU 负载长时间超过上面百分比的时候,系统会自动限制 CPU 使用,并且给 
KiwiVM 控制面板发通知,直到 CPU 负载降低限额以下,限制才会自动解除。
下面讲讲解决的方法:
1)如果确实是由于自己开发的程序或者运行的软件长时间占用了相当高的CPU资源,那么你就需
要升级你的配置,这里说一下,是可以升级已经购买的vps到更高的配置,而不需要重新购买一
台,并且IP地址是保持不变的。
2)其实还有大部分原因是,自己的程序没有问题,而是遭到一些蹩脚的攻击,或者植入了挖矿程
序,那些都不能称之为黑客,真正的黑客是不屑于干这些事的。大部分是掌握了一些工具的别有用
心的使用者。他们扫描你服务器或者web容器的漏洞,或者暴力破解了你的ssh 登录密码。
判断入侵有几种快速的方式:
1.如果你的linux  /tmp下含gates.lod,moni.lod文件,应该是被入侵了。

2.如果发现出现/tmp/javax/config.json 文件,vim 查看其内容,可能是挖矿木马的配置文件

3.lsof -i 查看哪些进程在联网

lsof 和 netstat 命令都会列出所有的联网进程。

需要留意那些处于 LISTEN 和 ESTABLISHED 状态的进程,这些进程要么正在等待连接(LISTEN),要么

已经连接(ESTABLISHED)。如果遇到不认识的进程,使用 strace 和 lsof 来看看它们在做什么东西。

用lsof -p pid 就能发现一些蛛丝马迹了。接下来能做的可能只有重装系统,再加强防范,找出自己的漏

洞所在。



评论

此博客中的热门博文

搬瓦工VPS(BandwagonHost)教程系列9-升级(upgrade)和降级(downgrade)

搬瓦工VPS(BandwagonHost)教程系列3-我适合哪个价格vps

搬瓦工VPS(BandwagonHost)教程系列1-优惠券