Quote:
Originally Posted by
javanoob
a) when doing memory reservation on virtual swap, the "physical space" that is reserved on the ram/swap device is not physically allocated right ? (still show as free in vmstat and swap -l)
Reservation is a "logical" operation, there is no such thing as a "physical allocation". The only physical operations with memory are read and write.
The physical space that is reserved (thus unused) on RAM or swap area shows as free RAM and free swap.
Quote:
b) can reserved but unused memory/swap (aka virtual swap) still be use for actual physical swapping ? (or it is reserved and no longer available for other usage)
Hmm, yes. Unused memory can be used (hopefully), but then, it is no more reported as reserved but as used. (That sounds logical, doesn't it?)
Quote:
c) if reserved swap isn't reflected as used space in swap -l, does this means i am really having actual swapping if i am seeing 2GB of physical swap space being used in swap -l ?
If you see 2GB used, that means there are 2GB of data stored there. There has been some swapping (actually pagination) for these 2G to be written.
Quote:
But again, I still has free memory - when doing echo ::memstat | mdb -k, will "reserved" but unused ram, shows up in "Free" ?
It might indeed. memstat is showing physical memory usage, it has no idea about logical, virtual one.
--- Post updated at 22:54 ---
Quote:
Originally Posted by
MadeInGermany
The OS can overcommit reservations, i.e. allow more than it could ever use.
That's not the case with Solaris with which malloc (or similar) will fail if no swap or RAM is available to back it.
Unlike with Linux, memory overcommiting can only happen on Solaris when explicitely requested by the (rare) applications using MAP_NORESERVE mmap.