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 -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d20     85,20     16 32787056 32787056
/dev/md/dsk/d60     85,60     16 167720816 167720816
root:reuxeuus538# swap -s
total: 44297448k bytes allocated + 34248080k reserved = 78545528k used, 72979456k available

here free swap calculated from swap -l command is 95 whereas by swap -s its just 67.

Please suggest me here.

In "swap -l" 1 block = 512 bytes

You have ~ 100 GB of swap space and ~ 150 GB of virtual memory. That looks consistent.

Free swap as computed by "swap -s" includes part of RAM while free swap reported by "swap -l" is only referring to disk space.

Another point: Virtual memory=swap area+physical RAM-kernel memory.

Thanks for the reply!!

Yes i have calucated the Available memory in swap -l by considering 1 byte =512 blocks but still the Available memory calulation exceeds in swap -l rather than swap -s.

please help!

See my previous reply for an explanation.

Thanks jilliagre!!

I wanted to know the available swap and available virtual memory and not the total.

150 is the total available virtual memory, the available is ~ 65 which is less than the available swap memory which is ~ 100, which should not be the case.
sorry if iam being silly. could you please explain more here.

All your allocated memory (~43 GB) is fitting in RAM (you should tell how much RAM you have and how it is used) so your swap area is currently completely free (no pages are stored there). However, a part of RAM+SWAP is reserved (~34 GB) to guarantee future potential use (Solaris doesn't overcommit memory unlike Linux and others). The reserved memory explains the discrepancy.