- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- HPE 9000 and HPE e3000 Servers
- >
- Swap Space Help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2002 01:10 PM
тАО04-19-2002 01:10 PM
I would like to seek opinion about the swap size whether it is enough:
right now I have 1G memory, so 2G swap space has already in place. In the near future I am going to increase physical memory to 2G, but I don't have much space for swap anymore.
Question:
Would 2G swap size still be OK? Any impact such as process crash would occur?
Thanks a lot if offer any help and comments.
Steven
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2002 01:49 PM
тАО04-19-2002 01:49 PM
Solution# swapinfo -tam
So for now analyze your swap space utilization and set a baseline for future comparison.
Now to answer your question "2GB swap still ok?" .. When you add your additional 1GB RAM which makes it 1:1 the pseudo-swap (swapmem_on) will come into play if needed. By default pseudo-swap is already enabled on your system and it allows to have the "extra-virtual-swap" by reserving the space from the RAM upon system bootup. Again at that point in time hopefully you will then have an idea how the system behave and be able to decide if you need more actual swap space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2002 03:51 PM
тАО04-19-2002 03:51 PM
Re: Swap Space Help
on the system. Some of the effects that a system can have are not being able to
access all of the physical memory that is installed on the system. The kernel
will only allow a process to spawn if there is enough free space within the swap
area for the process. Applications also rely on swap, and will produce memory
related errors such as malloc or fork failed when there is not enough swap
configured. If the system does need to swap processes from physical memory to
swap area, additional disk I/O will be performed. The kernel will also use
additional resources to monitor memory and to handle the movement of the
processes to the swap device. This additional overhead will reduce system
performance. If the problem is serious, it is possible for the system to use all
cpu or other resources on process management. Once the system has reached this
state, it is refereed to as Thrashing..
You should at least configure a 1:1 ratio of swap to physical memory. This is a
fundamental ratio that will allow you to access the entire physical ram and to
handle most of the operating system's needs for swap. However, applications
that you install may need additional swap configured. You should contact the
vendor or supplier for recommendations for additional swap. It is not uncommon
to find systems with 4 times the amount of swap as physical memory.
If you were interested in learning more about swap, I would suggest reading
through the memory managment white paper. This document is stored on the system
in /usr/shar/doc and is called mem_mgt.txt. There is also information about swap
from the system administration tasks manaul(10.x) and from the configuring
systems for work groups(11.x). Both manuals can be seen at :
http://www.docs.hp.com.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2002 09:17 PM
тАО04-19-2002 09:17 PM
Re: Swap Space Help
if you are running same applications with same user load in the future also , you may not have to increase your swap space , after you upgrade your memory.
But if you want to run more applications and want to handle more load in future , you have to increase your swap space also after you upgrade your memory. otherwise you may have to face performance degradation.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2002 10:57 AM
тАО04-22-2002 10:57 AM
Re: Swap Space Help
I have kernel parameter swapmem_on =1, and have glance results (see attachment).
Memeory hog is Oracle db.
Any comments are appreciated.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2002 11:52 AM
тАО04-22-2002 11:52 AM
Re: Swap Space Help
One more thing you should post after the swap priority are changed is the glance snapshot of "memory report". Run glance and in the main glance window enter "m", and post the data here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2002 06:14 PM
тАО04-22-2002 06:14 PM
Re: Swap Space Help
As mentioned, swapmem_on should be set to 1 so that swap space is additive. If you have 2Gb of RAM and run a total of 2.5Gb of processes, then you'll only need 700-1000 megs of swap space. The 1:1 relationship between RAM and swap is only required when swapmem_on=0 in the kernel. There are some very old stories about the required swap space being 2x to 10x RAM size. That has not been true for more than 7 years.
The key to looking at RAM and swap is: when RAM is too small then paging (swap) will occur and everything will run VERY slowly. The PO metric from vmstat (or Page Outs in Glance) indicate actual paging. Dozens to hundreds of pages means RAM is way too small.
If the page out rate is low but processes complain about running out of RAM (malloc error, etc) there can be several reasons. First, there must be enough swap space to hold everything that overflows from RAM (plus some for memory mapped files). If swapinfo -tm does not show full swap areas, all is well. If it is almost full, then add more swap--as long as the page out rate is not high. If it is high, add more RAM rather than swap space.
However, processes will complain about memory when they encounter a kernel fence such as maxdsiz. Unfortunately, the error message can't define the true reason, so increase maxdsiz to be larger than the largest program. Programs may also complain about shared memory and this is a long topic for 32bit programs. For the details, look at the white papers in /usr/share/doc on process and memory management.
Bill Hassell, sysadmin