cancel
Showing results for 
Search instead for 
Did you mean: 

Swap is less then memory

ManojR
Occasional Advisor

Swap is less then memory

What is the impact on Server if we have less swap then physical memory.

please share your understandings

Currently i have 8GB memory and 8 GB swap in one server. What will be the impact if i add 4 GB more memory without adding SWAP due to un availability of physical space on HDD.
7 REPLIES
Michal Kapalka (mikap)
Honored Contributor

Re: Swap is less then memory

hi,

i will not recommend it.

mikap
Fabio Ettore
Honored Contributor

Re: Swap is less then memory

Hi,

with the mechanism of pseudo-swap the computation of 1:1 of memory:swap is no longer so restricted.
Currently you can find large systems with 32 Gb and over of memory but not 32 Gb also of swap. Obviously all of it depends on the load of the system and what it has to do. The pseudo-swap mechanism does the computation less restricted as it gives the system something of "virtual" swap calculated like real swap space.
You can see if pseudo-swap is enabled if you have line "memory" in swapinfo -tam.

Definitely I don't see an issue if you have 12 Gb of memory and 8 of swap and pseudo-swap enabled.
Though, fi you want to have anyway some more swap, consider that you can have secondary swap devices on other volume groups or even in other Volume Manager like VxVM. So when you state there's no space on HDD it sounds to me only about vg00.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Bill Hassell
Honored Contributor

Re: Swap is less then memory

Your system will be fine. However, the 4GB of additional RAM may not be fully used. HP-UX needs to reserve space for each process in memory, just in case it needs to be paged out. depending on the setting of swapmem_on, you may be able to use about 75% of your RAM without a matching swap reservation area. This is slightly different in 11.31 so your OS version would be useful to know.

Swap space does not have to be located on just one disk. You can add additional space on any available lvol with the swapon command. Note that this will be temporary until you add the additional space to fstab. Use swapinfo -tam to see how your RAM is being mapped to the swap areas.


Bill Hassell, sysadmin
ManojR
Occasional Advisor

Re: Swap is less then memory

Hi All,

Thanks for your feedback.

Below is the swapinfo -tam command output.

sr7_pr#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 18 8174 0% 0 - 1 /dev/vg00/lvol2
reserve - 4095 -4095
memory 8190 2124 6066 26%
total 16382 6237 10145 38% - 0 -

Do we still need to increase SWAP????
Suraj K Sankari
Honored Contributor

Re: Swap is less then memory

Hi,
All is depending upon your system load. if you are going to install some database or SAP then its recomended that swap is double of your Physical Memory.

The bottom line is depending upon your application load swap is required.

Suraj
Bill Hassell
Honored Contributor

Re: Swap is less then memory

> Do we still need to increase SWAP????

Not yet. You haven't expanded the current applications to use the extra space yet. Since you can add swap at any time without a reboot, I would just monitor things and watch for usage to move up to 80% before adding more swap. And make sure to don't have dbc_max_pct set to the insane default value of 50%. Set it to something like 3-5%.


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: Swap is less then memory

sr7_pr#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 18 8174 0% 0 - 1 /dev/vg00/lvol2
reserve - 4095 -4095
memory 8190 2124 6066 26%
total 16382 6237 10145 38% - 0 -

Total swap is only 38%. So I'd add in the 4 GB. Question: Are you running or expect to run Oracle or another application with high requirements of shared memory or SGA?
Support Fatherhood - Stop Family Law