Memory

opensolaris - increase swap

I found this on opensolaris forums…. A nice way to increase your swap without the need for a reboot.

First check your current swap size and details;

swap -lh

or

zfs list

Then create a temp swap zfs store and delete and increase swap

zfs create -V rpool/swp

swap -a /dev/zvol/dsk/rpool/swp

swap -d /dev/zvol/dsk/rpool/swap

zfs destroy rpool/swap

zfs create -V rpool/swap

swap -a /dev/zvol/dsk/rpool/swap

swap -d /dev/zvol/dsk/rpool/swp

zfs destroy rpool/swp

zfs - now has dedup!

Cool. zfs as of version 21 has deduplication built in. And thats the good dedup - synchronous dedup. i.e. deduped on the fly!

How easy is it to turn on? - very!

Once you have upgraded your zpool to 21 or above you can run the following command at the pool level and deduplication will be over all your data from that point onwards.

zpool set dedup=on tank

Done

Note : Watch your performance, it will drop like a rock if you do not have enough ram for your dedup tables. Do some tests after enabling this feature.

Opensolaris - where has my memory gone?

Use this command in 2008.11 to get details on where your memory is currently being used…

echo ::memstat | pfexec mdb -k

Page Summary                Pages                MB  %Tot ————     —————-  —————-  —- Kernel                     263992              1031   34% ZFS File Data               91917               359   12% Anon                       376867              1472   48% Exec and libs               11484                44    1% Page cache                   3387                13    0% Free (cachelist)             9766                38    1% Free (freelist)             24807                96    3%

Total                      782220              3055 Physical                   782219              3055