- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- swap space question
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
08-01-2008 12:04 AM
08-01-2008 12:04 AM
swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 0 16384 0% 0 - 1 /dev/vg00/lvol2
reserve - 15920 -15920
memory 65506 17798 47708 27%
total 81890 33718 48172 41% - 0 -
According to the above I'm not even using any swap, what is going on here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 12:19 AM
08-01-2008 12:19 AM
Solution+ are the actual physical swap device(s)
+ show if swapping has actually occurred. In other words, the PCT USED column in the dev lines represents the value last attained during a previous period of swapping.
This is analogous to the high-water mark that a flood leaves.
+ to check to see if swapping is currently occuring, use 'vmstat -v 5 5' to see if the 'po' (page outs) is sustained above 0.
o reserve line(s)
+ indicate how much of the swap device(s) has(have) been set aside for memory should it need to be swapped.
o memory line:
+ indicative of how much of pseudo-swap has been reserved
+ when present, indicates pseudo-swap is enabled (i.e. swapmem_on kernel paraemter is set to 1, which is the default.) The size of pseudoswap is calculated to be 75% of the size of RAM (a.k.a. memory.) In other words, it does not refer to acual physical memory use. Pseudo-swap was designed specifically for large memory systems for which actual swapping is never (or rarely) expected to occur, so thereâ s less need to use actual physical disk space for swap. For more information, see swapmem_on(5) , which reads.
o total line:
+ the PCT USED value shown in the total line indicates how much swap space has been actually reserved for swap. When this percentage gets near 100%, processes will not start up (unable to fork process) and new shared memory segments can not be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 01:07 AM
08-01-2008 01:07 AM
Re: swap space question
SAM is correct if it means "device" swap.
As Anka says, you have reserved all of that device swap but haven't written any of it.
You still have lots of pseudo-swap. And 48 Gb of unallocated total swap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 01:11 AM
08-01-2008 01:11 AM
Re: swap space question
This server currently has 64GB of ram & 16GB of swap, would you recommend I allocate some more swap or leave it to see how it goes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 01:32 AM
08-01-2008 01:32 AM
Re: swap space question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 06:50 AM
08-01-2008 06:50 AM
Re: swap space question
The total field (virtual memory) includes physical memory and physical swap space. So even though the system has available virtual memory (total == physical memory + physical swap), it can't reserve any more space for new processes as all of the 16GB of physical swap space has been reserved already for existing processes.
Would you agree with this statement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 07:55 AM
08-01-2008 07:55 AM
Re: swap space question
It is entirely possible to have tons of memory swap available and have no (well, hopefully little.. the system should try to avoid freemem 0 situations) free pages of RAM available (all it takes is enough device/FS swap to handle the virtual side and enough pages touched to require all the RAM).
Similarly, it is entirely possible to have tons of RAM available and be out of memory swap (though you should be out of swap as a whole) -- just eat enough virtual address space.
What is correct in that statement is that the system total virtual address space is determined partly by the total swap available on HP-UX. Exceptions are objects that use Lazy Swap reservation (rare except for Stacks on IPF), and virtual objects which are backed by existing files on a filesystem and whose changes should be visible in the file (since you can always "swap" to the file -- you don't need explicit swap there).
But as long as you have swap available, either device, FS or memory swap -- swap reservations will use it. Restricting the system to device swap would make memory swap completely pointless.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 08:06 AM
08-01-2008 08:06 AM
Re: swap space question
swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 0 16384 0% 0 - 1 /dev/vg00/lvol2
reserve - 16260 -16260
memory 65506 22471 43035 34%
total 81890 38731 43159 47% - 0 -
So from the above output I'm assuming all is ok for the moment, would you agree?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 08:15 AM
08-01-2008 08:15 AM
Re: swap space question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 08:20 AM
08-01-2008 08:20 AM
Re: swap space question
Unable to fork: Not enough space
and as you can see its not a swap space issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 08:52 AM
08-01-2008 08:52 AM
Re: swap space question
This is when knowing your OS version is nice to double check.
First question would be if there is anything special about this perl thing (besides is it a fork bomb, anyway) -- does it mlock memory? Is it a 64-bit process trying to fork a 32-bit child or vice-versa? Are Memory Windows in use in any way?
ENOMEM can also be returned for corner cases where virtual objects can not be created for other reasons such as protection id exhaustion (is there a lot of mprotect() activity going on as well?), but usually this is all about the swap space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 08:56 AM
08-01-2008 08:56 AM
Re: swap space question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 01:39 PM
08-01-2008 01:39 PM
Re: swap space question
Someone mentioned the other day that they were unable to even run an ls.
They have managed to run this perl script on a another server but this one is a 2 cpu, 8GB of ram and not being used that much. The one is failing on has 8 cpu's and 64gb of ram.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 01:40 PM
08-01-2008 01:40 PM
Re: swap space question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 11:46 PM
08-01-2008 11:46 PM
Re: swap space question
Can you just double check the below parameters they are sufficient for your application requirement,since you have sufficient pages in psuedo swap for reserving and the systems is not even started paging .
maxdsiz
maxdsiz_64bit
maxssiz
maxssiz_64bit
maxtsiz
maxtsiz_64bit
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2008 12:42 AM
08-02-2008 12:42 AM
Re: swap space question
That would be a good time to get the swapinfo data but they may have to try several times.
>Aneesh: Can you just double check the below parameters they are sufficient for your application requirement
That wouldn't explain ls(1) above or the fact if it works some times.
>you have sufficient pages in pseudo swap
We don't know this is still true, when there is a problem.
>maxdsiz maxdsiz_64bit
Yes, if it isn't a fork bomb. But won't cause a fork issue, only malloc does that.
>maxssiz
This will reduce the heap area.
>maxtsiz maxtsiz_64bit
You should never have to worry about these.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2008 03:32 AM
08-02-2008 03:32 AM
Re: swap space question
When a process is spawned, the kernel will check virtual memory to see if there is space to accommodate the process. First the kernel checks that there is enough RAM available for the new process to run, that is not locked by other processes or used by the kernel. Then the kernel checks to make sure that the new process is able to reserve enough space in the swap area.
But as you have enough free swap because of the pseudo swap then i suppose it should not be the issue.
It will be good idea to check the free memory with "glance" before you run the perl script....or arround the time it terminates....
At the same time also #vmstat 1 10 ....pi/po
What HP-UX version do you have?
It also does not harm if you add an addtitional swap device - just for test purposes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2008 10:45 PM
08-04-2008 10:45 PM
Re: swap space question
I had increased some kernel parameters earlier in the week and rebooted this server and there were also some other ones pending that required a reboot.
From what I understand is that the guy who had the issue might of been doing something wrong as no one else actually had this issue. So its one of those problems that gets fixed and your not 100% sure what actually fixed it.
The server in question is running 11.23.
Thanks for all the excellent replys!