Operating System - HP-UX
1826499 Members
1769 Online
109692 Solutions
New Discussion

Re: how to increase heap memory size

 
SOLVED
Go to solution
caj
Frequent Advisor

how to increase heap memory size

We have some production job are failing with the following error .

Failed to allocate 168 bytes.
Current data ulimit is 536870912 bytes.
Current address space ulimit is 'unlimited'.
The software has a built-in data size limit of 1073741823 bytes.
Heap is at least 536843016 bytes already.

ABINITIO (2.13.1): Wed Jul 12 05:19:24 2006
ABINITIO: Rolling back ... Done.
ABINITIO: Job may be continued from last checkpoint by: re-running


pls find the ulimt value




# ulimit -a



time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 524288
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303

Is anybody can suggest what is the cause of this job failure ?

Do we need to change data)kbytes) =524288 to some other value

If so how to change the value ?

Pls advise

11 REPLIES 11
James R. Ferguson
Acclaimed Contributor

Re: how to increase heap memory size

Hi:

Change your kernel's 'maxdsiz' for 32-bit processes and/or 'maxdsiz_64bit' for 64-bit processes.

Regards!

...JRF...
Marvin Strong
Honored Contributor

Re: how to increase heap memory size

ulimit -d size

if you can't increase large enough I believe that is the maxdsiz kernel parameter.
caj
Frequent Advisor

Re: how to increase heap memory size

Thanks JRF and marvin for a quick update.

pls find the vaules

# ulimit -d
524288
# kmtune |grep -i maxdsiz_64
maxdsiz_64bit 0x0000000040000000
# kmtune |grep -i maxdsiz
maxdsiz 0X20000000
maxdsiz_64bit 0x0000000040000000

could you pls suggest how can i drive a new kernel value

Thanks
ajeesh
A. Clay Stephenson
Acclaimed Contributor

Re: how to increase heap memory size

Typically with your maxdsiz at this value, you should be about to very nearly approach 1GiB for the data segment. Because the stack is also allocated from this same quadrant, it reduces the maximum possible data segment but your maxssiz is quite small so that is not the problem.

One (not so obvious) thing to check is maxdsiz_64bit even for 32-bit processes because the smaller of the two "wins". This means that you need to check that each of the maxXsiz_64bit values to make sure that they are at least as big as their 32-bit counterparts.

You could also be limited by the amount of virtual address space so that you may need more swap space.

You should also post the output of "chatr myexecutable" so that we can know if any special compiler/linker options were used --- and if this is a 32-bit or 64-bit executable.
If it ain't broke, I can fix that.
caj
Frequent Advisor

Re: how to increase heap memory size

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap01
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap02
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap03
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap04
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap05
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap06
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap07
dev 1024 0 1024 0% 0 - 1 /dev/optvg/fs_swap08
reserve - 1266 -1266
memory 6340 1235 5105 19%
total 15556 2501 13055 16% - 0 -


# model
9000/800/N4000-55
#

maxdsiz 536870912 536870912 Static N/A M â â
â â maxdsiz_64bit 1073741824 1073741824 Static N/A M


maxssiz 8388608 8388608 Static N/A M â â
â â maxssiz_64bit 8388608 8388608 Static N/A M



The server has 8 GB of physical ram



Is there any way to monitor maxdsize usage ?
Pls suggest do i need to change any kernal parameter to complete this job .This is a regular production job which is failed today .

Any input will be highly appriciated

Thanks
ajeesh
A. Clay Stephenson
Acclaimed Contributor

Re: how to increase heap memory size

There is no "maxdsiz" usage. Think of maxdsiz as a mark on a wall. Maxdsiz doesn't consume any resources; it's purpose is to prevent any one process from grabbing too much memory. Any single process is not allowed to exceed that so if you set maxdsiz to something near 1GiB and as long as maxdsiz_64bit is at least that big, you are fine. Based upon the error you posted, bumping maxdsiz up is going to fix you.

While, you are tuning I would increase maxssiz upto about 32Mib and maxssiz_64bit upto about 64Mib. Your present value (8Mib) is a little on the small side but only very poorly written software would ever need stacks any larger than I have suggested.

You also appear to have enough swap.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: how to increase heap memory size

Hi (again):

Well, 'maxdsiz' is 0x20000000 = 536870912
and 'maxdsiz_64bit' is 0x0000000040000000 = 1073741824 , which of course is twice as big.

These are the values you originally reported in your error message, so now you see how they relate.

Increase 'maxdsiz' by two-fold.

Regards!

...JRF...
caj
Frequent Advisor

Re: how to increase heap memory size

How can i increae this value ?

can i use ulimt command to set it temporarly .if yes what is the syntax or i need to rebould the kernel to change the maxdsize value .

Thanks
ajeesh
DSTs Unix
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: how to increase heap memory size

You will need to build a new kernel and reboot. You can do the entire process under SAM although I must admit tha it concerns me that someone who is adminitering a UNIX box has to ask how to do a routine task. In any event, SAM will safely make the changes and build the kernel for you. It will also prompt you to reboot; answer Yes.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: how to increase heap memory size

Hi (again):

You will need to tune 'maxdsiz' and rebuild your kernel. The value of 'maxdsiz' is a ceiling. You can use 'ulimit' to lower it, but not raise it.

Regards!

...JRF...
caj
Frequent Advisor

Re: how to increase heap memory size

changed the kernal parameter maxdisiz