I'm also stuck because of the 32000 blogs limit right now. I've stopped advertising and I'm stitting around 27000 blogs until I find a solution.
After a lot of investigation, I'm leaning towards solution based on apache mod_proxy working in reverse mode.
The problems with only hashing the blog_id for directories, is that it doesn't solve the problems of running out the resources of the server (disk space, CPU, ram).
Disk space can be solved with complex NFS stuff (and also network consuming, almost necessarily resulting in a VPN setup etc.).
CPU and RAM on the DB side can be solved by trying to work out the mutliple DB system that's half written in wpmu.
Solving performance problems on the php side would probably mean using a load balancer, but I don't want to start understanding the mess it would be with HTTPs set up to serve any request, each HTTP having on its file system the files of some of the blogs (but not necessarily the files for the blog that it's currently processing a request for), and connecting to a different DB on a different server, except for the main tables of course which are only located on one server.
This sounds like a real mess and web of connections.
The mod_proxy solution has many advantages:
the idea is that based on the blog name, it will be hosted on one server. Everything, the files, the specific database tables, etc. on the same server.
Too many blogs -> multiple servers.
Then there is main server that receives all requests, and with a couple of mod_rewrite assertions, it's used as a reverse proxy and connects to the appropriate server based on the blog name, then returns the results to the end user, for who everything seem to be coming from the same place.
A bit of DNS juggling is necessary to make all this work, but it also solves the 32000 folders issue.
If you want to host more than 32000 blogs on one server, it's possible with a little more DNS juggling. Another advantage is that locally, wpmu works as a single instance (except for the main set of tables), which means you don't have to modify the code for storing images, and finding out which specific database to use.
Anyway this is the simplest way I've found to make wpmu work on multiple servers, without having to mess with NFS etc. I'm currently experimenting with it, but I need to complete the separation of connections to specific DB and global DB.
Regarding my current mysql config (I have a similar server to yours), here it is:
[root@ns6098 root]# more /etc/my.cnf
[mysqld]
safe-show-database
max_connections = 500
key_buffer = 1024M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 500
thread_cache_size = 256
wait_timeout = 900
tmp_table_size = 64M
connect_timeout = 10
max_allowed_packet = 32M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 64M
thread_concurrency = 4
query_cache_limit = 4M
query_cache_size = 512M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
skip-innodb
skip-networking
long_query_time=10
log-slow-queries = /var/log/mysql/slow-query.log
ft_min_word_len=3
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
ft_min_word_len=3
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
with these settings I stand around 3 gigs of RAM used. CPU is only a problem when WPMU somehow crashes. Randomly some blogs seem to be not responding anymore. I don't know what the users did on them that's messing up things, but I know that requests on those blogs stick the apache process in the 100% CPU area, until it's killed. Probably does it come from the specific version of WPMU I'm using, I need to upgrade to a more recent one but I've made many modifications to it and this is going to be some work.
Also sometimes CPU hits 100% when a user has the good idea to define an RSS feed widget with his own blog feed. This seems to create an infinite loop that isn't checked by wordpress.
Also, I've had *many problems* with eaccelerator and I wouldn't recommend it for WPMU.
It kept crashing on caching kses.php on a random basis, bringing the whole apache down. I ended up installing APC instead. I had the same problem, but unlike EA, APC has the ability not to cache a specific file, so using that functionnality i was able to remove kses from cached files and since that moment I've never had any more problems with it.
Anyway, it'd be great if other hosts reaching the dreaded 32000 blogs limit shared how they go through it.