HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.
Hein van den Heuvel
Honored Contributor
Solution

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

>> "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."

Yes indeed. And that's very effective in general, but can cause performance 'glitches' when the timing is bad, notably on older versions. SEP expresses to be very concerned about this. I'm less concerned, but he clocked more hours with HPUX production systems than I did :-).

The solution is to just try, and force the issue. Dynamically change dbc_max_pct down by a few (2 - 5 procent). That will mimic an increase in user VM demand, and will (best I understand this) reflect the worst case reaction as it gives the cache an immediate need to relinquish versus a gradual increse in pressure in the nor growing process case.

You could also 'play' with a program to malloc (and touch!) 200 - 500 MB of memory and see how the system reacts when at 99% versus when at 90% total user memory.

The delay in my reply was for the want of making the numbers you posted 'add up' and to find a good reference to the meaning of 'Active VM' and the likes. Google and/or The documentation let me down. I could find reference, but did not find any explanation / enumeration of all the columns. Anyone else?

The numbers you posted looked fine, reflecting a happy system (high user to system cpu time ratio, plenty of free pages), but I read your follow up reply as to explain that those numbers were not in the full load situation.

hth,
Hein van den Heuvel
HvdH Performance Consulting
Tiziano Contorno _
Valued Contributor

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

Thank you!

I hope I will be able to do some test as you suggested (decrease max cache or allocating user memory while at 100%).

I keep it open if anyone wants still contribute and for the test results update.

Regards,
Tiziano.
Steven E. Protter
Exalted Contributor

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

I have very little time with HP-UX 11.31 production. Many hours with 11.11, a reasonable amount with 11.23.

It is true, HP has worked on reducing the performance penalty for a system changing its buffer cache rate.

I noticed the system could make changes on 11.31 without a horrible slowdown, but it was still noticeable when it happened.

It was worse with 11.23 and awful with 11.11.

Having all the system memory allocated is not a problem. It is merely utilizing an asset. The trick is allocating it in a way that is best for your environment.

To assist further, I'd need to know the OS level and what third party applications you intend to run.

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