High CPU usage on AWS Micro Instance

For a while now, I’ve been experiencing a high CPU usage on my AWS instance. I have a monitoring Alarm which after so many repetitions shuts down the instance. This was becoming rather annoying. Every time I would jump on the box and do a top the user and system CPU percentages were low, the idle time (%id) was high and the steal time (%st) was 0 (relevant to virtual machines). I then noticed that the %wa was high. I’ve generally never looked at this particular statistic, but after a bit of Googling I found that this is the IO Wait time. Also viewing the commands that were running again with low user and system percentages was a process called apt-xapian-index. After a bit more googling I found that this process can lead to a lot of IO, which AWS micro instances aren’t designed for. Therefore I’ve decided to uninstall this process (taking a SNAPSHOT before hand) so that I can rollback if I find this causes issues. Here is the command I used to uninstall it.

sudo apt-get autoremove --purge apt-xapian-index

Since I’ve done this, to date I haven’t experienced any high CPU loads (that I’m not expecting) so I will continue to monitor and update if there are any side effects of uninstalling this.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.