On 13 Jul 2015, at 3:29, Ian Collins wrote:
ZFS will release memory when it is required elsewhere. ZFS is
designed to use what on most systems is wasted memory :)
Ayup. In my experimentation with dedup I've seen ZFS get to 13 GB on a
16 GB system. This with no SmaetOS instances running. To monitor the
space used by ZFS:
$ echo ::memstat | mdb -k
This on a freshly booted system, 3 SmartOS zones at 2048 MB, one at 512
MB, plus one LX CentOS zone at 2048 MB:
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 239634 936 6%
ZFS File Data 50490 197 1%
Anon 86920 339 2%
Exec and libs 4754 18 0%
Page cache 23945 93 1%
Free (cachelist) 24256 94 1%
Free (freelist) 3729022 14566 90%
Total 4159021 16246
Physical 4159020 16246
Now do some work in a couple of the running zones (Django and PostgreSQL
- search a 5.5 million row table on a non-indexed field):
$ echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 258567 1010 6%
ZFS File Data 744781 2909 18%
Anon 114662 447 3%
Exec and libs 5171 20 0%
Page cache 34968 136 1%
Free (cachelist) 26539 103 1%
Free (freelist) 2974333 11618 72%
Total 4159021 16246
Physical 4159020 16246
Now stop all but 2 of the running zones and do a pg_dumpall to a ZFS
subvolume with dedup set:
$ echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 347103 1355 8%
ZFS File Data 1736325 6782 42%
Anon 80032 312 2%
Exec and libs 2654 10 0%
Page cache 31998 124 1%
Free (cachelist) 30349 118 1%
Free (freelist) 1930560 7541 46%
Total 4159021 16246
Physical 4159020 16246
I have no problem restarting the stopped zones, and until I start doing
any work in them the ZFS File Data value stays pretty constant.
--
Paul Sture
-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com