Operating System - HP-UX
1753797 Members
8248 Online
108805 Solutions
New Discussion юеВ

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

 
SOLVED
Go to solution
Tiziano Contorno _
Valued Contributor

About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

Hi, when a system reach the default 50% of physical memory allocated for the buffercache and the other 50% for system+user processes, it reaches 100% memory allocation. Now my thinking was that you still have memory to allocate for user+sys procs, because the buffer cache is dynamic, and it is automagically deallocated by OS. Is this true? If I have 100% memory allocation, but 50% for buffercache, should I worry bout it?

Thank you and regards,
Tiziano.
12 REPLIES 12
Tiziano Contorno _
Valued Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

I checked (glance "d" option) the cache hit rate and it seems perfect:

Read Cache Hits 394 99.7 22226096 99.9 100.0
Write Cache Hits 20 50.0 786281 87.3

100% for reads and 50% for writes, now I'm at 100% memory allocation, my question is: tune down the max buffer cache or keep it like it is because if the user-sys procs require more memory it will be automatically deallocated?

Tiziano.
Steven E. Protter
Exalted Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

Shalom Tiziano,

buffer cache does dynaically allocate between the dbc_min_pct and the dbc_max_pct in the kernel.

There is a huge performance penalty whenever the buffer cache changes so most folks set both numbers at a fixed figure that works for their server.

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
Tiziano Contorno _
Valued Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

From the user-sys procs point of view is there still allocatable memory (even if it is at 100% but 50% for buffer cache)? This is what I mean.
Tiziano Contorno _
Valued Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

I forgot to thank you :P
Hein van den Heuvel
Honored Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

Tiziano,

You mention of dbc_max_pct, and not filecache* implies that you are not on 11.31 yet, but you did not specify the exact version. This is important

The performance impact SEP refers to has been getting less important as HPUX has improved over time over the various releases.
On 11.31 you would pretty much no longer need to worry about it.

Now whether the you have to worry about 50% buffer cache can not be determined by looking at the buffer cache, but rather at the VM side where it is potential stealing from.
So you need to look a vmstat, and swapinfo or th glance components to see whether there is (excessive) page in and page out (some is ok).

Whether the cache is big enough can only be answerred if you understand the IO configuration. The purpose of the cache it to reduce the system IO requirements to a level that can be satisfied by the IO system.

If the system requires 10,000 pages per second, and there is 99% cache hit rate, then the IO subsystem needs to deliver 100 pages/sec which even a single disk can do. The cache is big enough or even oversized.

But if the box needs 1,000,000 pages per second then a 99% hit rate still leaves 10,000 real IO/sec and you'll either need a whopping serious IO system with several fibrechannel connections and 100+ disks behind that, or you need more cache still.

Whether the cache is big enough or too big can almost best be asked to the application users. Is the system 'behaving'? Are the end users happy with the performance?

I would like to encourage you to read up on some of this in the HP UX cookbook (Stephen Ciullo, & Doug Grumann).
Start with a search for reference to dbc_max_pct ... but do not stop there!

http://h21007.www2.hp.com/portal/download/files/unprot/devresource/Docs/TechPapers/UXPerfCookBook.pdf

Enjoy!

Hein.
HvdH Performance Consulting.

Tiziano Contorno _
Valued Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

Thank you Hein, the system behave perfectly.

It's an 11i v2 on PA-RISC.

Ther's no significant page-in page-out activity and low physical IO on the discs, but all the memory is allocated. My question is: if I start a process _now_, will it allocate physical mem (deallocating buffer/cache) or will it be allocated in the swap area of the virtual mem space?

They are afraid that 100% memory allocation means no more physical mem for the user procs, but my knowledge was that buffercache is deallocated for sys/user procs mem.

I've attached some mem and VM stats.
Tiziano Contorno _
Valued Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

Just a note: the free mem in the attached txt was taken now with glance, but the allocation is not at 99-100% at the moment.
Tiziano Contorno _
Valued Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

Hi, anyone willing to elaborate on this:

"They are afraid that 100% memory allocation means no more physical mem for the user procs, but my knowledge was that buffercache is deallocated for sys/user procs mem."

Thank you!
Venkatesh BL
Honored Contributor

Re: About buffer cache allocation, really dynamic? dbc_max_pct dbc_min_pct

buffer cache is a 'cache'. So, the system will reuse those pages during memory pressure. So, anything above dbc_min_pct value of memory can be reused by the kernel for new allocations. The pager daemon 'vhand' is responsible for regulating this.