Strictly from a MySQL Point-of-View, I have suggestions on how to improve caching of data/indexes for a MySQL Instance.
Keep in mind that there are two major Storage Engines for MySQL
Their caching mechanisms are different. There is something that you can do to tune for the Storage Engine of your choice.
MyISAM
MyISAM only caches index pages. It never caches data. You can do do two things to improve I/O for MyISAM tables.
MyISAM Improvement #1
Any MyISAM table that has VARCHAR columns can be internally converted to CHAR without touching the initial design. Suppose you have a table called mydb.mytable and you want to improve I/O for it, perform the following on it:
ALTER TABLE mydb.mytable ROW_FORMAT=Fixed;
This will increase the size of the table 60%-100% but will yield a 20-30% performance increase in I/O without changing anything else. I wrote about this before in the DBA StackExchange:
MyISAM Improvement #2
You need to increase the MyISAM Key Cache (as sized by key_buffer_size). Run this query, please:
SELECT CONCAT(ROUND(KBS/POWER(1024,
IF(PowerOf1024<0,0,IF(PowerOf1024>3,0,PowerOf1024)))+0.4999),
SUBSTR(' KMG',IF(PowerOf1024<0,0,
IF(PowerOf1024>3,0,PowerOf1024))+1,1))
recommended_key_buffer_size FROM
(SELECT LEAST(POWER(2,32),KBS1) KBS
FROM (SELECT SUM(index_length) KBS1
FROM information_schema.tables WHERE engine='MyISAM' AND
table_schema NOT IN ('information_schema','mysql','performance_schema')) AA ) A,
(SELECT 2 PowerOf1024) B;
This will show you the ideal key_buffer_size based on your current dataset.
InnoDB
InnoDB caches both data and indexes. If you converted all you data to InnoDB and are currently running WordPress from an all InnoDB database, you need to size your InnoDB Buffer Pool (sized with innodb_buffer_pool_size). Run this query, please:
SELECT CONCAT(ROUND(KBS/POWER(1024,
IF(PowerOf1024<0,0,IF(PowerOf1024>3,0,PowerOf1024)))+0.49999),
SUBSTR(' KMG',IF(PowerOf1024<0,0,
IF(PowerOf1024>3,0,PowerOf1024))+1,1)) recommended_innodb_buffer_pool_size
FROM (SELECT SUM(data_length+index_length) KBS FROM information_schema.tables
WHERE engine='InnoDB') A,
(SELECT 2 PowerOf1024) B;
This will show you the ideal key_buffer_size based on your current dataset.
Projections
If you project that you dataset will grow 20 times as much, just multiple what this query recommends by 20. Suppose your MyISAM dataset is 15MB and 3MB is the sum of your indexes. If you estimate that you will have 20 times as much data, set the key_buffer_size to 60MB like this in /etc/my.cnf:
[mysqld]
key_buffer_size=60M
then restart MySQL. The same thing would apply to the InnoDB Buffer Pool.
If all your data is InnoDB, you need to perform a full Cleanup of your InnoDB infrastructure which I posted in StackOverflow.