Operating System - HP-UX
1820644 Members
2071 Online
109626 Solutions
New Discussion юеВ

nproc setting for a mailserver ..

 
SOLVED
Go to solution
someone_4
Honored Contributor

nproc setting for a mailserver ..

Hey everyone .
I have been having performance issues with a mailserver. After installing Glance I see a
RED ALERT Process table is nearly full.
Then from doing sar -v 1 10 I get:

15:15:34 text-sz ov proc-sz ov inod-sz ov file-sz ov
15:15:35 N/A N/A 437/532 0 764/764 0 1574/4010 0
15:15:36 N/A N/A 437/532 0 764/764 0 1576/4010 0
15:15:37 N/A N/A 436/532 0 764/764 0 1571/4010 0
15:15:38 N/A N/A 436/532 0 764/764 0 1571/4010 0
15:15:39 N/A N/A 436/532 0 764/764 0 1571/4010 0
15:15:40 N/A N/A 436/532 0 764/764 0 1571/4010 0
15:15:41 N/A N/A 439/532 0 764/764 0 1582/4010 0
15:15:42 N/A N/A 437/532 0 764/764 0 1573/4010 0
15:15:43 N/A N/A 437/532 0 764/764 0 1573/4010 0
15:15:44 N/A N/A 440/532 0 764/764 0 1586/4010 0


Now that is at the present time but I have seen the proc-sz get as high as 516/532.
What should I tun the nproc parm to? And Why?
I was thinking about going with 2048 hard no formula. But is that too much? Can nproc be too much?

Richard
12 REPLIES 12
James R. Ferguson
Acclaimed Contributor
Solution

Re: nproc setting for a mailserver ..

Hi Richard:

The concept of parameters like 'nproc' is that they are a "fence" to keep a reign on a rouge process.

I like to use the formulas provided for parameters like 'nproc'. The idea is that other related parameters can be adjusted concommitantly by adjusting a factor common to all. This leads to well-balanced kernel tables.

In the case of 'nproc', I'd adjust 'maxusers' in order to inflate it. For more information on 'nproc', see:

http://docs.hp.com/hpux/onlinedocs/os/KCparam.Nproc.html

Regards!

...JRF...
G. Vrijhoeven
Honored Contributor

Re: nproc setting for a mailserver ..

Richard,

I suppose you checked your proces list for strage processes.

If so what ux version are you runnig. i am trying to find some documentation for you.
A. Clay Stephenson
Acclaimed Contributor

Re: nproc setting for a mailserver ..

Hi Richard,

While I tend to use the values directly, it's probably better if you leave the formulae in place for now and adjust MAXUSERS up to an nproc value somewhere around 800 - 1000.
I generally shy away from inceasing a value by 4x without more data. Generally when nproc is being hit, nfile, and ncallout need to be bumped up as well (sometimes ninode too). The formulae take care of this for you.

What this value should be depends upons many factors. Resources, how many processes you really want to pull.

Clay
If it ain't broke, I can fix that.
someone_4
Honored Contributor

Re: nproc setting for a mailserver ..

Hi
Vrijhoeven I am running HPUX 11.0

James; Clay ..
I see what you are saying Right now :
nproc (20+8*MAXUSERS)
and
maxusers 64

But 20+8*64 =1792 ? But
15:37:03 text-sz ov proc-sz ov inod-sz ov file-sz ov
15:37:04 N/A N/A 477/532 0 764/764 0 1711/4010 0
15:37:05 N/A N/A 477/532 0 764/764 0 1711/4010 0

We modified nfile Friday.
nfile 4000

If I up MAXusers should I set nfile back to default?

Richard
James R. Ferguson
Acclaimed Contributor

Re: nproc setting for a mailserver ..

Hi (again) Richard:

Again, my preference is to use the formula. In answer to your question, yes, I'd re-establish the formula for 'nfile' (see the document link I provided) and having done so, adjust 'maxusers'.

As you can see, inflating 'maxusers' will increase both 'nproc' and 'nfile'. Moreover, 'nproc' as increased by 'maxusers' will also boost 'nfile'. Play around on paper and/or a calculator and pick a number for 'maxusers' that achieves a higher water mark than your 'sar' data says you need.

The kernel parameter document (at large) offers some good insights into the interrelationships of the aforementioned parameters.

Regards!

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

Re: nproc setting for a mailserver ..

Whoa Richard, you are thinking like a human and not like a parser 20 + 8 * 64 <> 1792 but
rather = 532.

Clay
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: nproc setting for a mailserver ..

When doing the math on that one think of it as:

20 + (8 * MAXUSERS) =
20 + (8 * 64) = 20 + 512 = 532

You were thinking it was:

(20 + 8) * MASUXERS =
(20 + 8) * 64 = 28 * 64 =1792
Sridhar Bhaskarla
Honored Contributor

Re: nproc setting for a mailserver ..

If I recall your previous messages, your system is mainly used for sendmail. Correct me if I am wrong. The formula of nproc is based on the old way of using the unix system where the processes are alloted depending on the number of USERS that use the system. I usually don't go with this formula anymore. However there is no harm in using the formula anyway.

*I liked Clay's latest comment*

To set the value, it is important to take the trend into account. If you have measureware datacollected, you can plot a graph for time vs nproc and see how it is growing. Depending on it you can extrapolate and set the value.

Use 20+(X*MAXUSERS)

I would suggest to keep the MAXUSERS constant and change X. You don't hit threshold on MAXUSERS at all. So, you may not want to unnecessarily increase a kernel table.

Only my opinion.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
someone_4
Honored Contributor

Re: nproc setting for a mailserver ..

Hey everyone ..
Ok I did my changes last night in my maint window. I put the default back for nfile. And put maxusers at 256. Now
# sar -v 1 10

HP-UX lvapp13 B.11.00 A 9000/800 10/19/01

11:00:31 text-sz ov proc-sz ov inod-sz ov file-sz ov
11:00:32 N/A N/A 457/2068 0 1502/2492 0 1775/4146 0
11:00:33 N/A N/A 459/2068 0 1503/2492 0 1785/4146 0
11:00:34 N/A N/A 460/2068 0 1504/2492 0 1785/4146 0
11:00:35 N/A N/A 458/2068 0 1504/2492 0 1783/4146 0
11:00:36 N/A N/A 458/2068 0 1507/2492 0 1782/4146 0
11:00:37 N/A N/A 460/2068 0 1506/2492 0 1790/4146 0
11:00:38 N/A N/A 456/2068 0 1498/2492 0 1771/4146 0
11:00:39 N/A N/A 464/2068 0 1575/2492 0 1793/4146 0
11:00:40 N/A N/A 465/2068 0 1576/2492 0 1795/4146 0
11:00:41 N/A N/A 466/2068 0 1577/2492 0 1800/4146 0

I have also attached a shot of what glance was telling before and after. Thanks for all your help .. And James I owe you 5 points =)

Richard
James R. Ferguson
Acclaimed Contributor

Re: nproc setting for a mailserver ..

Hi Richard:

Looks to me like you solved your problem. It also appears that the default formula works rather well in this case.

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: nproc setting for a mailserver ..

Richard,

Just to re-stress. I do not like to increase
MAXUSERS value as it is going to affect other
parameters like nfile, ninode etc., So, if you
are having problems with nproc, you may only want to increase only nproc as increasing other kernel parameters (indirectly) may cause unnecessary table scans by kernel. Particularly ninode. We want this value to be as low as possible on the systems where the file systems are vxfs except for /stand. We don't want a high value for this parameter. But increasing MAXUSERS will affect this parameters too.

So, I would still suggest to change X in the above formula.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Mladen Despic
Honored Contributor

Re: nproc setting for a mailserver ..

Hi Richard,

Thanks for posting your question. The posts are quite interesting - yet another proof that this forum is a great place to learn.

I've just noticed, in your attached output from glance, that the process mib2agt on your system may have a memory leak. There have been several posts about this problem. You can search the forum for "mib2agt memory leak" to see a few. In any case, if you observe that RSS value for mib2agt is increasing, the patch PHSS_23670 should fix this.

Regards ... Mladen