Operating System - HP-UX
1748230 Members
4218 Online
108759 Solutions
New Discussion юеВ

Re: heap vs data stack size question

 
SOLVED
Go to solution
MikeL_4
Super Advisor

heap vs data stack size question

Is there a correlation between the data(Kbytes) and the amount of heap specified for web application servers, i.e. Min and max heap settings. Are they related in any way?

ulimit -a displays the following:
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2015464
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 256
8 REPLIES 8
Chris Wilshaw
Honored Contributor

Re: heap vs data stack size question

The data(kbytes) [also displayed by ulimit -d] value corresponds to the maxdsiz kernel setting.

eg:

=>ulimit -d
1048576

=>kmtune -q maxdsiz
Parameter Current Dyn Planned
maxdsiz 1073741824 - 1073741824

ulimit displays the value in kbytes, kmtune in bytes.

1073741824 / 1024 = 1048576

Hope that helps.

Chris
MikeL_4
Super Advisor

Re: heap vs data stack size question

I understand the ulimit parameter, but in relation to the min and max heal settings, do they have any relationship to the the ulimit setting ??
MikeL_4
Super Advisor

Re: heap vs data stack size question

Sorry, I misspelled:

I understand the ulimit parameter, but in relation to the min and max heap settings, do they have any relationship to the the ulimit setting ??
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: heap vs data stack size question

Since you didn't identify your webserver (and it may be Java-based as well) the "heap" is almost certainly a p-engine construct (ie, a software abstraction) and is probably ultimately limited by the maxdsiz parameter which in turn could be limited by the ulimit -d value (although that is uncommon). Assuming these limits are not reached, there is probably a configuration file entry, a command-line argument, and/or an environment variable which can be used to alter your software's "heap" size. Rather than using the malloc() functions to allocate a heap, it could also be built using shared memory so it is possible that shmmax is your ultimate limit. You really have to investigate your software to know more.
If it ain't broke, I can fix that.
MikeL_4
Super Advisor

Re: heap vs data stack size question

Within WebLogic Application server the application group sets up jvm heap sizes for instances -Xms (minimum) and -Xmx (maximum). The Java heap is where the objects of a Java program live. It is a repository for live objects, dead objects, and free memory. Heap space is reclaimed once garbage collection runs.

They are not receiving any error we are just curious as to whether there is any kind of connection between the data size shown using ulimit and heap settings set using xms and xmx.
Bill Hassell
Honored Contributor

Re: heap vs data stack size question

As Clay mentioned, we can probably guess that the Weblogic heap is referring to the data quadrant (q2) of a 32bit program and is limited in growth by:

1. kernel parameter maxdsix
2. ulimit setting
3. available swap space

A standard program's data area is limited to 960megs. By recompiling it as an EXEC_MAGIC executable, both quadrant 2 and quadrant 1 can be combined for about 1700megs. Without knowledge of your OS version, it's not possible to advise on additional executable types such as q3p q4p and MPAS.

One of the problems with some programming languages is the the terminology is hidden by new-and-better terms. All programs in HP-UX have 4 quadrants -- for 32bit programs, each quadrant is 1Gb in size. The current ulimit value shown in your question is larger than your program can address without special chatr options. So you can make the heap-max as much 960megs, or by looking at the executable with the chatr command, you may find it is capable of about 1700megs.


Bill Hassell, sysadmin
MikeL_4
Super Advisor

Re: heap vs data stack size question

We are running HPUX Version 1, 11.11
Bill Hassell
Honored Contributor

Re: heap vs data stack size question

So with 11.11, you can use chatr to change the executable to use quadrants 1,2 and 3 (q3p in chatr) and all 4 quadrants (q4p). Note that all of quadrants 1,3 and 4 are not 100% usable so the max's would be 960, 1750, 2800 and 3800 megs depending on compiler and chatr options. Note also that using q3 and q4 restrict other programming techniques such as shared memory.


Bill Hassell, sysadmin