Operating System - HP-UX
1753792 Members
6881 Online
108799 Solutions
New Discussion юеВ

Substitute Maxswapchunks formula for determining swap size

 
SOLVED
Go to solution
Michael Steele_2
Honored Contributor

Substitute Maxswapchunks formula for determining swap size

Patrick, especially, and others:

I'm looking for a replacement swap formula similar to the 11.11 maxswapchunks formula. Substitute formula suggest adding up all memory consumed by all processes running on the box. (* obviously this would have to be collected before the install and historically collected *).

Would not the forula be Glance Memory report, and us total memory consumed to determine swap size?

Follow up thread to this question:

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1408308
Support Fatherhood - Stop Family Law
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Substitute Maxswapchunks formula for determining swap size

The maxswapchunks/swchunk kernel parm just determines the maximum amount of device swap that CAN BE configured on a server. According to the swchunk man page you can have up to 4,096 TB (4 PETABYTES) of device swap with mswchunk at its default value.

maxswapchunks is the same thing. I always maxed out that kernel parameter when building 11.0 or 11.11 systems.

In my mind neither kernel parm really comes into play when thinking about how to size your device swap area.

Now as far as sizing your device swap goes -- I like having 25% to 33% of RAM size as device swap PLUS have the swapmem_on kernel parm set to 1 (turned on).

I do NOT subscribe to the theory that you must have 1.5 - 2 times RAM as device swap. I believe that is an outdated "requirement" and a waste of disk space.

As with all things Unix, there is always more than 1 opinion and more than 1 way to do things.
Steven E. Protter
Exalted Contributor

Re: Substitute Maxswapchunks formula for determining swap size

Shalom,

Bill Hassell, who I admire greatly told me once the first thing he does to HP-UX kernel configuration is take out formulas.

The people writing the formulas lack real world experience.

A. Clay, had a theory on swap.

One, fast small swap area set to highest priority and a second, larger one at lower priority that will have only reservations, not actual use.

On large RAM systems, setting swap to twice RAM is not realistic or needed, and I do not subscribe to that theory.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Steele_2
Honored Contributor

Re: Substitute Maxswapchunks formula for determining swap size

Hey:

Not really looking for that. Looking for an answer related to total process consumption and its assosication to swap, or, more specifically, using total memory consumption to calculate swap. I.e., glance memory report, i.e., vsz in ps -o, i.e., virtual memory is ... plus pseudo swap.
Support Fatherhood - Stop Family Law
Dennis Handly
Acclaimed Contributor
Solution

Re: Substitute Maxswapchunks formula for determining swap size

>... total memory consumed to determine swap size?

If you already had an existing system, "swapinfo -tam" would be a good starting point. Then add your changes in load to that.
Steven E. Protter
Exalted Contributor

Re: Substitute Maxswapchunks formula for determining swap size

Shalom,

I agree with Dennis.

swapinfo -tam is a great place to start.

Maybe some sar data collection to track use over time, or some snapshots of vmstat.

Perhaps include a peak production time in your snapshot to get realistic numbers.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Steele_2
Honored Contributor

Re: Substitute Maxswapchunks formula for determining swap size

.
Support Fatherhood - Stop Family Law