I have a question regarding paging space - specifically the 2:1 rule.
As far as I know, 2:1 is the accepted rule (thought in AIX 3.2.5+ I find
3:1 works better). Now this is fine with machine up to about 64 MB RAM.
What happens when you have 128 MB, 256 MB or 512 MB? Does the 2:1 rule
still apply? Can you get away with less?
Questions/Opinions/Thoughts very welcome.
--
|
Gunther Feuereisen _===_
Unix Systems Administrator =====
`|'
The Australian Graduate School of Management | ____
The University of New South Wales | ___ | |
Sydney 2052 Australia | | | | |
Tel: 61 2 9931 9314 Fax: 61 2 313 7279 __|__| |__| |^
Email: gun...@agsm.unsw.edu.au ^^| | | | ||^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As a consultant I would answer your question with
a "it depends...". E.g. on a database server with
2 Gigs of RAM 4 Gigs of Page Space would be a little
oversized (you bought that much memory in order to
avoid paging). On the other hand: spending your
money on 2 Gigs of RAM makes another 2 Gig disk
for page space just a tip for the sales people.
To get the best ratio for your system you may start with
1:1 and increase the page space so that it is used
in a resonable matter during normal operation.
On our client systems we permanently monitor page space
usage so we have only "small" page spaces (1:1,5) and
watch them carefully.
Regards,
Michael
In article <4oau3s$1...@mirv.unsw.edu.au>,
The O'Reilly "essential System Administration" book (2nd edition) says on
page 315:
"How much paging space?
There are as many answers to this question as there are people to ask.
The correct answer is, of course, 'it depends.' What it depends on is the
type of jobs your system typically executes. A single-user workstation
might find a paging area of one-and-a-half to two times the size
of physical memory adequate if all the system is used for is editing and
small compilations. On the other hand, for real production environments
running programs with very large memory requirements, you'll see better
performance with three or four times the amount of physical memory. Keep
in mind that some processes will be killed if all available paging space
is ever exhausted (and new processes will not be able to start if enough
is not available).
One factor that can have a large effect on paging space requirements on a
system is the way that the operating system assigns paging space to
virtual memory pages implicitly created when programs allocate large
amounts of memory (which may not all be needed in any induvidual run).
Many recent systems don't allocate paging space for such pages until each
page is actually read or written; this practice tends to minimize
per-process memory requirements and to stretch a given amount of physical
memory as far as possible. However, other systems assign paging space to
the entire block of memory as soon as it is allocated. Obviously, unter
the latter scheme, the system will need to have more paging resources
than under the former.
Other factors that will tend to increase your paging space needs include:
* Jobs requiring large amounts of memory, especially if the system must
run more that one at a time
* Programs that are themselves very large (i.e. have large-sized
executables). This often implies the item above, but not vice-versa.
* A large number of simultaneous jobs running, even if each individual
job is fairly small
* Other demands on the system, such as moderate or heavy network
traffic."
Thus, 2:1 is still a good starter, but depending on the criteria above,
3:1 or even 4:1 could be needed. I tried to find the way AIX handles
individual pages (2nd paragraph), but could not find it that quick.
Kind regards, Peter Koemans, Unix Systems Administrator,
Pink Elephant Industry B.V., the Netherlands.
It's recommended to use twice the size of memory for 256meg and below
and
512 + (memory size - 256) * 1.25 for larger than 256.
>It's recommended to use twice the size of memory for 256meg and below
>and
>512 + (memory size - 256) * 1.25 for larger than 256.
There's some mention of the ratio affecting how the paging space is
actually used.
So does this mean that you should aim for 2:1 on an average 128MB
system, even if the %Used remains fairly low? Eg: lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging01 hdisk2 rootvg 64MB 32 yes yes lv
paging00 hdisk1 vg01 64MB 32 yes yes lv
hd6 hdisk0 rootvg 72MB 41 yes yes lv
--
Jason Sadler
GeoData Institute
University of Southampton
>>It's recommended to use twice the size of memory for 256meg and below
>>and
>>512 + (memory size - 256) * 1.25 for larger than 256.
>There's some mention of the ratio affecting how the paging space is
>actually used.
>So does this mean that you should aim for 2:1 on an average 128MB
>system, even if the %Used remains fairly low?
yes
David Alexander, AIX Support Professional
Technical Manager
Unilink Computers Ltd
Enterprise House
59-65 Upper Ground
London, UK
Tel (44) 0171 261 9200
in...@unilink.co.uk
Nope. These are only "rules of thumb". Please read section 1.300
in the FAQ or search for "paging space" on
http://service.software.ibm.com/aix.us/psearch.
Joerg.
[IBM]
Depending on the server configuration, you may see highlighted words. You
may even see <hyperlinks> surrounding the highlighted words. The hyperlinks
take you to the next or previous highlighted word.
[--------------------]
Database Record DA618
[--------------------]
ABSTRACT: <Paging> Space Tips for AIX 3.2 & 4.1
ABOUT THIS DOCUMENT
This document contains tips for <paging> space in AIX 3.2 and
4.1 on a RISC System 6000. This document is based on HONE
item HQ657906.
RULES OF THUMB FOR <PAGING> SPACE
There is no "right" amount of <paging> space for a system.
<Paging> space requirements are unique for each system,
depending on such things as which applications are running
and/or the number of active users.
There are several "rules of thumb" which can be used to
determine how much <paging> space is needed:
Rule 1
The install process will create <paging> space equal to two
times memory (2X) for systems with less than 64MB of RAM.
For systems with 64MB of RAM or more, the <paging> space will
be RAM size + 16MB. Please note that while this may be
applicable to some computing environments, it may not be
enough <paging> space for others.
Rule 2
Set <paging> space equal to two times RAM. However, systems
with large amounts of memory typically do not need such
large amounts of <paging> space. If the machine is in a "per-
sistent storage environment", meaning that it has a few
small programs and a large amount of data, it may not need
even as much as one times RAM for <paging> space. For
example, a 1GB database server running on a RISC System/6000
with 256MB of RAM and only running about 50MB of "working"
storage does not need 512MB of <paging> space, or even 256MB
of <paging> space. It only needs the amount of <paging> space
that will allow all the working storage to be <paged> out to
disk. This is because the 1GB database is mostly "per-
sistent storage" and will require little or no <paging> space.
So, keep in mind that more <paging> space is not necessarily
good, since any unused <paging> space is simply wasted disk
<Paging> Space Tips for AIX 3.2 1 4.1 1
space. *BUT*, if you do not have enough <paging> space, a
variety of unpleasant symptoms can occur on your system.
Rule 3
The "two times RAM" rule is a good starting point for
systems with 256MB of RAM or less. Use the following
equation for systems with more than 256MB of RAM:
<Page> Space = 512 + ( RAM - 256 ) * 1.25
Rule 4
If a disk drive containing an active <paging> space logical
volume is removed from the system, the system will crash.
THINGS TO CONSIDER WHEN CREATING OR ENLARGING <PAGING> SPACE
o Do not put more than one <paging> space logical volume on
a physical volume.
All processes that are started during the boot process
are allocated <paging> space on the default <paging> space
logical volume (hd6). After the additional <paging> space
logical volumes are activated, <paging> space is allocated
in a "round robin" manner in 4KB "chunks". If you have
<paging> space on multiple physical volumes and you put
more than one <paging> space on one physical volume, you
will no longer be spreading your <paging> activity over
multiple physical volumes.
o Do not extend a <paging> space logical volume onto mul-
tiple physical volumes.
If a <paging> space logical volume is spread over multiple
physical volumes, you will not be spreading your <paging>
activity across all of your physical volumes. If you
want to allocate space for <paging> on a physical volume
that does not already have a <paging> space logical
volume, create a new <paging> space logical volume on that
physical volume.
o Make each <paging> space logical volume roughly equal in
size.
If you have <paging> spaces of different sizes, when the
smaller ones become full, you will no longer be
spreading your <paging> activity across all of your phys-
ical volumes.
o Avoid putting a <paging> space logical volume on the same
physical volume as a heavily active logical volume, such
as that used by a database.
o It is not necessary to put a <paging> space logical volume
on each physical volume.
<Paging> Space Tips for AIX 3.2 2 4.1 2
HOW WILL YOU KNOW IF YOU NEED MORE <PAGING> SPACE?
o If any of the following messages appear on the console
or in response to a command on any terminal:
"INIT: <Paging> space is low"
"ksh: cannot fork no swap space"
"Not enough memory"
"Fork function failed"
"fork () system call failed"
"Unable to fork, too many processes"
"Fork failure - not enough memory available"
"Fork function not allowed. Not enough memory
available."
"Cannot fork: Not enough space"
o If the average of the "%Used" column of the "lsps -a"
output is greater than 50.
o If the "Percent Used" column of the "lsps -s" output is
greater than 80.
o Use the following commands to help you determine if you
are running low on <paging> space:
iostat
vmstat
The commands in the /usr/lpp/bosperf directory
<Paging> Space Tips for AIX 3.2 3 4.1 3
SPECIAL NOTICES
Please use this information with care. IBM will not be
responsible for damages of any kind resulting from its use.
The use of this information is the sole responsibility of
the customer and depends on the customer's ability to eval-
uate and integrate this information into the customer's
operational environment.
[-----------------------------]
In article <4oau3s$1...@mirv.unsw.edu.au>, gun...@agsm.unsw.edu.au (Gunther Feuereisen) writes:
> Hi,
>
> I have a question regarding paging space - specifically the 2:1 rule.
>
> As far as I know, 2:1 is the accepted rule (thought in AIX 3.2.5+ I find
> 3:1 works better). Now this is fine with machine up to about 64 MB RAM.
> What happens when you have 128 MB, 256 MB or 512 MB? Does the 2:1 rule
> still apply? Can you get away with less?
The only "rule of thumb" I give out is that paging space >= real RAM.
That's it. What the best size for any system depends of the process load
of the machine. THe only way to determine that is to monitoer the running
system and take measurements of page space utilization. People buy extra memory
to get away from swapping out. Why penalize the situation further by making
unneccesary demands on disk space for underutilized swap partitions?
The 2:1 rule has been around since AIX 3.1 because the algorithm that was
utilized then tended to do that for memory sizes that were typical then. It
got a life of its own because of it. Instead, monitor the utilization of the
machine and make choices from that. If you use lsps -a to find your pagespace
use and find values of 10-15%, you probably have too much allocated. On the
other hand, if you have values >85-90%, you need get some more. Same goes
if you have processes killed or suspended for lack of swap.
Be aware of a few things.
1. Adding paging space to a system that is thrashing will not help it at all.
You need more RAM. Additional page spaces will only help you thrash a
little more efficiently.
2. It is better to have several smaller page spaces allocated on different
disks than one large one. This allows the system to swap more efficiently
as well. Also, you can remove a swap partition, if you find you have
overallocated, easier.
3. Page spaces do not have to all reside in the rootvg.
BTW, when you install AIX 4.1 (new install, not migrate or preservation),
the system will only allocate a 32MB page space initially, regardless of
the memory size you started with. I did this to a system with 224 MB of RAM
and still only had a 32MB hd6.
>
> Questions/Opinions/Thoughts very welcome.
> --
> |
> Gunther Feuereisen _===_
> Unix Systems Administrator =====
> `|'
> The Australian Graduate School of Management | ____
> The University of New South Wales | ___ | |
> Sydney 2052 Australia | | | | |
> Tel: 61 2 9931 9314 Fax: 61 2 313 7279 __|__| |__| |^
> Email: gun...@agsm.unsw.edu.au ^^| | | | ||^^
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Jaime Vazquez e-mail address: ja...@austin.ibm.com
RISC System/6000 OEM Consulting Services, IBM-Austin/9810
<All standard disclaimers apply. Non-standard disclaimers do too.>
: In article <4oau3s$1...@mirv.unsw.edu.au>, gun...@agsm.unsw.edu.au (Gunther Feuereisen) writes:
: > Hi,
: >
: > I have a question regarding paging space - specifically the 2:1 rule.
: >
: > As far as I know, 2:1 is the accepted rule (thought in AIX 3.2.5+ I find
: > 3:1 works better). Now this is fine with machine up to about 64 MB RAM.
: > What happens when you have 128 MB, 256 MB or 512 MB? Does the 2:1 rule
: > still apply? Can you get away with less?
: The only "rule of thumb" I give out is that paging space >= real RAM.
Yes, thank you. Finally someone who agrees with me on this instead of
just quoting old IBM recommendations. Just allow me to stress the need
to allocate AT LEAST as much paging space as RAM. If you don't you can
run into problems with applications that use Semaphores/Shared memory.
It seems that thay make a copy of shared memory (or is it semaphores? I
haven't had my coffee yet) in paging space whether or not it is paged
out.... You won't be paging, but can run out anyway. I ran into this
while testing machines at the IBM center, 2 gig ram 768 meg swap, had
over 1 gig free RAM, no paging going on, machine basically locked up
when our database program allocated too much shared memory and it was
all copied in the paging space....
: That's it. What the best size for any system depends of the process load
: of the machine. THe only way to determine that is to monitoer the running
: system and take measurements of page space utilization. People buy extra memory
: to get away from swapping out. Why penalize the situation further by making
: unneccesary demands on disk space for underutilized swap partitions?
: The 2:1 rule has been around since AIX 3.1 because the algorithm that was
: utilized then tended to do that for memory sizes that were typical then. It
I just wish others would figure this out...
: got a life of its own because of it. Instead, monitor the utilization of the
: machine and make choices from that. If you use lsps -a to find your pagespace
: use and find values of 10-15%, you probably have too much allocated. On the
You can also use a program called monitor available on the net somewhere
(sorry I don't remember where). It gives you real-time monitoring of all kinds
of "stuff" including paging space use.
: other hand, if you have values >85-90%, you need get some more. Same goes
: if you have processes killed or suspended for lack of swap.
: Be aware of a few things.
: 1. Adding paging space to a system that is thrashing will not help it at all.
: You need more RAM. Additional page spaces will only help you thrash a
: little more efficiently.
: 2. It is better to have several smaller page spaces allocated on different
: disks than one large one. This allows the system to swap more efficiently
: as well. Also, you can remove a swap partition, if you find you have
: overallocated, easier.
I agree completely. My personal opinion is that paging space should be
allocated before any other applications so you can place one swap space
on each drive, without "spilling over" to other drives, and try to make
them all the same size, or as close as you can get.
: 3. Page spaces do not have to all reside in the rootvg.
And probably shouldn't.
: BTW, when you install AIX 4.1 (new install, not migrate or preservation),
: the system will only allocate a 32MB page space initially, regardless of
: the memory size you started with. I did this to a system with 224 MB of RAM
: and still only had a 32MB hd6.
Another reason to create your paging space first....
: >
: > Questions/Opinions/Thoughts very welcome.
: > --
: > |
: > Gunther Feuereisen _===_
: > Unix Systems Administrator =====
: > `|'
: > The Australian Graduate School of Management | ____
: > The University of New South Wales | ___ | |
: > Sydney 2052 Australia | | | | |
: > Tel: 61 2 9931 9314 Fax: 61 2 313 7279 __|__| |__| |^
: > Email: gun...@agsm.unsw.edu.au ^^| | | | ||^^
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: --
: Jaime Vazquez e-mail address: ja...@austin.ibm.com
: RISC System/6000 OEM Consulting Services, IBM-Austin/9810
: <All standard disclaimers apply. Non-standard disclaimers do too.>
--
============================================================
Jack Madison //
e-mail: jmad...@netcom.com \X/ AIX Systems Analyst
============================================================