- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Confusion abot memory and swap space
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
Forums
Discussions
Discussions
Discussions
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
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
06-24-2002 01:18 AM
06-24-2002 01:18 AM
Confusion abot memory and swap space
I have a HP 9000 server running 10.20.
I am somewhat confused by the memory/swap info.
SAM shows the following :
Physical Memory: 320.3 MB
Swap Space: Avail: 256 MB
Used: 234 MB
But if I run swapinfo :
Mb Mb Mb PCT
TYPE AVAIL USED FREE USED
dev 128 0 128 0%
dev 128 15 113 12%
reserve - 220 -220
memory 231 185 46 80%
total 487 420 67 86%
If the system has 320MB RAM, why is this not being displayed with swapinfo? Also, why does swapinfo only indicate that 12% of swap space is used when SAM shows otherwise?
The reason I ask this is that last week the system ground to a halt saying:
insufficient swap or memory available, and I am trying to work out if the swap space need to be increased?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 02:31 AM
06-24-2002 02:31 AM
Re: Confusion abot memory and swap space
The swapinfo command does NOT show how much memory you have installed. The memory line from the swapinfo command is displayed if you have memory configured to be used as swap (in case you dont have enough device swap).
So, from your swapinfo command you have;
2x 128MB device swap areas (256 MB total)
Memory swap is switched on - should it be necessary.
You have some device swap used (12% on one of the 128 MB areas) which means you are OUT of physical memory and paging is ocurring.
And yes - you should have device swap set to physical memory size as a minimum. Youre wasting memory using some of it as swap instead of using device swap. I would add another 64 MB of device swap asap. This should releive some of your memory pressure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 02:47 AM
06-24-2002 02:47 AM
Re: Confusion abot memory and swap space
I have plenty of disk space to increase the device swap.
I just wanted to check - if memory swap is enabled as well as device swap - will it use the memory swap first?
Should I expect to see the memory swap so high?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 02:51 AM
06-24-2002 02:51 AM
Re: Confusion abot memory and swap space
2 - memory swap (psudo-swap) will be used if the kernel parameter swapmem_on = 1
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 02:52 AM
06-24-2002 02:52 AM
Re: Confusion abot memory and swap space
The memory line from swapinfo firstly shows in the available column how memory could be used for swapping if needed, the used column shows how much is already used by programs which are locked into memory (shared memory for databases or other apps etc.) which basically means you cant use it (only unlockable memory can be used for memory swap) so even though the memory line shows 80% used this is nothing for you to worry about - it just shows your server is under memory pressure. Adding another device swap area will reduce it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 05:37 AM
06-24-2002 05:37 AM
Re: Confusion abot memory and swap space
swapspace = 1.5 * phys.memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 06:18 AM
06-24-2002 06:18 AM
Re: Confusion abot memory and swap space
Also there is small c program that you can run to get teh o/p in the following format if you want :.
Memory Stat total used avail %used
physical 32764.0 10640.1 22123.9 32%
active virtual 1784.9 245.5 1539.4 14%
active real 1963.9 267.1 1696.7 14%
memory swap 26522.5 5508.9 21013.6 21%
device swap 3332.0 3332.0 0.0 100%
I have attached the program all you ahve to do is to recomiple it and run it .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 07:28 AM
06-24-2002 07:28 AM
Re: Confusion abot memory and swap space
I have added another "device swap".
swapinfo is now showing :
TYPE AVAIL USED FREE USED
dev 128 0 128 0%
dev 128 0 128 0%
dev 400 0 400 0%
reserve - 216 -216
memory 231 135 96 58%
None of the 3 device swap areas are being used, yet the memory swap is.
Should this be the other way round ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 07:46 AM
06-24-2002 07:46 AM
Re: Confusion abot memory and swap space
You see some used value in memory portion of your swapinfo - doesn't mean that the memory is being used.
Whenever a process comes up, the system reserves a portion of swap called "reserve" for it so that there will be enough space in the swap to allow page outs in case needed.
If you enable swapmem_on parameter (by default), a 3/4th of memory can be seen as swap area (pseudo swap) so that the reserve space can be more than the swap on the physical storage.
It is to be realized that the pseudo swap locks the pages. So, the amount of lockable memory may decrease affecting the application.
So, this kernel parameter is not really useful for systems with low memory. It is better to add extra swap from the devices.
I suggest you disable this kernel parameter and add more swap from the devices. Also make sure to keep track of total row in swapinto -t not to go beyond 90% in the user column.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2002 01:31 AM
06-26-2002 01:31 AM
Re: Confusion abot memory and swap space
> Should this be the other way round ?
No, it first uses the 'memory swap' (*pseudo* swap, "memory" line), i.e. no *real* swapping occurs, also not *within* memory. Only when memory can no longer hold all the processes/data, *real* 'swapping' (actually paging) will occur and the USED field of the "dev" lines will be non-zero.
Bottom line is to use "-t" (as you used in earlier examples) and *only/mainly* look at the "total" line of "swapinfo -t". As you have found, correctly interpreting the other lines is not simple and often leads to incorrect conclusions (both (overly) negative and (overly) positive).