Swap space issue.


 
Thread Tools Search this Thread
Operating Systems HP-UX Swap space issue.
# 1  
Old 09-06-2012
Question Swap space issue.

Hi,

I am not sure how many scripts / java processes running on my HP-UX server.

I need to calculate the total heap of these processes.

I then need to recommend increasing the swap memory to be increase and equal to total heap if that is the right concept.

Currently we are facing high swap memory usage and are unsure to what amount it needs to ne increased to.

Please help me with script or command to achieve the above.
# 2  
Old 09-06-2012
You may use the top command in this case. Use top to get a snapshot of the processes along with the memory consumption.
Code:
top -f top.out -n 10000 -d 1

This redirects the output to top.out file with max. 10000 process listing (hopefully that's enough for you) and it does this for only one iteration.

Now you have to sort the result for RES and SIZE columns. SIZE gives you the total virtual memory consumed by a process in KB. RES gives is equivalent to the real memory consumption of a process in KB. So, if you deduct RES from SIZE for every process and then add them all, you should get closer to the least amount of swap memory needed for running the processes.

By the way, as you may be aware of, increasing the swap memory does not actually increase the performance for long. You may need to invest in more RAM.
# 3  
Old 09-06-2012
If locally written applications are running the system out of swap space, they can change storage from malloc()/new (make space on the VW which is backed/rolled out on swap) to files attached with mmap() or the JAVA equivalent. The files in mmap are used as backing store, so all RAM is there to cache the access, but no swap is used. Reading and writing are just memory accesses. If an app crashes, the data from RAM pages will be written by VM, which can help debugging. This not only reduces swap space usage, it reduces swap traffic.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Swap space issue

I have Solaris-10 with mutiple zones running in it. My Big Brother monitoring is complaining for very less swap space available, but I am not able to find, what process has consumed its swap space and how to clear it. All zones including global server have almost blank /tmp with very less data.... (3 Replies)
Discussion started by: solaris_1977
3 Replies

2. Linux

How to reclaim the space which i used to increse the swap space on Xen,

Hi, i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :- 1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 1057 ls -l /root/myswapfile 1058 chmod 600 /root/myswapfile 1059 mkswap /root/myswapfile 1060 swapon /root/myswapfile ... (1 Reply)
Discussion started by: apm
1 Replies

3. Solaris

No Space Left - Memory/Swap issue

:wall:I'm having a bit of a problem with Solaris 10u8 and one of our applications requesting memory and being told, "no space left". The break down: 24GB Physical Memory 8GB swap at the time of occurance, here's what a memory breakdown looks like: Page Summary Pages ... (21 Replies)
Discussion started by: aychbee45
21 Replies

4. Solaris

swap space issue

HI All, Recently during oracle install I realized that I did not have enough swap space. So I - 1. Created a swap file "swap_fille1" in /rpool using mkfile - # ls -ltr /rpool total 10487121 drwxr-xr-x 3 root root 3 Dec 21 12:09 boot drwxr-xr-x 2 root root ... (10 Replies)
Discussion started by: sumeet
10 Replies

5. Solaris

Swap Space

Could someone please explain how you know how much swap space you have on your system. See below: # swap -s total: 8225048k bytes allocated + 4863488k reserved = 13088536k used, 4008032k available # swap -l swapfile dev swaplo blocks free /dev/dsk/c3t0d0s1 32,25 16... (2 Replies)
Discussion started by: jamba1
2 Replies

6. UNIX for Advanced & Expert Users

Issue with insufficient swap or memory space

Hi, When I execute one of my shellscript I am getting the below mentioned error message .This application takes 2input files which have the records counts 26463 and 1178046 exec(2): insufficient swap or memory available. exec(2): insufficient swap or memory available. exec(2): insufficient swap... (3 Replies)
Discussion started by: kavithakuttyk
3 Replies

7. Shell Programming and Scripting

Issue with insufficient swap or memory space

Hi, When I execute one of my shellscript I am getting the below mentioned error message .This application takes 2input files which have the records counts 26463 and 1178046 exec(2): insufficient swap or memory available. exec(2): insufficient swap or memory available. exec(2):... (2 Replies)
Discussion started by: kavithakuttyk
2 Replies

8. UNIX for Dummies Questions & Answers

Swap space used???

Plz I need to know how much swap mem free and used i have. I'm using Compaq Tru64 UNIX V5.1A (rev 1885) Thanx (1 Reply)
Discussion started by: Lestat
1 Replies

9. AIX

swap space / paging space

how do you get the paging space reduced without rebooting the machine ? the os is aix (2 Replies)
Discussion started by: aaronh
2 Replies

10. UNIX for Dummies Questions & Answers

pageing space vs swap space

Hello, I would like to know if there is any difference between the pageing space and the swap space. Thank you in advance. (1 Reply)
Discussion started by: VeroL
1 Replies
Login or Register to Ask a Question