Operating System - HP-UX
1833247 Members
3066 Online
110051 Solutions
New Discussion

dual processor process vsz very large

 
Iain_8
New Member

dual processor process vsz very large

I have too almost identical HPUX boxes running 11.0, one has a single processor, the other dual.

I have written a program and compiled it using gcc3.2 on the single processor m/c.

When running it idles at ~ 50Mb in top.

When testing on the dual processor m/c, the same code idles at 170Mb.

How can I account for the drastic increase in size on a dual processor box.
5 REPLIES 5
Chris Wilshaw
Honored Contributor

Re: dual processor process vsz very large

The amount of memory used by a process is limited by the maxdsize kernel parameter. It could be that this is set to a higher value on the dual proc. m/c.

Any process can use up to this limit - what happens at that point depends on how the program was written - it can either remain running, but consume no more resources, or it can attempt to increase beyond this limit, most likely resulting in the termination of the process
Bill Hassell
Honored Contributor

Re: dual processor process vsz very large

There is nothing about multiple processors that affect a simple (non-threaded) program. If your program malloc's memory, then you'll get success (or failure) depending on settings such as maxdsiz. If your program malloc's 50 megs at a time and continues until it fails, the second machine most likely has changed the default kernel parameter maxdsiz from 64megs to something higher. maxdsiz prevent bad programs from allocating too much RAM.

Use kmtune | grep maxdsiz

on both systems.


Bill Hassell, sysadmin
Iain_8
New Member

Re: dual processor process vsz very large

the maxtsiz, maxssiz and maxdsiz are exactly the same. the only difference in the two systems is that one has an extra CPU
Iain_8
New Member

Re: dual processor process vsz very large

fwiw, the program is using pthreads
Bill Hassell
Honored Contributor

Re: dual processor process vsz very large

A threaded program has a lot more options with multiple processors, namely, threads can be run in parallel, the very reason that multiple processors can speed up threaded applications. My guess is that the code takes advantage of this and might grow much larger on a 16 processor system.


Bill Hassell, sysadmin