ZFS in a VM?
Paul Kraus
paul at kraus-haus.org
Wed Jun 17 14:21:36 UTC 2015
On Jun 16, 2015, at 4:14, krad <kraduk at gmail.com> wrote:
> Unless you are really squeezing the ram it shouldnt be a problem and by
> that i mean going below 1 GB. Its also best to stay away from 32 bit if you
> want to run zfs.
I have been running ZFS on a VM for years with only 1 GB memory, but …
0) The Host OS is FreeBSD 9.1 with VBox
1) The Guest OS is FreeBSD 9.1
2) The Guest boots from UFS, only data is on ZFS
3) The ZFS zpool is in a dedicated .vmdk file
4) The Guest has 1024 MB of memory allocated
5) I did NO tuning for ZFS
6) The Guest is running one, and only one service, SubVersion
I did this so that I would have all the data integrity features of ZFS for the data, it also make sis trivial to move the data to a different VM (as was once needed when the original VM was compromised).
I have not had any reliability issues, but the performance could (always) be better. The ZFS ARC will grow to use any unallocated RAM and it will scale back when necessary, but … if you do not have any SWAP space configured it may not scale back fast enough and you may run out of memory.
So you _can_, whether it is a good idea in _your_ case is up to you. In mine it is well worth it.
[pkraus at svn-01 ~]$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
svn-01 34.5G 982K 42K /svn-01
svn-01/xxx 28.6G 218G 28.6G /svn-01/xxx
svn-01/yyy 28.3M 218G 28.3M /svn-01/yyy
svn-01/zzz 5.81G 218G 5.81G /svn-01/zzz
svn-01/abc 28.7M 218G 28.7M /svn-01/abc
svn-01/def 40.5K 218G 40.5K /svn-01/def
[pkraus at svn-01 ~]$ zpool status
pool: svn-01
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
svn-01 ONLINE 0 0 0
ada1p1 ONLINE 0 0 0
errors: No known data errors
[pkraus at svn-01 ~]$ gpart show ada1
=> 34 537290173 ada1 GPT (256G)
34 537290173 1 freebsd-zfs (256G)
[pkraus at svn-01 ~]$
--
Paul Kraus
paul at kraus-haus.org
More information about the freebsd-questions
mailing list