Help on Understanding Swap Size


 
Thread Tools Search this Thread
Operating Systems Solaris Help on Understanding Swap Size
# 1  
Old 07-23-2011
Java Help on Understanding Swap Size

Hi All,

I want to know how to understand the actual swap size.

My o/p shows as below
Code:
root@ecovs1a # swap -s
total: 4546056k bytes allocated + 358856k reserved = 4904912k used, 5046688k available
root@ecovs1a # swap -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d31     85,31     16 8395184 8395184
root@ecovs1a # df -hk
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d30         63G    38G    25G    61%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   4.8G   1.5M   4.8G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                        63G    38G    25G    61%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                        63G    38G    25G    61%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   4.8G   1.4M   4.8G     1%    /tmp
swap                   4.8G    48K   4.8G     1%    /var/run
root@ecovs1a #

If I consider the swap -s command i find my used space to be around 40%..However in the subsequent commands I find my available space to be arround 98%..Please help me to understanding how to find exact swap usage and exact swap memory available for processes.

Last edited by radoulov; 07-23-2011 at 12:10 PM.. Reason: Code tags, please!
# 2  
Old 07-23-2011
swap isn't a filesystem -- it holds no files -- so df doesn't return sensible answers for it. On some systems it's not even listed.
# 3  
Old 07-23-2011
Quote:
Originally Posted by Corona688
swap isn't a filesystem -- it holds no files -- so df doesn't return sensible answers for it. On some systems it's not even listed.
thanks for ur prompt answer dude...but all I want to know how to understand it?..How to know whats my total swap size and whats my available swap space??..normally we consider as 50% of swap file should be available for smooth operation of applications on the node..So how can I determine the same?
# 4  
Old 07-23-2011
Quote:
Originally Posted by vivek.goel.piet
but all I want to know how to understand it?..How to know whats my total swap size and whats my available swap space??
You should define what you expect swap to mean. As far as Solaris is concerned, this can be the on disk swap area, the whole virtual memory or a file system (a.k.a. tmpfs).

  • Your swap area size is 4 GB
  • Your total virtual memory size is around 10 GB, half of which been free. You have at least 6 GB of RAM but possibly much more.
  • The various file systems backed by swap are using a negligible part of virtual memory.
Quote:
..normally we consider as 50% of swap file should be available for smooth operation of applications on the node..So how can I determine the same?
There is no straight relationship between how much swap is used and a system performance. If you want the latter, just make sure you have enough RAM to avoid pagination. If you want your applications not to crash, have enough swap for all memory allocation and reservations to easily fit. Memory allocations do like RAM, memory reservations are fine with on disk swap.

---------- Post updated at 22:59 ---------- Previous update was at 22:48 ----------

Quote:
Originally Posted by Corona688
swap isn't a filesystem -- it holds no files -- so df doesn't return sensible answers for it. On some systems it's not even listed.
In the df output context, swap is a file system (a.k.a tmpfs) holding files about which sensible numbers are reported. However, you are correct df isn't the right command to investigate memory usage.
# 5  
Old 07-24-2011
Thanks for your reply dude,In my operations swap memory is used for processes to run..Moreover we dont have any RAM on our node..Swap memory is used instead of Node..The o/p given above is of a voucher server (IN system).
As per our ZLD,if
Code:
swap -s

command provides o/p of availabe space=used space,everything if fine...what does this mean?..
Quote:
Originally Posted by jlliagre
You should define what you expect swap to mean. As far as Solaris is concerned, this can be the on disk swap area, the whole virtual memory or a file system (a.k.a. tmpfs).

  • Your swap area size is 4 GB
  • Your total virtual memory size is around 10 GB, half of which been free. You have at least 6 GB of RAM but possibly much more.
  • The various file systems backed by swap are using a negligible part of virtual memory.
There is no straight relationship between how much swap is used and a system performance. If you want the latter, just make sure you have enough RAM to avoid pagination. If you want your applications not to crash, have enough swap for all memory allocation and reservations to easily fit. Memory allocations do like RAM, memory reservations are fine with on disk swap.

---------- Post updated at 22:59 ---------- Previous update was at 22:48 ----------


In the df output context, swap is a file system (a.k.a tmpfs) holding files about which sensible numbers are reported. However, you are correct df isn't the right command to investigate memory usage.
# 6  
Old 07-24-2011
Quote:
Originally Posted by vivek.goel.piet
In my operations swap memory is used for processes to run..
Processes use virtual memory only. When they access it, it's on RAM.
Quote:
Moreover we dont have any RAM on our node..
What are you calling a "node" here ? In any case, Solaris doesn't run without RAM.
Quote:
Swap memory is used instead of Node..
??
Quote:
The o/p given above is of a voucher server (IN system).
As per our ZLD,if
Code:
swap -s

command provides o/p of availabe space=used space,everything if fine...what does this mean?..
No idea about what you are describing/asking here. Please clarify.
# 7  
Old 07-24-2011
Quote:
Originally Posted by jlliagre
Processes use virtual memory only. When they access it, it's on RAM.
What are you calling a "node" here ? In any case, Solaris doesn't run without RAM.
??
No idea about what you are describing/asking here. Please clarify.
Just I wanted to know whats my total available swap space,whats the used up swap space and whats the total swap size of my server...Please also provide the calculations how to calculate it?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Help understanding how swap works

Hi all, I'm trying to get an understanding of swap. This is what I see: Memory: 8192M real, 1697M free, 5693M swap in use, 10G swap free My question(s): If I have available RAM, why am I using swap? Or am I reading this wrong (been known to happen). Thanks much, ~K (8 Replies)
Discussion started by: kuriosity_prime
8 Replies

2. Solaris

/tmp size is less whereas size allocated to swap is more

Hi, the /tmp size is less whereas the size allocated to swap is quite big. how to increase the size of /tmp - #: swap -l swapfile dev swaplo blocks free /dev/md/dsk/d20 85,20 8 273096 273096 #: swap -s total: 46875128k bytes allocated + 2347188k reserved =... (2 Replies)
Discussion started by: psb74
2 Replies

3. HP-UX

Determing size of swap space

Hi Experts, Need your advise in determining the size of swap space in of the new HP-Ux server. Server is having 32G of physical memory. Ideally what amout of physical memory should be allocated as a swap space? Following document from HP suggests to have minimum swap space... (2 Replies)
Discussion started by: sai_2507
2 Replies

4. AIX

SWAP SIZE Recommended.

Dear All, During installation of SAP, it shows like below : Condition : Swap Size Result Code : Condition not met Severity : MEDIUM Message : For the selected services at least 74228 MB swap space are recommended. Current value: 65536 MB. (Updated 2005-06-24) I am working on AIX OS. ... (8 Replies)
Discussion started by: kak
8 Replies

5. Solaris

Swap size increase

Dear All, How to increase the swap size when physicall memory reaches 60 %. OR it can be only done after the physicall memory is full. Rgds Rj (8 Replies)
Discussion started by: jegaraman
8 Replies

6. UNIX for Dummies Questions & Answers

swap memory and original size of HD

few questions a. where can I find the RAM of a server? im about to install redhat on a server (reformat). need to know because it will be my basis for swap size. i saw something line 3048MB detected upon boot. is this the memory? b. what is the command in lunux to check the original size of... (2 Replies)
Discussion started by: lhareigh890
2 Replies

7. Programming

Swap different size string

how can I write a function to swap to different sized string? (2 Replies)
Discussion started by: rupeshkp728
2 Replies

8. UNIX for Dummies Questions & Answers

Size of swap partition during installation

Greetings. I've been into computers since the '80s, but this is my first attempt at Linux. I'm installing Debian Lenny on a PIII 733 with 10GB hard drive and 512MB Ram. I intend to use the machine primarily as a development server, with things like mySQL, Apache, php, etc. I don't really want... (22 Replies)
Discussion started by: fguy
22 Replies

9. HP-UX

Increasing swap size

We increased our server's RAM 8 -> 32 GB RAM. swap memory is currently 10 GB. With which command I can increase this memory? (1 Reply)
Discussion started by: akyuceisik
1 Replies

10. UNIX for Dummies Questions & Answers

Size of swap

Hy all, i've a little problem with the size of the swap. I've an old solaris machine, with 4Go, and swap is taking 500Mo for only 1% used at any time. So : how can i change this size without problems ????? (ok it may be a stupid question, but it's a real problem when you lose about 1 or 2... (3 Replies)
Discussion started by: Olivier
3 Replies
Login or Register to Ask a Question