RAM and SWAP confusion


 
Thread Tools Search this Thread
Operating Systems Solaris RAM and SWAP confusion
# 1  
Old 11-06-2007
RAM and SWAP confusion

Hi Folks,

This is my first post here - so nice to meet u all :-)

Recently i was trying to dig a little bit into the memory structure of my machine and due to the lack of concept, cannot figure out a calculation.

This is how it goes:
1) My swap slice is at the usual /dev/dsk/c0t1d0s1
according to prtvtoc it says /dev/dsk/c0t1d0s1 is of 10 GB

* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 21505716 35840934 57346649 /
1 3 01 0 21505716 21505715
2 5 00 0 71127180 71127179
3 8 00 57346650 11264211 68610860 /home
7 0 00 68610861 52002 68662862

2) also swap -l says the swap partition is of 10 GB (1 block = 512 bytes)
bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t1d0s1 32,1 16 21505696 21505696

also gives 10 GB


3) The amount of RAM present in my system is 6GB
bash-3.00# prtdiag | head
System Configuration: Sun Microsystems sun4u Sun Fire V240
System clock frequency: 167 MHZ
Memory size: 6GB


4) Now, here is the problem:
swap -s (that is: swap + RAM) should ideally give me an output of 16GB (10 GB swap and 6GB RAM), but this is what i get

bash-3.00# swap -s
total: 195712k bytes allocated + 63952k reserved = 259664k used, 15342888k available

used + reserved = swap + RAM (which comes out to be 14GB)
eg: 259664k + 15342888k = 14GB

Can someone explain me why its not coming as 16 GB? Is there something i am missing out?

Thanks
~SAGE
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Explain the output of swap -s and swap -l

Hi Solaris Folks :), I need to calculate the swap usage on solaris server, please let me understand the output of below swap -s and swap -l commands. $swap -s total: 1774912k bytes allocated + 240616k reserved = 2015528k used, 14542512k available $swap -l swapfile dev swaplo... (6 Replies)
Discussion started by: seenuvasan1985
6 Replies

2. Programming

Swap call by reference confusion

Hello, This is very silly question as millions discussions on call-by-value vs call-by-reference for programming beginners, but I need to confirm my understanding. #include<stdio.h> void swap(int *p, int *q) //Line 3 { int tmp; tmp = *p; *p = *q; *q = tmp; } int... (15 Replies)
Discussion started by: yifangt
15 Replies

3. Red Hat

more swap and ram used in application

Hi All, I have a RAM of around 11 gig and swap of around 18 G in my Linux Server. But at some times , I find that All the RAM and 5 gig of swap is used in server...and i also got some advice from our discussion forums to increase the RAM . But nowadays what happens is the all the RAM... (1 Reply)
Discussion started by: jegaraman
1 Replies

4. UNIX for Dummies Questions & Answers

[Query] Confusion of the Swap when using 'free -m' command

Hi All, I have just installed my first Linux server ( Ubuntu 11.10 ). I am sure I didn't allocate /swap , and double check by 'df -h', yes really no /swap but when I use 'free -m' , returned a "Swap" line as below. total used free shared buffers cached Mem: ... (3 Replies)
Discussion started by: joaming
3 Replies

5. Solaris

Out of swap but RAM available

Hi all, The environment we're using is a T5440 running Solaris 10 LDOMs and zones configured within the LDOM. The LDOM has 32Gb of RAM and 32Gb of swap. Last week, we had an issue where the MQ server on zone 3 crashed as it ran out of swap, apparently caused by zone 2 usage. I understand that... (7 Replies)
Discussion started by: JerryHone
7 Replies

6. 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

7. Solaris

How much portion of RAM is allocated to Swap space?

How swap is getting 12GB as its size as per the below output: Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 7.9G 2.1G 5.7G 27% / /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 12G 1.2M 12G 1%... (3 Replies)
Discussion started by: ramnagaraj
3 Replies

8. 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

9. Red Hat

red hat Linux 5.0 is detecting 3gb ram but physical ram is 16gb

Hi, On server 64bit Hw Arch , Linux 5.0(32bit) is installed it is showing only 3gb of ram though physical is 16gb can u give me idea why? (4 Replies)
Discussion started by: manoj.solaris
4 Replies

10. 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
Login or Register to Ask a Question