I would want to put forward my case in detail.
My website www.thehardtackle.com receives around 5000-10000 pageviews every day since 4th August. The server was a VPS with 1 GB memory, 800 GB Bandwidth. I have not installed any cache plugins and that is why used to get DB error at times when the website experienced spikes.
25th August onwards, the rate of DB errors increased and my host told me that the memory is very low and Ishould upgrade and optimise. So I upgraded to 1.5 Gb Memory, 1 TB Bandwidth.
I optimised my database tables and removed one particluar post that was too heavy. Removed the revioion history as well.
After this the website did get up, but went down any time (even with low traffic conditions)
I upgraded to latest WP version, deactivated any plugin that I installed around 25th or even before.
The problem still persisted. I had installed phpwiki for testing purpose near 25th, so I thought that could be a problem and removed the whole phpwiki installation from the server.
In the mean time (2 days back) my host informed me that someone is using my server to send spam emails. My email's I previously shifted to Google APPs and none of the WP users had the email id the host provided me.
I am still facing the breakdowns due to out of memory! And I donot even know whether the spamming is the reason or something is wrong with wordpress. I have increased the memory limit in php.ini to 256(writing this after changing the limit), it was 128 previously.
I have facebook Iframes on Sidebars as well as homepage, I dont know what to do. Installing cache is an option but that would not correct the root cause of the problem.
UPDATE: The host says that the spamming is not a problem, either that got solved due to phpwiki deletion or it was never really there.
Anyways, I still get out of memory errors 2-4 times a day. With 6000 page views.
While researching on the internet, I found this issue, which looks like close to my problem. It basically says that large databases face problems in WP; slow queries etc. I have a relatively small database, but I am facing DB errors after upgrading to 3.1 (right now I am on 3.2.1)
I have disabled almost all the plugins that are not compatible with WP 3.2.1, and installed WP Super Cache (I still got one out of memory error and had to restart).
The current memory usage is
'total used free shared buffers cached `
` 1536 954 581 0 24 208`
TOP processes with memory utilization -
3276 mysql 15 0 590m 78m 3024 S 0.0 **5.1** 0:30.31 mysqld
1496 root 15 0 112m 33m 2120 S 0.0 **2.2** 0:04.38 spamd