降低Linode disk io rate的一个可行方法

最近老是收到Linode Alert – disk io rate邮件提醒,如下:

Your Linode, linodexxxxxx, has exceeded the notification threshold (1000) for disk io rate by averaging 1714.41 for the last 2 hours. The dashboard for this Linode is located at:

This is an automated message, please do not respond to this email. If you have questions, please open a support ticket.

You can view or change your alert thresholds under the “Settings” tab of the Linode Manager.

This is not meant as a warning or a representation that you are misusing your resources. We encourage you to modify the thresholds based on your own individual needs.

虽然网上有人建议,直接在后台关闭提醒或者提高触发提醒的值,比如最高可以跳到10000,但是觉得这总不是解决的办法。

我装的是ubuntu系统,通过iotop,这个命令发现频繁读写的就是 php-cgi — /usr/local/php/etc/php-fpm.conf这个进程,本来是想是不是wordpress的一些插件导致的,停掉了一些可疑的插件,结果还是很高。后来突然意识到,既然是php的配置问题,何不升级php版本试一下。我安装的是lnmp0.9,于是按照提示将php版本升级到了5.3.22,将Nginx也升级到最新的版本1.2.7,升级完之后进入linode的控制后台,发现disk io rate已经降低到两位数了,大喜!呵呵。

linode io rate

 

红圈是升级后的图形

如果你也遇到linode io rate高的问题,不妨试一下这个方法。