Operating System - HP-UX
1846594 Members
1121 Online
110256 Solutions
New Discussion

Re: MAXDSIZ kernel parameter

 
Marcelo Muzilli_1
Occasional Contributor

MAXDSIZ kernel parameter

Howdy,

look in the kernel.txt attached in this message and if possible, what is the correct value for the MAXDSIZ kernel parameter? The machine runs with 8GB RAM and HP-UX 11i.

Thank you in advance,

Marcelo Muzilli
8 REPLIES 8
Michael Elleby III_1
Trusted Contributor

Re: MAXDSIZ kernel parameter

Hello-

I have it set to 0XC0000000, which equates to 3223225472, since I have a 32bit process that seems to generate a large stack size and grows very rapidly..

It depends on what types of apps you are running, because, for instance, if you are running 64-bit apps, then maxdsiz does you no good, the maxdsiz_64bit parameter would be the one that you are looking for..

Just my $.02 worth..

Mike-
Knowledge Is Power
James R. Ferguson
Acclaimed Contributor

Re: MAXDSIZ kernel parameter

Hi:

'maxdsiz' is for 32-bit programs and 'maxdsiz_64bit' applies to 64-bit ones.

The 32-bit minimum is: 0x40000
The 32-bit maximum is: 0xfffff000

The 64-bit minimum is: 0x40000
the 64-bit maximum is: 0x3ffbfffffff

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: MAXDSIZ kernel parameter

There is no correct value other than "it depends". This is simply the largest data segment that a 32-bit process is allowed. It has almost nothing to do with amount of physical memory in the machine. On production boxes that run only well-tested code, you can set it to 1GB or so. If this is a development box, I would limit
it to typically 512MB or so to prevent a rogue application from grabbing all the memory. If you are running 64-bit 11.11 there is also a maxdsiz_64bit which performs the same function for 64-bit processes; this value is typically set considerably larger than its 32-bit cousin.
If it ain't broke, I can fix that.
Shannon Petry
Honored Contributor

Re: MAXDSIZ kernel parameter

Settings will vary depending on your app. By my own rule, I run normally maxdsiz=80% physical RAM.
As the 32bit maxdsize will max before you can achieve this, then use the maximum. This may cause problems on a system suffering from memory contention, so use with caution. I'd say if your having problems, try moving a gig at a time to see what happens.

As others pointed out, your maxdsiz_64bit is still the default system (tiny) size. make sure to change this when you change the 32bit param. Good habit to get into until all apps are 64bit.

Regards,
Shannon

Microsoft. When do you want a virus today?
Marcelo Muzilli_1
Occasional Contributor

Re: MAXDSIZ kernel parameter

Thanks for all for the quick response.

Regards,

Marcelo Muzilli
Bill Hassell
Honored Contributor

Re: MAXDSIZ kernel parameter

maxdsiz is only a fence to limit runaway processes. If a particular process needs 500 megs of data (not stack, which is a separate area), then set maxdsiz to 510 megs or so. Due to the limitations of 32bit programs, setting maxdsiz to a value larger than about 2Gb does no good as 32bit apps cannot address beyond about 960 megs (or with magic changes to the executable, up to 1750 megs).


Bill Hassell, sysadmin
Marcelo Muzilli_1
Occasional Contributor

Re: MAXDSIZ kernel parameter

Hi all,

when I try to modify the MAXDSIZ value from Kernel parameter to 0XC0000000 (or to 3223225472) as described (Michael Elleby III) in these messages forum, the OS shows me this error message:

'The value specified for tunable parameter "maxdsiz", "0xC0000000", evaluates to "3221225472" which is more than the maximum allowed value of "2063835136".'

I would like to know why this can happen?

TIA,

Marcelo Muzilli
John Poff
Honored Contributor

Re: MAXDSIZ kernel parameter

Hi,

I think it is a patch issue. Take a look at patch PHKL_20174 (the latest version of which is PHKL_24487). This patch fixes the problem of not being able to set maxdsiz bigger that 2 Gb:

PHKL_20174:
( SR: 8606107525 DTS: JAGab77768 )
SAM will not allow the user to configure a kernel with the
kernel configurable variable "maxdsiz" set to a value
greater than 2 Gb.



JP