1820227 Members
3494 Online
109620 Solutions
New Discussion юеВ

Kernel Config....

 
SOLVED
Go to solution
Joaquin_13
Advisor

Kernel Config....

Currently we are conducting an application troubleshooting running on one of our UNIX box here. We are planning to reconfigure some of the kernel params. Kindly check the below value i'm about to update,check if this won't give any unpleasant output during boot up.

Current Value:
NAME VALUE MIN-MAX UNIT maxdsiz 488281 256-655360 Pages maxssiz 20396 256-655360 Pages
maxtsiz 19531 256-655360 Pages

Values to be applied:
NAME VALUE MIN-MAX UNIT
maxdsiz 488281 256-655360 Pages
maxssiz 488281 256-655360 Pages
maxtsiz 488281 256-655360 Pages

Does anyone knows what is the significant of maxdsiz,maxssiz & maxtsiz.?

thank's & regards
11 REPLIES 11
Alex Lavrov.
Honored Contributor
Solution

Re: Kernel Config....

You cab view all the parameters and their explanations here:
http://docs.hp.com/en/939/KCParms/KCparams.OverviewAll.html

IT depends on the applications you run on that box. Each server and it's values. Every application requires different values, so before reconfigure you should consult with the manuals.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Joaquin_13
Advisor

Re: Kernel Config....

I have already read the manual, Just want to the if it is ok if i just specified the values of the maxdsiz,maxssiz & maxtsiz in bytes instead of the value used with formula ex. 0x4000000 = 64MB. Is it just the same? Does this have any impact in the system if I modified the previous value of the maxdsiz,maxssiz & maxtsiz ( original values are in form of formula) with a new values in bytes form..?
Alex Lavrov.
Honored Contributor

Re: Kernel Config....

Several points:

1. If you have 64bit, the parameters are:
maxdsiz_64bit
maxdsiz_64bit
maxtsiz_64bit

2. If you system works fine now, don't decrease the values, you can cause some programs to crash, because storage, text or data segments will be too small for them. Keep it in mind.

3. Values of these parameters are stored as number of bytes in hexa base, so
for 64MB you should set to 0x4000000
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Joaquin_13
Advisor

Re: Kernel Config....

is it ok if I allocate 2GB for maxdsiz & maxssiz?
Alex Lavrov.
Honored Contributor

Re: Kernel Config....

Nope :)

Read the link I sent you, there are minimum and maximum values that you can put there.

for example:
http://docs.hp.com/en/939/KCParms/KCparam.MaxSsiz.html
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Joaquin_13
Advisor

Re: Kernel Config....

Yup! just kind of confussed cuase when i was about to modify the maxssiz i've recongnize that the value is already at 900MB & i've check the maxssiz of the other server & i have noticed one thing, when you invoke the sysdef & ulimit -a the values of maxssiz of the two server was the same but if you check the configurable parameters the other server obtain 100MB & the other server have 900MB value for the maxssiz...?
Alex Lavrov.
Honored Contributor

Re: Kernel Config....

to view the values of the kernel parameters use:
kmtune | grep

for example:
kmtune | grep maxssiz
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Bill Hassell
Honored Contributor

Re: Kernel Config....

Very important: maxdsiz = 64megs (for servers such as database programs) is probably way too small and your applications will get "out of memory" errors even though there are Gbytes of RAM available. maxdsiz is a protection fence for bad programmers who write programs that don't work right and try to get all the memory possible.

If you don't have programmers but are running commercial programs that are known to work correctly, then you can set maxdsiz to 2Gb although with 11i and patches, you can set maxdsiz to 3.8Gb and actually run a simple 32bit program that requests (and successfully obtains) 3700megs of RAM.

Now if you are running a 64bit opsystem, there is a second parameter: maxdsiz_64 and this *MUST* be larger than maxdsiz. Otherwise, maxdsiz will be reduced to the value for maxdsiz_64. You can set maxdsiz_64 to 10 or 20Gb if you want. NOTE: these are simple fences to prevent runaway programns from consuming lots of RAM. Setting them too low will cause endless "program too big" or "out of memory" errors.

Now maxssiz (and maxssiz_64) can both be set to 64megs. Good programming techniques will never need more than a few megs at most. If a programmer says the program needs 500megs, find another programmer!

maxtsiz (and maxtsiz_64) never need to be changed except for the most extreme programs. maxtsiz refers to the text area or unchanging instructions. In general, the size of the executable file is about the same as the text area in memory. The default is 64megs (yes, 0x4000000 is the hex equivalent of 64megs (where 1meg=1024*1024) and 67,108,864 is 64*1024*1024. The hex numbers, decimal numbers and formulae are all acceptable to SAM and the kernel compiler.


Bill Hassell, sysadmin
Joaquin_13
Advisor

Re: Kernel Config....

what is the preferred maxdsiz , maxssiz & maxtsiz if the program where trying to run consumes about 1Gb in the physical memory?.... it always prompt that it can't allocate memory for 300 MB
Bill Hassell
Honored Contributor

Re: Kernel Config....

maxdsiz *IF* the program is a 32bit program (most likely case), or maxdsiz_64 f the program is 64bits. Start by changing maxdsiz and maxdsiz_64 as I mentioned above. (will require a reboot of the system)

Now I am going to assume a few things: you have enough swap space to handle more than a Gb of program memory. And that the memory being requested by the program requires local memory and not shared memory. Notice I didn't ask about RAM...you can run a 1000meg process in a 512meg system (albeit quite slowly) as long as you extra swap space.

If you haven't changed the original parameters (maxdsiz=488281) then your program will run out of memory (be prevented from using more than 488megs) until you increase maxdsiz. I would increase it to 1700megs for now and make sure that maxdsiz_64 is larger than 1700megs, perhaps 2000megs. maxssiz and maxtsiz can be left as is.

Another very important feature: if your your program needs more than 960megs of local RAM, you must recompile it using the c compiler flags -Wl -N options to get an EXEC_MAGIC executable, thus allowing memory requests to map into an additional quadrant (up to 1700megs apx).


Bill Hassell, sysadmin
Don Morris_1
Honored Contributor

Re: Kernel Config....

One note on the above -- if what you're trying to accomplish is allowing a large private data space, don't raise maxssiz unless you absolutely must.

To allow stack growth to maxssiz, the virtual address space for the stack is reserved from the private address space of the process -- so if you set maxssiz to 128Mb from 8Mb, you've implicitly limited your data by 120Mb.

For your 1Gb program above, I'd set maxdsiz to 1Gb (0x40000000), maxdsiz_64bit to at least 1Gb, leave maxtsiz where it is (if your program makes it to malloc(), maxtsiz isn't the issue) and leave maxssiz at 8Mb to 64Mb. If you literally need 1Gb of data, you're going to have to chatr to get q0 as Text+Data as Bill points out, and you can raise maxdsiz to 1.5Gb to 2Gb. You won't actually get data space up to 2Gb (because of the stack - not to mention that your binary should be non-zero in size).