Virmach 正确打开方式

/ 0评 / 0

Virmach 很便宜,限制也很多,不是老司机随便翻车.
限制条款如下:

  1. High CPU: Customer’s Service cannot burst to 95-100% usage for more than five (5) minutes and cannot average higher than 50% usage within any two (2) hour period. Packages advertised to include dedicated CPU, Services with the high CPU option, and any customized Service plans that include high CPU option may burst to 100% at all times.
    高CPU占用: 客户的VPS不能占用95%~100%超过5分钟或者两小时内平均超过50%.
  2. High Load: Customer’s Service cannot have a 15-minute load average higher than the number of full logical cores assigned and cannot have a 1-day load average higher than 70% of the number of full logical cores assigned.
    高负载: 客户的VPS不能高于所分配核心数15分钟,或者一天内不能高于平均70%.
  3. High Mail Volume: VirMach reserves the right to block port 25 on Customer’s Service. Customer cannot send more than 100 maximum e-mails per hour, and must maintain a similar average volume of mail on a week-to-week basis—no bursting permitted. VirMach reserves the right to waive this requirement for the purpose of a customized Service plan.
    高邮件发送: Virmach保留屏蔽25端口的权利.客户不能发送高于100封邮件/小时,或者是每周不能超过16800封,没有突发值.
  4. High I/O: Customer’s Service cannot average more than 80 IOPS within any two (2) hour period, cannot burst above 300MB/s disk write average for more than ten (10) minutes, cannot average more than 300 write operations per second for more than 1 hour, and cannot be above 20% average utilization within any six (6) hour period.
    高I/O占用: 客户的机型在2小时内不能超过平均80IOPS,10分钟突发值不能超过300MB/s,平均值超过300次/秒持续时间不能超过1个小时,6小时内不能高于20%平均利用率.
  5. High Network Usage: Customer’s Service cannot have more than 50,000 conntrack sessions at any given time, and cannot use more than the allocated bandwidth. Customer understands that the network is shared and utilizing maximum network speed will not always be possible.
    高网络占用:客户机型在任何时间内不能超过50000链接, 不能超过分配的带宽; 客户同意所标注网络值为共享值,在实际使用中并非总能达到最大速率.

apt-get install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1 cpulimit
针对第一个,对CPU进行限制.在cron添加cpulimit限制,把高占用限死.我保守一点,就让他一直只有40%的CPU.加入Cron,每分钟跑一次,把所有程序拉到里面.

cpulimit --pid `ps aux | awk '{print $2}'` --limit=40

针对第二个,是Load Avg,如果CPU一旦限制,再加上这么便宜的,基本单线程,没办法提上去,所以也解决了.
针对第三个,是你自己发邮件,这个控制不了
针对第四个,使用cgroup管理一下IO,2小时不得超过80,这简直是超级机械钻石盘.不过实际上,不要长时间占用,一般没人管.
 
.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注