31.9. Tuning the buffermem

Another helpful tuning hint is to tell Linux the following: Use a minimum of 60 percent of memory for the buffer cache; only prune when the percentage of memory used for the buffer cache gets over 10 percent (this parameter is now unused); and allow the buffer cache to grow to 60 percent of all memory (this parameter is also unused now).

The default setup for the buffermem parameters under Red Hat Linux is:

        "2 10 60"

Under Version 6.1 To change the values of buffermem, type the following command on your terminal:

        [root@deep ] /# echo "60 10 60" >/proc/sys/vm/buffermem
You can put the above command in the /etc/rc.d/rc.local script file and avoid typing it again the next time your system reboots. You can find full details in the 2.2 kernel documentation in the file linux/Documentation/sysctl/vm.txt a nd also, you can check General System Optimization, for more information.

Under Version 6.2 Edit the /etc/sysctl.conf file and add the following line:

        # Improve virtual memory performance
        vm.buffermem = 60 10 60

You must restart your network for the change to take effect. The command to restart the network is the following:

        [root@deep ] /# /etc/rc.d/init.d/network restart

        Setting network parameters		[  OK  ]
        Bringing up interface lo		[  OK  ]
        Bringing up interface eth0	        [  OK  ]
        Bringing up interface eth1	        [  OK  ]
Recall that the last two parameters, 10 and 60 are unused by the system so we don't need to change the default ones.