1834892 Members
2487 Online
110071 Solutions
New Discussion

Re: Bufer cache on linux

 
Edwin Ruiz_2
Super Advisor

Bufer cache on linux

Hi! I have Redhat linux 7.2 and i have 3 GB memory. free command showme only 3 MB free and cached 1.5 GB how can i reduce buffer cache on linux?
5 REPLIES 5
Jerome Henry
Honored Contributor

Re: Bufer cache on linux

Hi,

If you mean buffer itself, you get this on recompiling your kernel.
If you mean cache less, well you have to dig more and check which progeam you run that needs caching...

J
You can lean only on what resists you...
Steven E. Protter
Exalted Contributor

Re: Bufer cache on linux

Procedure for compiling kernel:

cd /usr/src/linux (or wherever the red hat source is)

export DISPLAY=:0

make xconfig

enable all the things you want enabled

save and exit

make dep

make bzImage

make modules

make modules_install

cp /boot/vmlinuz /boot/vmlinuz.prev (you may need to adjust this name for red hat)

cp /boot/system.map /boot/system.map.prev

cp System.map /boot

cp arch/i386/boot/bzImage /boot/vmlinuz

edit /etc/lilo.conf or grub.conf

add an entry for booting vmlinuz.prev and your new kernel

run lilo (if using it)

re-boot.

Note: I'd schedule a Red Hat 7.3 upgrade. Its more stable than 7.2

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Edwin Ruiz_2
Super Advisor

Re: Bufer cache on linux

ok! thans but wich parameters define the buffer cache? i nedd to chance that parameters before.. i think
Steven E. Protter
Exalted Contributor

Re: Bufer cache on linux

This is useful, but not exactly what you asked for:
http://www.ussg.iu.edu/hypermail/linux/kernel/9903.1/0289.html

Also useful but a circuitous way to get where you want:

http://www.linuxhq.com/lnxlists/linux-kernel/lk_9906_01/msg00257.html

Hmmm.
http://www.linux-tutorial.info/cgi-bin/display.pl?286&0&0&0&3


The last one looks good.:

http://www.linux-tutorial.info/cgi-bin/display.pl?287&0&0&0&3

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andy Beal
Frequent Advisor

Re: Bufer cache on linux

Are you sure you want to do this? Linux typically will keep allocating memory into the pagecache and buffercache as long as you don't need it for anything else. I've only found one reason for not letting it do this, and that revolves around a misbehaving kswapd on 2.4.9 (and several versions after that, including RH Advanced Server2.1). The kernel design is to go ahead and use the memory for caching if no data structures are consuming it. I wouldn't worry about it until you start to see swap activity.

Andy