Wednesday, July 16, 2008

Your NFS server needs more RAM when...

... sometimes all your NFS processes are in the 'D' state (which essentially means the process is waiting for I/O).

(there is a picture here)

My usual strategy for busy NFS servers (or other file servers) is to have enough RAM to cache about 10% of the data it's serving. This box is serving about 600G of data with 16G of RAM (of which 1/4 is gone to MySQL). I won't likely get any money for RAM soon, so my strategy in solving this bottleneck is to move that huge 4.5G mysql process to another box (now that I have spare hardware). The RAM freed by this move will all go to file cache, thus reducing the load on the disks.

Mixing server roles on one box is never a good idea, but when I have to, I try to combine services that won't fight for the same resources. DB servers are mostly CPU-bound, whereas file serving is I/O-bound. In this case, it has worked well for the first couple of years; however, as traffic (and data size) has increased, both the DB and the file server are fighting for precious RAM, and so they must be split.


Post a Comment

<< Home