1832757 Members
3141 Online
110045 Solutions
New Discussion

Re: problem of swap

 
kacou
Regular Advisor

problem of swap



I have a problem with my swap. How can i increase the swap. See the error message and the swappon command result

-------------------

Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 81920000 3381024 78538976 4% 0 - 1 /dev/vg00/lvol2
reserve - 78538976 -78538976
memory 63766620 59904392 3862228 94%

---------------------

Jul 24 10:43:57 SVR-EDW sshd[13989]: error: openpty: Not enough space

Jul 24 10:43:57 SVR-EDW sshd[14003]: error: session_pty_req: session 0 alloc failed

Jul 24 10:43:57 SVR-EDW sshd[14003]: Disconnecting: fork failed: Not enough space

Jul 24 10:50:23 SVR-EDW vmunix: Deferred swap reservation failure pid: 14195


34 REPLIES 34
YAQUB_1
Respected Contributor

Re: problem of swap

Hi,

See the below thread, hope it will help 4 U....

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1237338

BR/
Yaqub
Grayh
Trusted Contributor

Re: problem of swap

hi,

looks ok.

E.g. output

swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
dev 9728 0 9728 0% 0 - 0 /dev/vg01/swap01
reserve - 470 -470
memory 6310 927 5383 15%
total 16550 1397 15153 8% - 0 -
The following might be of help to you

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=58315

Grayh
Trusted Contributor

Re: problem of swap

If you extend an existing swap space, the new space will be used only after a reboot.

If you want to add more swap to this system while it is running, you must add a second swap area.
V. Nyga
Honored Contributor

Re: problem of swap

Hi,

I assume you've posted:

1) your error message

2) your swapon result

to 1) what's your problem with swap?
You've use 4% of 80000MB, so about 78GB swap.
So you've plenty of swap!
So I believe you don't need your second command!

to 2) what was your command?
Seems like you wanted to add more space than you have at your system.
Do and post 'vgdisplay -v /dev/vg00' like mentioned in the thread linked in the previous post (if you still want to increase swap!)

Volkmar
*** Say 'Thanks' with Kudos ***
SUDHAKAR_18
Trusted Contributor

Re: problem of swap

kacou
Regular Advisor

Re: problem of swap

# vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4465
VGDA 4
PE Size (Mbytes) 64
Total PE 8912
Alloc PE 8768
Free PE 144
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0.0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 1792
Current LE 28
Allocated PE 56
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 80000
Current LE 1250
Allocated PE 2500
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 50048
Current LE 782
Allocated PE 1564
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 60032
Current LE 938
Allocated PE 1876
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 8
Allocated PE 16
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 128
Current LE 2
Allocated PE 4
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 4032
Current LE 63
Allocated PE 126
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 60032
Current LE 938
Allocated PE 1876
Used PV 2

LV Name /dev/vg00/lvol_appl
LV Status available/syncd
LV Size (Mbytes) 24000
Current LE 375
Allocated PE 750
Used PV 2


--- Physical volumes ---
PV Name /dev/disk/disk2_p2
PV Status available
Total PE 4456
Free PE 72
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk5_p2
PV Status available
Total PE 4456
Free PE 72
Autoswitch On
Proactive Polling On


Michael Steele_2
Honored Contributor

Re: problem of swap

Hi kacou

I'm not sure what your question is. You have 9216 mg available though. 64 * 144 or PE_SIZE * FREE_PE.

What's up? The posted threads are correct. Just make sure you use the -C contiguous option. For swap must be contiguous.
Support Fatherhood - Stop Family Law
Paul McCleary
Honored Contributor

Re: problem of swap

Hi,

Every existing lvol in vg00 is mirrored and you have 4608MB free on each of the two physical volumes in vg00 for you to create additional swap space. You should use a different priority that your primary swap.

Is this definitely the issue though, as mentioned in a previous post there seems to be a large amount of swap space free?

Paul
kacou
Regular Advisor

Re: problem of swap

how can i use the -C option?
see below my sam result

------------
HP-UX System Management Homepage (Text User Interface)
SMH->Disks and File Systems->Logical Volumes->Details
--------------------------------------------------------------------------------
Logical Volume /dev/vg00/lvol2
--------------------------------------------------------------------------------
LV Name /dev/vg00/lvol2
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 80000
Current LE 1250
Allocated PE 2500
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default
Type LVM
-----------------------------------------------------------------------SCROLL \/
x-Exit smh f-Show VG Details i-Show Mirror Details e-Extend LV
ESC-Back p-Show PV Details m-Modify LV Ctrl o-Other Actions
V. Nyga
Honored Contributor

Re: problem of swap

Hi michael,

but he has a mirrored system, so 2x 72 PEs.

kacou - as you will have read in the other threads, you can't increase your current swap. You'll have to create a new one!

Maybe you'll have to break the mirror first!

You really need more swap?

What does 'vmstat -n' says? (pi and po are your swap stats ...)

V.
*** Say 'Thanks' with Kudos ***
kacou
Regular Advisor

Re: problem of swap

# vmstat -n
VM
memory page faults
avm free re at pi po fr de sr in sy cs
2140910 139239 0 0 2 6 0 0 16 2168 16508 229
CPU
cpu procs
us sy id r b w
0 1 99 1 0 0
0 2 98
0 2 98
0 2 97
0 2 98
0 2 97
0 2 98
0 1 99
#
V. Nyga
Honored Contributor

Re: problem of swap

You *CAN'T* increase your current 'Logical Volume /dev/vg00/lvol2'

V.

*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: problem of swap

Hi again,

I would recommend to do nothing at the moment!
Check your vmstat for a period of time.
If pi and po don't increase much (here are also threads about this issue - if I remember right less than 3 digits are ok) it doesn't matter.
Also as long as you don't get error messages from an application - why changing the system?
When you want to change anything, buy more RAM!
Every swapping in a system is slowing it down.
But as long as you don't have more than 50% I would do nothing with the swap configuration - you have 4% usage!

V.
*** Say 'Thanks' with Kudos ***
Tim Nelson
Honored Contributor

Re: problem of swap

Guys,

Is adding more device swap the the 80GB of space he already has the solution to this problem ?

I see 11.31 64GB server with 80GB of device swap of which only 4% is used ( at one time ).

Is something else wrong here ?

I would say there is a swcunk kernel setting issue. Older systems had maxswchunk limiting the number of chunks and you had to increase the chunk size to be able to use all the memory in large systems ?

Is it an issue with a single 80GB swap vol ?



kacou
Regular Advisor

Re: problem of swap

i don't cacth you. is it a problem of memory (physical memory) or a problem of swap? what's does the 94% mean? And what's does the 4% mean?
--------------------------------
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 80000 3242 76758 4% 0 - 1 /dev/vg00/lvol2
reserve - 76725 -76725
memory 62272 58627 3645 94%
total 142272 138594 3678 97% - 0 -
#
Paul McCleary
Honored Contributor

Re: problem of swap

Hi,

This is what people are questioning as:

4% is the amount of device swap you are using, i.e lvol2 in vg00

94% is the amount of memory reserved under the pseudo-swap model for swap space

pseudo-swap allows 75% of memory to be used by processes when they start to "reserve" swap space. No memory is actually used for swap. This model is so that on large memory systems you don't have to create massive swap devices (which you're not going to use as you shouldn't be swapping anyway) just to allow you to use your memory.

Hth,
Paul
Tim Nelson
Honored Contributor

Re: problem of swap

Michael Steele_2
Honored Contributor

Re: problem of swap

Wait a minute. I'm confused about the advice being posted. He's out of swap. He's at 94%. And while this number may fluctuate, he's still at 94%.

So add more swap. And mirror it. Geez, you guys, what happens if a unmirrored swap disk fails? The box crashes. Not mirroring swap is what windows people do.

Add in another lvol of swap. Follow the procedures posted above. Make sure you mirror it. Ignore the times 2 reply above. And make sure its contiguous and entered into /etc/fstab.

As for pseudo swap, its just used to make applications run. All it does is fake out the application by making it think its been assigned swap when it hasn't. You could call it ghost swap instead of pseudo.
Support Fatherhood - Stop Family Law
kacou
Regular Advisor

Re: problem of swap

Is it a physical memory problem? or a swap problem?

How can i check the physical memory occupation? or can can i know if the physical memory is enought?
Michael Steele_2
Honored Contributor

Re: problem of swap

Lanuch glance. Look at the memory status bars at the top of the report.
Support Fatherhood - Stop Family Law
kacou
Regular Advisor

Re: problem of swap

glance doesn't work on my server. What can i use another?

# uname -r
B.11.31
# model
ia64 hp server rx7640
#
Michael Steele_2
Honored Contributor

Re: problem of swap


'top' will give you output like so:

Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.42 1.6% 0.0% 0.6% 97.8% 0.0% 0.0% 0.0% 0.0%
1 0.41 0.4% 0.0% 0.6% 99.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.42 1.0% 0.0% 0.6% 98.4% 0.0% 0.0% 0.0% 0.0%

Memory: 354228K (274664K) real, 647312K (516756K) virtual, 2564796K free Page# 1/1

There is also more specific ways using UNIX95 and 'ps'.

By GID:

$ UNIX95=1 ps -efo sz,vsz,comm | sort -rn | more

By user

$ UNIX95=1 ps -u uidlist -o sz,vsz,cpu,comm | sort -rn | more

Glance has a trial version. It requires no license. It is much easier to use.
Support Fatherhood - Stop Family Law
V. Nyga
Honored Contributor

Re: problem of swap

Michael - Tim's doc says like I understood the output of swap_info - the running processes *would* reserve the space announced in the line memory - used (+33%).
So it only indicates the used physical memory, not the used swap.
So RAM is used at a very high level ...
Glance would say it better, that's right.

I think Tim has deserved 10 pts. for the link ...

V.
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: problem of swap

It probably goes into more detail in Tim's document but for novice users, only look at the total line. This shows you only have 4 Gb free.
Looking at "memory", it shows 3 Gb is free.
As for device sway, it says ALL of it is reserved, even though it has only written to 4% of it.
So you need more device swap, or to reduce the VM usage. You may be wasting too much space in the file cache: dbc_max_pct
See:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1252847