Operating System - HP-UX
1833685 Members
3994 Online
110062 Solutions
New Discussion

Re: system free memory in hpux 11.11

 
SOLVED
Go to solution
Walter Keating
Occasional Contributor

system free memory in hpux 11.11

Hi !

can anyone help me with the following problem:

we have an application that runs on hpux 11.0 we are taking an upgrade of the application which runs on hpux 11.11 and have the problem that in testing the system free memory (L class 4 CPUS, 4GB RAM) decreases continuously under load testing on the 11.11 box.

the vendor says that this is normal behaviour, that none of their processes are using up (leaking) memory and that the memory is being used by hpux for disk buffer caches and will be released when there is not enough memory available.

we use top and hp openview mib to track the free memory.

is this a diferent behaviour of hpux from 11.0 to 11.11 ? we are testing at the moment, I am anxious to see what happens when we reach extremly low free memory, our vendow says that the system can run without any problems with just 4mb of free memory.

any comments welcome !
5 REPLIES 5
RAC_1
Honored Contributor

Re: system free memory in hpux 11.11

How much buffer cache set??

Run following for considerable period and check, if memeory count goes on inceasing, it could be memeory leak problem. Also are you up to date on patches??

Run following throug cron.

UNIX95= ps -C "program_name" -o "pid,vzs,args" >> /tmp/mem.log

Check the file. Second column is memeory used by program.
Also there are commercial products to check if program has memeory leak or not. purifier is one of them.
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: system free memory in hpux 11.11

Top is a meaningless tool for tracking free memory. Using ps or Glance is a good way to monitor process size. The buffer cache behavior is actually better under 11.11 than 11.0; in either version, dynamic buffer cache is released when the system is under memory pressure; 11.11 releases it more quickly. At this point, the best approach --- and to beat the vendor at his own game --- is to implement a static buffer cache by setting bufpages to a non-zero value indicating the number of 4KB chunks to allocate for the buffer cache. This is not the same as setting dbs_max_pct and dbc_min_pct to the same value. I run static buffer caches on most of my boxes. Now, if you see problems, the buffer cache is completely eliminated as a suspect.

Glance (even the Trial version) is really the tool of choice for nailing possible memory leaks.
If it ain't broke, I can fix that.
Walter Keating
Occasional Contributor

Re: system free memory in hpux 11.11

glance is showing the Buffer Cache memory is staying steady, but User Memory is increasing at the same rate as Free Memory decreases, does this discredit the theory that the memory is being used for OS buffers and caches ?

"The decrease of total free memory is normal behaviour of Unix system and it does not signal a problem" is the statement of our vendor but I cannot really believe this !
RAC_1
Honored Contributor

Re: system free memory in hpux 11.11

As Clay advised, set buffer cache to static. Now run the progrm, and check memeory usage. This would completely refute vendors's claim. Buffer cache is isolated now and if user/program memeory usage is increasing, that what the problem is.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: system free memory in hpux 11.11

By using a static buffer cache, that part of the equation is now a constant. A processes growing memory footprint is not necessarily a memory leak or a problem. This is typical behavior for a program that uses dynamic memory allocation --- and as this memory is allocated, free memory, by definition, decreases. A memory leak occurs when a program allocates memory but doesn't free each chunk when no longer needed; in that case, the programs footprint grows overtime until a kernel limit (maxdsiz) is reached or until all virtual memory is exhausted.

Well-written code using dynamic memory will typically grow quickly, then grow more slowly, and finally stop growing as equilibrium is reached. I should point out that in almost all cases, the memory free'ed isn't returned to the OS but rather goes onto the process'es heap for subsequent reuse.
If it ain't broke, I can fix that.