Sponsored Content
Operating Systems Solaris Explain the output of swap -s and swap -l Post 302916740 by jlliagre on Thursday 11th of September 2014 05:10:04 PM
Old 09-11-2014
The main issue is depending on the option used, the swap command is about two quite different concepts.
  • "swap -l" is telling the size of the swap area(s) and how much of it is storing actual data. In your example, you have a 10 GB raw device which contains absolutely no data.
  • "swap -s" is telling statistics about the swap space. The latter represent the virtual memory the userland processes and some kernel components use on this system.
In your example you have roughly 16 GB of virtual memory, from which:
  • 1.7 GB contains data that need to remain stored whether in RAM or on the swap area (in your case, everything in on RAM)
  • 240 MB is reserved virtual memory, i.e. memory that contains nothing but cannot be allocated being owned by processes which might store something there in the future.
  • 14.5 GB is available virtual memory

This 14.5 GB of available memory is partially RAM, partially disk (swap area) unless there is no swap area at all, not your case..

One can conclude that you have 4.74 GB of available RAM. (14.5G - 10G + 240M)

Free RAM being wasted RAM, a substantial part of this so called available RAM is containing data anyway, essentially disk cache. The difference between it and the allocated RAM is the former can be stolen instantaneously without harm, the previously cached data being still available on disk.

If we sum up the available RAM (4.74 GB) and the used RAM (1.77 GB), we get 6.5 GB of RAM. This number looks odd and there is no doubt you have more RAM installed on this machine.

My guess is you have 8 GB or RAM. The 1.5 GB difference is not part of the virtual memory. It is held mainly by the kernel and possibly by hardware components as non pageable memory, always stored in RAM.

Note also that despite being unused, your swap area has still a positive effect on your system as 250 MB of RAM would have been made unusable (being reserved) without it.

Finally, note that a portion of the processes virtual memory space is not accounted in the "swap -s" statistics, this is the memory that correspond memory mapped files.

Last edited by jlliagre; 09-11-2014 at 08:40 PM..
This User Gave Thanks to jlliagre For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Swap

When i re-updated my system i set my swap at 500 MB. I have 256 in ram and have never even gone into the 250 mb of swap that i had originally configured. How do I reduce the swap? (3 Replies)
Discussion started by: macdonto
3 Replies

2. UNIX for Dummies Questions & Answers

About swap

Is it really so that if swap will be located in the begining of hard drive, than it will work faster? (1 Reply)
Discussion started by: Ty3
1 Replies

3. Solaris

swap -l

When i try to type swap -l ,nothing come out but blinking. May i know what is the problem and solutions ? thanks (6 Replies)
Discussion started by: Farbegas
6 Replies

4. Solaris

Swap config - Mirror swap or not?

Hello and thanks in advance. I have a Sun box with raid 1 on the O/S disks using solaris svm. I want to unmirror my swap partition, and add the slice on the second disk as an additional swap device. This would give me twice as much swap space. I have been warned not to do this by some... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

5. HP-UX

How much Swap is too much?

I have a HP-UX B.11.23 server with 16 gb of memory 84 gb of swap configured. I am being pushed to define more swap to try and get more Tuxedo domains to start. At what point do we have too much swap for the amount of memory? Thanks in advance. (11 Replies)
Discussion started by: scotbuff
11 Replies

6. Red Hat

swap not defined as swap

free -m : 1023 total swap space created default partition /dev/sdb1 50M using fdisk. i did write the changes. #mkswap /dev/sdb1 #swapon /dev/sdb1 free -m : 1078 total swap space this shows that the swap is on Question : i did not change the type LINUX SWAP (82) in fdisk. so why is... (5 Replies)
Discussion started by: dplinux
5 Replies

7. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

8. Solaris

top output and swap -s output are differing

Solaris experts, Am struggling, and wondering for the past more than one week that, how to calculate the total available and used memory/swap space. Finally installed and used top & got some understanding, but while cross-checking, there are mismatches. Main Memory top o/p - 2GB... (7 Replies)
Discussion started by: thegeek
7 Replies

9. Red Hat

swap

Hi, I have added a new disk to production server. How to make it visible to os and how to configure it. I also want to add some space from that disk to swap space. Please help me out. (1 Reply)
Discussion started by: chetansingh23
1 Replies

10. Solaris

swap

Hi, Can somebody please help here, since iam just a beginner. According to my book knowledge. the Avalilable memory calculated by swap -l (includes only swap) should be small as compared to swap -s value(includes Virtual memory=swap +physical). but this is quite opposite in my case. swap... (6 Replies)
Discussion started by: Laxxi
6 Replies
All times are GMT -4. The time now is 08:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy