Monday, May 19, 2014

Excessive Disk IO/CPU Wait Time on Sophos

I'v used Sophos(formerly Astaro) for years.  Recently though I'v had some performance issues.  I run it in a VM and the system has been slow to respond to new requests as of late.  Logging into the admin interface was even worse.

Rejoice though for I have found the solution.  If the reporting database becomes corrupted from a power failure or something similar the system will still work as expected but the postgresql process will churn away trying to query the invalid data.  This data isn't particularly important as its just the reporting data, and not even all the reporting data at that.  As far as I can tell its mostly used for the Web Protection reporting.

Anyway its a quick fix to reset the database and fix the high Disk IO issue.  Just log into the console and run the following command to remove and recreate the corrupted data.

sudo /etc/init.d/postgresql rebuild

You can run the following command first to verify that this is an issue.  If you see a high cpu-wa value that is constantly over 95 that you have some data corruption issues.  (Its the second to last column.)

vmstat 5

No comments: