I have a VPS from tocici (via BuildYourVPS). It's got 4 GB of RAM (2 GB of it "burst" RAM).
This server has some severe performance issues, however. First, a quick explanation of what this server runs:
- Debian 5
- Apache (generally up to date)
- fcgi for PHP
- mysqld
- Some other trivial stuff that it runs
- memcached, but...
The webserver mainly serves up MediaWiki. Caching is turned entirely off in MW's configuration; enabling memcached is actually slower somehow, even though memcached reports decent to great hit rates when enabled (60%, then rises to 90% over time).
The biggest chokehold that seems to be strangling my server's performance is just disk i/o. It's so bad that even a simple ls
can take forever:
xkeeper@localhost:~/logs/wiki.rustedlogic.net$ time ls /root . .. .aptitude [...] real 0m0.766s xkeeper@localhost:~/logs/wiki.rustedlogic.net$ time ls /usr/ . .. bin games include lib local sbin share src X11R6 real 0m1.460s user 0m0.000s sys 0m0.004s
At some times it can get really bad, like this. It's gone further, but...
xkeeper@localhost:~$ time ls /etc/log ls: cannot access /etc/log: No such file or directory real 0m3.887s
The iowait can be so awful at times that even restarting mysqld
will actually fail because it times out. (Attempting to /etc/init.d/mysqld restart
again will work, though, usually much faster).
I'm at a loss for what to do next.
Here is a chart from Monit showing the CPU usage at this particular time (the drop at the right being when I restarted Apache and MySQL):
The server isn't exactly choking on RAM, either. Trying to search for a way to increase caching (outside of increasing MySQL's key cache and other things) has proved mostly fruitless; even with outright doubling the cache sizes in MySQL it doesn't seem to have made much of an impact yet.
If you think it will help, you can also view the full stats page with rolling charts.
Running iostat
:
avg-cpu: %user %nice %system %iowait %steal %idle 0.00 0.00 0.00 99.18 0.00 0.82 13.82 0.00 0.88 941878736.18 0.00 142.11 0.69 0.00 0.69 6.21 0.00 92.41