cancel
Showing results for 
Search instead for 
Did you mean: 

Buffer Cache

 
SOLVED
Go to solution
Highlighted
Frequent Advisor

Buffer Cache

Hi guys

I have a Rx7620 server running HP-UX 11.2vi.

I can see from the tool kmeminfo that my buffer cache usage is 4.7GB (29%).

Is there anyway I can find out what data or processes using the buffer cache?

Thanks

7 REPLIES 7
Highlighted
Respected Contributor

Re: Buffer Cache

Hi,

U can use "top" or "glance" command.

BR/
Yaqub
Highlighted
Frequent Advisor

Re: Buffer Cache

Thanks.

But to my understanding top command gives the physical memory usage of processes.

What I want is a break-up of the buffer cache usage.

Or maybe what you are saying is the processes that are using the physical memory most are also using the buffer cache?
Highlighted
Honored Contributor
Solution

Re: Buffer Cache

Hi,

Buffer cache is an area of memory between disk and OS. If you don't change any setting it's adjusted so that it can grow up to %50 of memory. Practically this is waste of memory.
dbx_max_pct and dbc_min_pct are kernel parameter you want to set. a common idea is setting these values to:

dbc_max_pct = 5
dbc_min_pct = 2

so it grow up to %5 of memory. You can analyz buffer cache utulization with sar -d command.

Kenan.
Computers have lots of memory but no imagination
Highlighted
Honored Contributor

Re: Buffer Cache

when you run kmem, there is a option said that you can use -u option that you can elaborately see that.
a warrior never quits
Highlighted
Honored Contributor

Re: Buffer Cache

setting kernel parameters
dbc_max_pct
dbc_min_pct

depends upon your physical memory size. for large physical memory you better to use the mentioned values above but for minimum memory this is not fruitful.
a warrior never quits
Highlighted
Honored Contributor

Re: Buffer Cache

Buffer cache is the most recently used blocks of files from all of your filesystems. Since a file like a library could be open from many processes there is no real reason to see if a process is using buffer cache. You need to size your buffer cache so your buffer cache hit rate is optimal for the size of memory you have but not too large so it causes you to get low on memory and start paging and vhand has to shrink the buffer cache.

Example 2 GB of buffer cache hit rate 90%
2.5 gb buffer cache hit rate 95%
3 gb buffer cache hit rate 95%

optimal buffer cache size is 2.5 bg based on the files and blocks of files processes are using.

Good luck.

With 11.31 all bets are off we now have unified file cache.
Highlighted
Respected Contributor

Re: Buffer Cache

Hi,

dbc_max_pct - the maximum percentage of memory to be used by dynamic buffer cache.

Values:-
Minimum--->2; Maximun--->90; Default--->50

DESCRIPTION:-
When the parameters bufpages and nbuf are both set to their default value of 0, the size of the buffer cache grows or shrinks dynamically, depending on competing requests for system memory.

The value of dbc_max_pct sets the maximum percentage of physical memory that can be allocated tothe dynamic buffer cache.

It is possible to set both dbc_max_pct and dbc_min_pct to the same value, 12 for example, andcreate a kernel that uses exactly that percentage of physical memory for the buffer cache, regardless of the size of physical memory.

Related Parameters:-
dbc_max_pct must be greater than or equal to dbc_min_pct.

To use dynamic buffer caching, bufpages and nbuf must both be set to zero.

dbc_min_pct - the minimum percentage of memory to be used by the dynamic buffer cache.

Values:-
Minimum--->2; Maximun--->90; Default--->50

DESCRIPTION:-
During file-system I/O operations, data is stored in a buffer cache, the size of which can be fixed or dynamically allocated. When the parameters bufpages and nbuf are both set to their default values of 0, the size of the buffer cache grows or shrinks dynamically, depending on competing requests for system memory.

The value of dbc_min_pct specifies the minimum percentage of physical memory that is reserved for use by the dynamic buffer cache.

It is possible to set both dbc_min_pct and dbc_max_pct to the same value, 12 for example, and create a kernel that uses exactly that percentage of physical memory for the buffer cache, regardless of the size of physical memory.

Selecting an Appropriate Value:-
If dbc_min_pct is set to too low a value, very high demand on the buffer cache can effectively hang the system. The is also true when using fixed buffer cache. To determine a reasonable (and conservative)
value for the minimum cache size in megabytes, use the following formula:
(number-of-system-processes)*(largest-file-system-block-size)/1024

To determine the value for dbc_min_pct, divide the result by the number of megabytes of physical memory installed in the computer and multiply that value by 100 to obtain the correct value in percent.

Only those processes that actively use disk I/O should be included in the calculation. All others can be excluded. Here are some examples of what processes should be included in or excluded from the calculation:
a) Include:-
NFS daemons, text formatters such as nroff, database management applications, text editors, compilers, and so on, that access or use source and/or output files stored in one or more file systems mounted on the system.
b)Exclude:-
X-display applications, hpterm, rlogin, login shells, system daemons, telnet or uucp connections, and so on. These processes use very little, if any, disk I/O.

Related Parameters:-
dbc_min_pct must be less than or equal to dbc_max_pct.
To use dynamic buffer caching, bufpages and nbuf must both be set to zero.

BR/
Yaqub