cancel
Showing results for 
Search instead for 
Did you mean: 

maxdsiz paramter setting

SOLVED
Go to solution

maxdsiz paramter setting

Maxdsiz kernel parameter setting.
I understand the maximum setting for this parameter is approximately 1.9GB for 32 bit applications & this determines the maximum data segment size of a process. On our system there is an application process that wants to grab the maximum (ie 1.8-1.9gb) amount of memory. However even though I have configured maxdsiz to its stated maximum, the process still only grabs about 800-900MB of memory. These are figures that I have obtained from ps & glance (eg vsz, rss & also virtual memory from the gpm processes window.)
Is there anything else (eg other kernel parameters) from an OS perspective that can influence how much memory the process grabs. The box is physically configured with 4GB of RAM & there is consistently about 1.5-2GB free.
Previously the process did manage to grab about 1.6gb of memory for a short period of time. But I have no idea why it is now only using 800-900mb.
I have talked with the application people & they assure me they have configured all the necessary parameters within the application.

Thanks for your help.

Cheers Con.
9 REPLIES
S.K. Chan
Honored Contributor

Re: maxdsiz paramter setting

I don't think there is anything or any changes you can do on the kernel side that can influence how much memory a process grab. Parameters like maxdsiz, maxssiz for example are merely defining the max limit and they help us to prevent poorly written program from eating up huge chunk of memory.

my $0.02
Steven Gillard_2
Honored Contributor

Re: maxdsiz paramter setting

By default, a SHARED_MAGIC processes data segment can only grow to about 1Gig. It is possible to increase this to approx 1.8/1.9 Gig by relinking the program as an EXEC_MAGIC executable with the -N option to ld. This causes the processes text and data segments to share the same virtual address space.

For more information have a read of the process management white paper on your system at /usr/share/doc/proc_mgt.txt, in particular the section titled "Handling maxdsiz with EXEC_MAGIC"

Regards,
Steve

Re: maxdsiz paramter setting

Thnaks for the replies. One final question related to this. The process in question is consistently grabbing about 900MB of memory (vsz reading from ps command). However it has on occasions grabbed 1.6GB of memory. Is there anything on the OS side that can influence this assuming that free memory on the system is always around 1.5GB-2GB.

Thanks for the help.

Cheers
Con
A. Clay Stephenson
Acclaimed Contributor

Re: maxdsiz paramter setting

To grab that much memory in the 10.20 world, the EXEC_MAGIC has to be enabled AND there has to be that size chunk of memory available.

i.e.
On the heap, you might have 1GB,30kb,800MB.
That little 30kb chunk in the middle limits you. It's just a crapshoot as to when that big a chunk is available.
If it ain't broke, I can fix that.

Re: maxdsiz paramter setting

Thanks for the response, that makes a lot of sense now. However can you clarify if this is still the case when running 32 bit applications on 11.x. I understand running 64 bit applications on 11.00 gets rid of these problems but the application in question is 32bit running on 11.11.

Thanks for the help.

Cheers
Con
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: maxdsiz paramter setting

Same deal. You might look into memory windows on 64-bit 11x. This will give your 32-bit applications 1.75GB everytime. Just do a search on "memory windows" and you will find what you need. Of course, you already said the best answer re-compile this puppy as 64-bit and forget about it - if you have the source.
If it ain't broke, I can fix that.

Re: maxdsiz paramter setting

Thanks again. I can now explain to the apps guys why their process occasionally grabbed 1.6GB but normally sits around 900MB.

Cheers
Con
Bill Hassell
Honored Contributor

Re: maxdsiz paramter setting

Have your application developers read the two memory management documents in /usr/share/doc, one is mem_mgt and the other is proc_mgt. 32 bit applications will struggle to get RAM either in the program's data area or shared memory. No matter how much RAM you have, there is only one 3.75Gb area for 32 bit programs, and every 32bit program currently running shares this area.


Bill Hassell, sysadmin

Re: maxdsiz paramter setting

Hi
I'm hoping for a bit more help in understanding this. I have determined using the chatr command that the executable for this process has been compiled with the EXEC_MAGIC flag ie the output is saying "normal executable".
I assume then that the process should theoretically be able to grab more than 1GB of memory - however the vsz field in ps & glance "virtual memory" are both consistently reporting around 900MB.
Clay made mention of this in his reply - is this because the memory has to be available in a contiguous chunk across the first 2 Quadrants?? I have read the proc_mgt paper but am still not clear on exactly why the process can't access this additional memory. As before System has 4GB of Phys Mem & there is consistently 1.5GB free.

Thanks again.
Cheers
Con