Operating System - HP-UX
1825812 Members
2448 Online
109688 Solutions
New Discussion

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

 
SOLVED
Go to solution
sabinkarvijay
Frequent Advisor

Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi All,

We are receiving the fallowing error while running one of our application.
"ARERR 300 Malloc failed on server"

As suggested by Client Solutions Support

1)how can we increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or increase to unlimited).

2)Is there any option to increase maxdsize to unlimited?(is it possible)

Here I had one more confusion

3) how can we decide the paging space to 2 times the size of allocated memory and also how can i check the size of allocated memory.

Please let me know if you need any further details..

Thanks in Advance,

Regards,
Vijay Sabinkari.
15 REPLIES 15
Michal Kapalka (mikap)
Honored Contributor
Solution

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

hi,

300 - Malloc failed on server

The system encountered an error during a call to allocate space. The failure
occurred on the Server machine during processing of a call from the client.
Generally, this error occurs when there are too many processes running or
some processes have grown to occupy most or all of the available memory on
your server machine. You can recover that memory by shutting down
unneeded processes. In addition, restarting processes that have been running
for a while will help by recovering any space those applications have leaked
over time.

check this link :

http://www.mattreinfeldt.com/forums/ubbthreads.php/topics/134191/SERIOUS_Malloc_Error_and_stopp

hope it helps.

mikap
sabinkarvijay
Frequent Advisor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi Mikap,

Thanks for quick response..

the link is not helping me to resolve the problem...

Let me know any other way to resolve this issue or please explain how the link will help?

Thanks in Advance,

Regards,
Vijay Sabinkari.
Michal Kapalka (mikap)
Honored Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

hi,

at first wich HP-UX version do you have ??

HP-UX 11.11/23/31 ???

for checking of memmory alocation you colud use glance

mikap
sabinkarvijay
Frequent Advisor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi Mikap,

Version of HP-UX is 11iv1(B.11.11)

Regards,
Vijay Sabinkari.
Don Morris_1
Honored Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Set maxdsiz on 11.11 using SAM (easiest way). Other alternatives are kmtune + mk_kernel, etc.
For 11.11, this is a static tunable, hence a reboot is required for the change to take effect.

Be careful not to have maxssiz too large -- maxssiz implicitly reserves space for the stack from the private address space of the process (hence for the default layout with 1Gb of private data/stack space, a 512Mb maxssiz means maxdsiz above 512Mb is meaningless). As this implies, the address space layout of the application (presuming 32-bit application here from your queries on maxdsiz and not maxdsiz_64bit) matters as well.

maxdsiz can not be unlimited. See http://docs.hp.com/en/TKP-90202/re34.html for more details.

Glance or a more custom pstat tool [sample attached] is the best way to check the usage of maxdsiz relative to a particular process. (If you want to determine how much a process was using at the time of a malloc failure you'd need to either have the application still running (check via pstat/Glance), have a core file from the application caused by the malloc failure -- or have the application tell you. If the application exit'd, there's no way to backtrack that data.

swapinfo -atm output should be checked when this occurs as well. maxdsiz limits the application private data space, but failure to reserve swap is also a reason for malloc() to fail with ENOMEM.
Dennis Handly
Acclaimed Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

The maximum value is 1 Gb for maxdsiz, unless you want to modify your executables with chatr, relink with -N or port to 64 bit.
What is the current value?

>2)Is there any option to increase maxdsiz to unlimited?

No. You must backup that increase by unlimited swap. (Unless you use lazy swap allocation.)

>3) how can we decide the paging space to 2 times the size of allocated memory

You can't. All you can do is set a fixed limit with maxdsiz. And possibly lower it with "ulimit -d".
You can use "swapinfo -tam" to see how much swap you are using and have free.
sabinkarvijay
Frequent Advisor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi Don/Dennis,

>>Be careful not to have maxssiz too large -- maxssiz implicitly reserves space for the stack from the private address space of the process (hence for the default layout with 1Gb of private data/stack space, a 512Mb maxssiz means maxdsiz above 512Mb is meaningless). As this implies, the address space layout of the application (presuming 32-bit application here from your queries on maxdsiz and not maxdsiz_64bit) matters as well.

>>The maximum value is 1 Gb for maxdsiz, unless you want to modify your executables with chatr, relink with -N or port to 64 bit.
What is the current value?


This is the present status of maxdsiz and maxssiz:

#kmtune | grep -i maxdt*
maxdsiz 2063835136 - 2063835136
maxdsiz_64bit 2063835136 - 2063835136

#kmtune | grep -i maxts*
maxtsiz 0x4000000 Y 0X4000000
maxtsiz_64bit 0x40000000 Y 0X40000000

#sysdef | grep -i maxds*
maxdsiz 503866 - 0-503866 Pages -
maxdsiz_64bit 503866 - 1024-1073479679 Pages -

#sysdef | grep -i maxts*
maxtsiz 16384 - 0-503859 Pages -
maxtsiz_64bit 262144 - 1024-1073741823 Pages -

This is the information related to memory :

Physical Memory: 16396.7 MB

Real Memory:
Active: 6913155.5 KB
Total: 7956675.0 KB
Virtual Memory:
Active: 10281388.1 KB
Total: 11876194.1 KB

Free Memory Pages: 1288008 at 4 KB/page

Swap Space:
Avail: 10240 MB
Used: 9224 MB

here my main concern is the error"ARERR 300 Malloc failed on server" is coming intermittently not everytime , and i would like to go for increasing maxdsize parameter to two times of allocated memory(1.for this which parameter i need to take either physical memory or Real memory or virtual memory or swap space, here the main confusion is!!) as suggested by Client Solutions Support.

2. How can i increase the parameter maxdsize accordingly?

Thanks in Advance,

Regards,
Vijay Sabinkari.
Bill Hassell
Honored Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

It is quite likely your application program is only 32 bits and therefore it cannot request more than 950 MB of RAM without recompiling. What does your vendor say about the maximum space that this program will require?

The paging space very unlikely to be the cause. You can verify this with swapinfo. If you run out of swap (paging) space, you will see that the swap area will be full. Set maxdsiz to 2000000000 (2 GB) so you can forget about that limitation.

If the program needs more than 1 GB of RAM, ask the vendor to send you an EXEC_MAGIC version of the program, or perhaps recompile and link as a q3p or q4p executable. 32 bit programs have extremely limited memory capability.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

>I would like to go for increasing maxdsiz parameter to two times of allocated memory

What is "allocated" memory? You can only make maxdsiz a fixed value. You have 2 Gb and you can increase it to 4 Gb. But chances are, your application can't use all of that.
What does file(1) show on your executable?

You can use chatr(1) to increase to 3 Gb:
chatr -q3p enable -q4p enable executable

What is your "swapinfo -tam" output?

You mentioned:
how can we increase the paging space (maxdsiz) to at least 2 times the size of the allocated memory

Did you mean, have swapspace 2 times the size of RAM?
sabinkarvijay
Frequent Advisor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi Bill,

maxdsiz is already set to 2063835136

#kmtune | grep -i maxdt*
maxdsiz 2063835136 - 2063835136
maxdsiz_64bit 2063835136 - 2063835136

Can we increase more than this?

Thanks in Advance,

Regards,
Vijay Sabinkari.
Dennis Handly
Acclaimed Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

>Can we increase more than this?

Yes but your app may not be able to use it. Also maxdsiz_64bit must be larger than maxdsiz.
sabinkarvijay
Frequent Advisor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi Dennis,

Thanks for that

do you mean maxdsiz and maxdsiz_64bit values will be different from each other, I don't think so ..

If you observe the present values of those parameters both are having same values::

#kmtune | grep -i maxdt*
maxdsiz 2063835136 - 2063835136
maxdsiz_64bit 2063835136 - 2063835136

Let me know if you need any further information on this...

Regards,
Vijay Sabinkari.
Dennis Handly
Acclaimed Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

>do you mean maxdsiz and maxdsiz_64bit values will be different from each other?

I'm saying that maxdsiz_64bit should be MUCH larger than maxdsiz. Otherwise why have a 64 bit machine? The default should be 4 Gb.

>If you observe the present values of those parameters both are having same values

Yes, but that's "broken". If you want to increase maxdsiz, you'll need to make sure that maxdsiz_64bit is larger.
sabinkarvijay
Frequent Advisor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

Hi Dennis,

I'm sorry, not getting your point "broken"?

Please make me understand...

Thanks in Advance,

Regards,
Vijay Sabinkari.
Dennis Handly
Acclaimed Contributor

Re: Increase the paging space (maxdsize) to at least 2 times the size of the allocated memory... (or inc

>not getting your point "broken"?

The values should be: maxdsiz << maxdsiz_64bit
Ideally, maxdsiz_64bit should be orders of magnitude greater than maxdsiz.
Typically they shouldn't be equal.