Operating System - HP-UX
1832891 Members
2480 Online
110048 Solutions
New Discussion

Re: How te reduce buffer cache ??

 
SOLVED
Go to solution

How te reduce buffer cache ??

Hi,

I've an HP-UX N4000 system with 4 GB RAM.
When i display informations about memory (by glance) i've this :

Total VM : 92.6mb Sys Mem : 206.3mb User Mem: 744.3mb Phys Mem: 4.00gb
Active VM: 58.2mb Buf Cache: 2.00gb Free Mem: 1.07gb

The Buf cache is fixed at 2 gb.

Is it possibile to reduce it? how?
Is there any doc to manage memery parameters ??

Regards
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: How te reduce buffer cache ??

You need to check you dbc_min and dbc_max parameters, the max defaults to 50% of RAM.

Pete

Pete
Pete Randall
Outstanding Contributor

Re: How te reduce buffer cache ??

Actually, there's a little more to it - from SAM's help on configurable kernel parameters:

bufpages interacts with XYX as follows:

* bufpages = 0, nbuf = 0: Enables dynamic buffer cache.

* bufpages not zero, nbuf = zero: Creates bufpages/2 buffer
headers and allocates (bufpages x4 Kbytes) of buffer pool
space at system boot time.

* bufpages = 0, nbuf not zero: Allocates nbuf*2 pages of buffer
pool space and creates nbuf headers at boot time..

* bufpages not 0, nbuf not zero: Allocates bufpages pages of
buffer pool space and creates nbuf buffer headers at boot time.
If the two values conflict such that it is impossible to configure a
system using both of them, bufpages takes precedence.

bufpages controls how much actual memory is allocated to the buffer
pool. See nbuf.



Pete

Pete
eran maor
Honored Contributor

Re: How te reduce buffer cache ??

Hi

change the kernel param of :
dbc_max_pct to 10 .

the default param is 50 is it is a lot .

if your server is a nfs server reduce it to 20
but 50 it is too much .
love computers
G. Vrijhoeven
Honored Contributor

Re: How te reduce buffer cache ??

Hi,

It is possible to reduce the limit, you can go for two seperate options, I am afraid it requiers a reboot:

the dbc_max_pct/dbc_min_pct option with is dynamic. can be set

and with bufpages:

check out:

http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparams.OverviewAll.html

Gideon
Pete Randall
Outstanding Contributor

Re: How te reduce buffer cache ??

And more info from SAM:

If bufpages is zero at system boot time, the system allocates two
pages for every buffer header defined by nbuf. If bufpages and
nbuf are both zero, the system enables dynamic buffer cache
allocation and allocates a percentage of available memory not less
than dbc_min_pct nor more than dbc_max_pct , depending on
system needs at any given time.

The maximum amount of memory that can be allocated to the buffer
pool is also affected by the amount of memory allocated to the system
for other purposes. Thus, modifying parameters that affect system
memory may also affect the maximum amount of memory can be
made available to the buffer pool.


Pete

Pete
Stefan Farrelly
Honored Contributor

Re: How te reduce buffer cache ??

dbc_min and max are for dynamic buffer cache, which is only on depending on what 2 other kernel parameters are set to, nbuf and bufpages. Heres the rules;

nbuf interacts with bufpages as follows:

bufpages = 0, nbuf = 0: Enables dynamic buffer cache. [dbc_min_pct and dbc_max_pct]

bufpages not zero, nbuf = zero: Creates BufPages/2 buffer headers and allocates bufpages times 4 Kbytes of buffer pool space at system boot time.

bufpages = 0, nbuf not zero: Allocates Nbuf*2 pages of buffer pool space and creates Nbuf headers at boot time..

bufpages not zero, nbuf not zero: Allocates BufPages pages of buffer pool space and creates Nbuf buffer headers at boot time. If the two values conflict such that it is impossible to configure a system using both of them, bufpages takes precedence.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Tom Jackson
Valued Contributor

Re: How te reduce buffer cache ??

That's a lot of cache!

Try looking at nbuf and bufpages kernel parameters. Go to SAM/Kernel Configuration/Configurable Parameters. Both values on my system are set to 0. This allocates 10% of available memory.

Tom