Sie sind auf Seite 1von 16

Unit 10

Paging space

Copyright IBM Corporation 2009


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

5.2

Unit objectives
IBM Power Systems

After completing this unit, you should be able to:


Define paging space
Understand why it is required, sizing, and placement
guidelines
Add, change, and remove paging space
List and monitor the paging space utilization
Perform corrective actions to rectify too little or too much
paging space scenarios

What is paging space?


IBM Power Systems

Virtual Memory

Real Memory (RAM)

Paging Space

Made up of Page Frames

Active
Inactive, paged out

Memory usage
Operating System

TCP/IP

Applications

FREE

Paging space
IBM Power Systems

Is a secondary storage area for:


Inactive memory
Over-committed memory

Holds inactive pages on disk


Page size historically has been 4KB in size.
Power5+ and Power6, AIX will dynamically allocate either small
(4KB) or medium (64KB) page frames.

Is not a substitute for real memory

Sizing paging space


IBM Power Systems

hd6 is created at installation time.


The recommended paging space formula is long standing, but it will likely result in having more space than is needed.
Total paging space = 512 MB + (memory size - 256 MB) * 1.25

However, the amount needed is dependent on applications and system usage.


Paging space should be continually monitored, using:
# lsps a or # lsps s

or # svmon

Running low on paging space is bad.


New processes will not start and the system may start killing processes.

Paging space can be dynamically increased or decreased in size.

Paging space placement


IBM Power Systems

Placement guidelines:
Paging spaces roughly the same size
Only one paging space per physical disk
Use disks with the least activity.
Do not extend a paging space over multiple physical volumes.
Place on SAN disks for better performance.

hd6

paging00

paging01

Checking paging space


IBM Power Systems

## lsps
lsps -a
-a
Page
Page Space
Space Physical
Physical Volume
Volume
hd6
hdisk0
hd6
hdisk0
## lsps
lsps s
s
Total
Total Paging
Paging Space
Space
512MB
512MB
## svmon
svmon

size
size
memory
524288
memory
524288
pg
131072
pg space
space
131072
...
...
PageSize
PageSize PoolSize
PoolSize
ss
44 KB
-KB
mm 64
KB
-64 KB

Volume
Volume Group
Group Size
Size %Used
%Used Active
Active Auto
Auto Type
Type
rootvg
512MB
13
yes
yes
lv
rootvg
512MB 13
yes
yes
lv

Percent
Percent Used
Used
13%
13%

inuse
inuse
487242
487242
17223
17223

free
free
37046
37046

pin
pin
413337
413337

virtual
virtual
466371
466371

inuse
inuse
437354
437354
3118
3118

pgsp
pgsp
2087
2087
946
946

pin
pin
375289
375289
2378
2378

virtual
virtual
400643
400643
4108
4108

Paging Space Usage = (4KB * 2087) + (64KB * 946) = 68892 KB


Paging Space % Usage = (4KB * 17223) / (4KB * 131072) * 100
= 13.1%

Adding paging space


IBM Power Systems

# smit mkps

mkps s 10

-n

-a

rootvg hdisk1

Add
Add Another
Another Paging
Paging Space
Space
Type
Type or
or select
select values
values in
in entry
entry fields.
fields.
Press
Enter
AFTER
making
all
Press Enter AFTER making all desired
desired changes.
changes.
Volume
Volume group
group name
name
SIZE
of
SIZE of paging
paging space
space (in
(in logical
logical partitions)
partitions)
PHYSICAL
VOLUME
name
PHYSICAL VOLUME name
Start
Start using
using this
this paging
paging space
space NOW?
NOW?
Use
this
paging
space
each
Use this paging space each time
time the
the system
system is
is
RESTARTED?
RESTARTED?

# lsps -a
Page Space
paging00
hd6

PV
hdisk1
hdisk0

VG
rootvg
rootvg

[Entry
[Entry Fields]
Fields]
rootvg
rootvg
[10]
##
[10]
hdisk1
++
hdisk1
yes
++
yes
yes
++
yes

Size %Used Active


640MB
1
yes
512MB
16
yes

Auto
yes
yes

Type
lv
lv

Change paging space


IBM Power Systems

# smit chps

chps d 5

paging00

Change
Change // Show
Show Characteristics
Characteristics of
of aa Paging
Paging Space
Space
Type
Type or
or select
select values
values in
in entry
entry fields.
fields.
Press
Enter
AFTER
making
all
Press Enter AFTER making all desired
desired changes.
changes.
Paging
Paging space
space name
name
Volume
group
Volume group name
name
Physical
Physical volume
volume name
name
NUMBER
of
additional
NUMBER of additional logical
logical partitions
partitions
Or
NUMBER
of
logical
partitions
Or NUMBER of logical partitions to
to remove
remove
Use
this
paging
space
each
time
the
Use this paging space each time the system
system is
is
RESTARTED?
RESTARTED?

# lsps -a
Page Space
paging00
hd6

PV
hdisk1
hdisk0

VG
rootvg
rootvg

Size %Used Active


320MB
1
yes
512MB
16
yes

[Entry
[Entry Fields]
Fields]
paging00
paging00
rootvg
rootvg
hdisk1
hdisk1
[]
##
[]
[5]
##
[5]
yes
++
yes

Auto
yes
yes

Type
lv
lv

Removing paging space


IBM Power Systems

First, deactivate the paging space.


Remove the paging space.

swapoff /dev/paging00

rmps /dev/paging00

# smit rmps
Remove
Remove aa Paging
Paging Space
Space
Type
Type or
or select
select values
values in
in entry
entry fields.
fields.
Press
Enter
AFTER
making
all
Press Enter AFTER making all desired
desired changes.
changes.
[Entry
[Entry Fields]
Fields]
paging00
paging00

PAGING
PAGING SPACE
SPACE name
name

# smit chps
# lsps -a
Page Space
hd6

PV
hdisk0

VG
rootvg

Size %Used Active


512MB
16
yes

Auto
yes

Type
lv

++

Problems with paging space


IBM Power Systems

Monitor the system carefully

If paging space is running low or gets to 100% full, the system will
panic. Errors will be seen on the console, such as INIT: Paging
space is low!
The kernel will randomly start to kill processes.
UNIX version 7 manual, quote: Absolute mayhem guaranteed

Paging space too small:

Dynamically increase the size by allocating more partitions.


OR
Add an additional paging space definition to another physical disk.

Paging space too large:

Dynamically decrease the size by deallocating partitions.


OR
Remove a paging space definition.

Documenting paging space setup


IBM Power Systems

Run the lsps command.


Have a hardcopy of the /etc/swapspaces file.
** /etc/swapspaces
/etc/swapspaces
**
** This
This file
file lists
lists all
all the
the paging
paging spaces
spaces that
that are
are automatically
automatically put
put into
into
** service
on
each
system
restart
('swapon
-a)
service on each system restart ('swapon -a)
**
** WARNING:
WARNING: Only
Only paging
paging space
space devices
devices should
should be
be listed
listed here.
here.
**
** This
This file
file is
is modified
modified by
by the
the chps,
chps, mkps
mkps and
and rmps
rmps commands
commands and
and
referenced
by
the
lsps
and
swapon
commands.
referenced by the lsps and swapon commands.
hd6:
hd6:

dev
dev == /dev/hd6
/dev/hd6
auto
=
auto = yes
yes

paging00:
paging00:
dev
dev == /dev/paging00
/dev/paging00
auto
auto == yes
yes

Checkpoint
IBM Power Systems

1.

What conclusions regarding potential paging space problems


can you reach based on the following listing?
Page
Page
Space
Space

Physical
Physical Volume
Volume Size
Size %Used
%Used
Volume
Group
Volume
Group

hd6
hdisk0
hd6
hdisk0
paging00
paging00 hdisk1
hdisk1
paging01
paging01 hdisk1
hdisk1

rootvg
rootvg 640
640 MB
MB 43%
43%
rootvg
640
MB
rootvg 640 MB 7%
7%
rootvg
rootvg 160
160 MB
MB 89%
89%

Active
Active Auto
Auto Type
Type chksum
chksum
yes
yes
yes
yes
yes
yes

yes
yes
yes
yes
yes
yes

lv
lv
lv
lv
lv
lv

00
00
00

_______________________________________________
_______________________________________________
_______________________________________________
_______________________________________________
_______________________________________________
_______________________________________________
2.

True or False: The size of paging00 (in the above example)


can be dynamically decreased.

Checkpoint solutions
IBM Power Systems

1.

What conclusions regarding potential paging space problems


can you reach based on the following listing?
Page
Page
Space
Space

Physical
Physical Volume
Volume Size
Size %Used
%Used
Volume
Group
Volume
Group

hd6
hdisk0
hd6
hdisk0
paging00
paging00 hdisk1
hdisk1
paging01
paging01 hdisk1
hdisk1

rootvg
rootvg 640
640 MB
MB 43%
43%
rootvg
640
MB
rootvg 640 MB 7%
7%
rootvg
rootvg 160
160 MB
MB 89%
89%

Active
Active Auto
Auto Type
Type chksum
chksum
yes
yes
yes
yes
yes
yes

yes
yes
yes
yes
yes
yes

lv
lv
lv
lv
lv
lv

00
00
00

Obviously, it is difficult to come to any conclusions regarding the state of this


system just by looking at a snapshot picture like the one above. However, at first
glance, the following potential problems can be noticed:

2.

paging00 is underutilized
paging01 is over utilized, and the size seems to be too small. Both user-defined
paging spaces are on the same disk.
paging01 should be deleted. The administrator should investigate why there is a high
level of paging and possibly increase the size of hd6 and paging00.

True or False: The size of paging00 (in the above example)


can be dynamically decreased.

Exercise 10
IBM Power Systems

Paging
space

Unit summary
IBM Power Systems

Having completed this unit, you should be able to:


Define paging space
Understand why it is required, sizing, and placement
guidelines
Add, change, and remove paging space
List and monitor the paging space utilization
Perform corrective actions to rectify too little or too
much paging space scenarios

Das könnte Ihnen auch gefallen