1825777 Members
2170 Online
109687 Solutions
New Discussion

Swap space & memory

 
SOLVED
Go to solution
Rommel Cuevas
Occasional Advisor

Swap space & memory

Hello everyone, i have a swap and memory configuration problem with my HP machine. it never use the allocated swap space. she only using the physical memory. pls tell me how can i fix this. beleow is the result of
swapinfo -tam and a portion on /stand/system.

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
reserve - 1024 -1024
memory 3154 1999 1155 63%
total 4178 3023 1155 72% - 0 -



* Tunable parameters(/stand/system)

STRMSGSZ 65535
max_thread_proc 3000
maxdsiz 0X7B03A000
maxfiles 2048
maxfiles_lim 2048
maxssiz 0XF424000
maxswapchunks 512
maxusers 512
ncallout ((16+NPROC)*3-252)
nfile ((16*(NPROC+16+MAXUSERS)/10+127+2*(NPTY+NSTRPTY+NSTRTEL))*6)
nkthread ((((NPROC*7)/4)+16)*2-1270)
nproc ((20+8*MAXUSERS)/2+10)
npty 120
nstrpty 120
nstrtel 120
shmmax 0X1DCD6500
swapmem_on 1


3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: Swap space & memory

Actually you NEVER EVER want to have to use your swap space (ie. have processes have to page out to device swap).

Swap space only REALLY ever needs to be used for RESERVATION purposes. If you ever see your USED% on the 'dev' line go above 0, then you are probably short on RAM.

Your configuration looks good to me.
Sridhar Bhaskarla
Honored Contributor

Re: Swap space & memory

Hi,

If you are worrying about 1999 KB Used in the memory line of your swapinfo -tam, then don't worry about it. It's not actually the usage. Enabling swapmem_on kernel parameter will make the system to allocate 75% of memory as swap space initially. This is only for the calculation purposes and it will not be used physically. As the system continues to run, memory will be consumed by the system and it will be *unaccounted* from the swap usage. Hence you see it as used (a misnomer).

With the introduction of this parameter, system administrators no longer have to add swap of twice the memory.

You should be worried when you start seeing your device swap used with considerable pageouts (in vmstat 5 2 output).

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Rommel Cuevas
Occasional Advisor

Re: Swap space & memory

pat & sri, i think both of u are right. thank u for the knowledge that you shared to me. you were very generous & helpful.