1829767 Members
5882 Online
109992 Solutions
New Discussion

bufpages

 
SOLVED
Go to solution
Terry Gibbar
Advisor

bufpages

Dynamic buffer cache allocation is enabled if the bufpages kernel parameter is set to zero. I'm a little confused as to how much memory is allocated to buffer cache and how it is determined. I have a couple of servers with similar configurations, but with totally different buffer cache amounts. I'll include what the current settings are and hopefully someone can shed some light to as why they are so different.

server 1: (Makes sense to me)
kernel parameters
nbuf = 0
bufpages = 0
dbc_max_pct = 40

Total Physical Memory = 1.50 GB

Buffer Cache = 614

server 1: (Doesn't Makes sense to me)
kernel parameters
nbuf = 0
bufpages = 0
dbc_max_pct = 40

Total Physical Memory = 1.25 GB

Buffer Cache = 159 MB

Why the huge difference in Buffer Cache?

Inside Pitch, Gone.
12 REPLIES 12
Brian M. Fisher
Honored Contributor

Re: bufpages

Buffer cache only gets used as needed the kernel parameter dbc_max_pct = 40 define the max. percentage of memory that can be used for buffer cache. The amount is NOT set aside initially, it grows as required. The buffer cache will also vary between dbc_min_pct & dbc_max_pct.

Brian
<*(((>< er
Perception IS Reality
melvyn burnard
Honored Contributor

Re: bufpages

As it's name implies, Dynamic Buffer Cache can change dependant upon system load.
On the first node, the buffer cache is at 40% of 1.5Gb, or 600 Mb give or take a few Mb.s
On the second node the setting allows for 40% of 1.25Gb or 500Mb, if it needs it!

HtH
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
CHRIS_ANORUO
Honored Contributor

Re: bufpages

Terry,
As the setting of nbuf and bufpages have been set to zero,this causes the dynamic function of buffer cache paging increasing from the set minimum of 5% to set maximum of 40%. The second server's buffer cache is yet to grow to the maximum of 40% of Physical memory. It is behaving fine.

Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Terry Gibbar
Advisor

Re: bufpages

Thanks guys..... Please let me know if the following makes sense.

In the case of Node 1, the server has been up for 32 days and therefor the system has requested more memory for buffer cache.

In the case of Node 2, the server has been up for 2 days and therefor the system has not requested much memory for buffer cache.

One additional question:
1) If free memory is running low, does the system take back from the memory that has been allocated for buffer cache?
Inside Pitch, Gone.
Andy Monks
Honored Contributor

Re: bufpages

Terry, that's about right. If you've done a backup, that will usually increase the buffer cache quite a lot.

As freemem reduces, the buffer cache will get smaller. However, freemem as to go below about 7MB for that to start.
melvyn burnard
Honored Contributor

Re: bufpages

to all intents and purposes yes you ar ecorretc.
The answer to the question is that if the requirement for buffer cache drops, it will be released back to free memory and the system will then use it.
However, If the buffer cache decides it needs the space, then it does not get released, and you could end up with performance issues due to lack of free memory.
HTH
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
CHRIS_ANORUO
Honored Contributor
Solution

Re: bufpages

Yes, it takes it back. If memory is full and the buffer cache is large, this will most likely cause paging, since the buffer cache typically shrinks slower than the rate at which new memory is needed.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Wodisch
Honored Contributor

Re: bufpages

Terry,
since HP-UX can only make use of up to 400MB of buffer cache (if I
remember right), do NOT use "dbc_mac_pct", but use "bufpages" and
"nbuf" to allocate only that much RAM for it. You are wasting it, right now!
melvyn burnard
Honored Contributor

Re: bufpages

The information in the last post re 400Mb max buffer cache is incorrect.
If a system has 4Gb Ram, and the dbc_pct_max setting is left at default, the system can use up to 2Gb of RAM for buffer cache. This does present some performance issues unfortunately, but it will use the 2Gb if it needs to.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Jim Welch
Respected Contributor

Re: bufpages

you can also force the buffer cache to be a fixed value by setting
dbc_max_pct = dbc_min_pct, then you can benchmark your system and
verify what settings provide the best performance on your system with your applications.
Any sufficiently advanced technology is indistinguishable from Magic - Arthur C. Clarke
Andrew Sobb
New Member

Re: bufpages

Following on from this discussion. I have a server which has bufpages set and dbc parameters set. Does this mean that dynamic buferring is DISABLED and that the server will always reserve 785920 pages of memory for buffer cache regardless of the dbc parameters?

bufpages 785920
nbuf 608615
ndilbuffers 30
dbc_max_pct 50
dbc_min_pct 5
Andrew Sobb
New Member

Re: bufpages

Regarding my previous question. Further investigation has revealed that the bufpages and nbuf parameters are set to zero but "sysdef | grep buf" has returned bufpages as the approximate value of the dbc_max_pct of the total memory in the host.

Andrew