Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swap Space

Status
Not open for further replies.

copperslim

Technical User
Dec 13, 2002
101
GB
Hi

Can anyone advise me on how to increase me swap space and also see what programme is using the space.

 
To increase your paging space use the fastpath smit pgsp.
This will give option to increase an existing paging space or add a new one. Be wary of increasing hd6 to much as you cannot easily remove or shrink it.

As rule total paging space should be twice server physical memory.

The simplest way to see what is using paging space is via the topas command (contained within peragent.tools fileset).
Topas gives a continual updating screen for various AIX parameters.
 
lsps -a
lsps -s

What is using it?

svmon -P | grep Pid

Look for Pgsp (in pages)
 
lsps -s report percentage going up and down.
How do I find out which users or programe is using the space and kill them off

 
That's what "svmon -P | grep -p Pid" is for. It will show each process and how much paging space it's using. Look for the Pgsp column.
 
Thanx theycallmetim

I have this reading from lsps -s
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging hdisk2 vg3 2048MB 60 yes yes lv
hd6 hdisk0 rootvg 2048MB 0 no yes lv

If I use swapon -a whiles the server is used will it create any problem?
 
if you execute a ps -ela, the second fields (running status) says if a process is currently swapped (if you have a W in that field)
 
ps -ela|more
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
200003 A 0 1 0 0 60 20 1800c 976 - 1:20 init
240001 A 0 2668 5694 0 60 20 22271 1076 - 0:07 sendmail
240001 A 0 2952 1 0 60 20 1a16d 72 112e78 - 0:00 shlap
240001 A 0 3970 5694 0 60 20 1c26e 400 - 0:01 syslogd
240401 A 0 4648 1 0 60 20 180ec 336 - 0:00 ssa_daemon
240001 A 202 4984 1 0 64 22 1631d 28540 317ab374 - 0:01 oracle
 
I have done it, there is no W in the second fields

ps -ela
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
200003 A 0 1 0 0 60 20 1800c 976 - 1:20 init
240001 A 0 2668 5694 0 60 20 22271 1076 - 0:07 sendmail
240001 A 0 2952 1 0 60 20 1a16d 72 112e78 - 0:00 shlap
240001 A 0 3970 5694 0 60 20 1c26e 400 - 0:01 syslogd
240401 A 0 4648 1 0 60 20 180ec 336 - 0:00 ssa_daemon
240001 A 202 4984 1 0 64 22 1631d 28540 317ab374 - 0:01 oracle
 
what says your vmstat?
Try an "vmstat 3 5"
 
This is what I get..
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
0 1 333496 319 0 21 14 214 826 0 215 479 382 19 14 53 15
1 2 333496 315 0 0 0 0 0 0 241 7748 17227 36 36 28 0
4 2 333496 313 0 0 0 0 0 0 243 6528 20696 39 35 25 1
2 2 333496 311 0 0 0 0 0 0 247 4662 27142 36 47 17 0
2 2 333496 310 0 0 0 0 0 0 239 4027 31096 38 50 12 0


 
If I issue the command swapon -a.. Will it make hd6 active.
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging hdisk2 vg3 2048MB 60 yes yes lv
hd6 hdisk0 rootvg 2048MB 0 no yes lv
 
Yes, swapon -a should make hd6 active or you could do swapon /dev/hd6

btw, what does your svmon -G output say?
 
Just for your info, the "official" formula to calculate paging space size, as per the AIX Cert guide:

The general recommendation is that the sum of the sizes of the paging spaces should be equal to at least twice the size of the real memory of the machine up to a memory size of 256 MB (512 MB of paging space). For memories larger than 256 MB, the following rule is recommended:

Total paging space = 512 MB + (memory size - 256 MB) * 1.25


IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
theycallmetim
The information required;
svmon -G
size inuse free pin virtual
memory 524263 523547 716 34578 343489
pg space 524288 357530

work pers clnt
pin 34578 0 0
in use 295941 227606 0
 
theycallmetim Can I run swap /dev/hd6 whiles system is being used by users or is it safe to run this command in runlevel 1
 
swap -a is OK (same as swapon)
swap -l is OK
swap -s is OK
swap -d (it's already not active)

just swap /dev/hd6 shouldn't do anything. What do you want to happen?

BTW: the reason why I asked for svmon -G is to see what is actually using your memory.

From your prev e-mail:
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
0 1 333496 319 0 21 14 214 826 0 215 479 382 19 14 53 15



your free list is low and you may be swapping things you don't need to, and maybee don't need to increase your swap space. (I'm a big believer that if you don't need it, don't create it. - It's better to just buy more memory.)
What do vmo -L and ioo -L output? If maxperm% is still 80 you may want to lower it to around 30% or less. (You're currently using ~50% of mem as persistant storage. If you lower the maxperm% to less that this you shouldn't see any paging and then don't need the extra space)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top