bhyve and zfs and speed

Nikolay Denev ndenev at gmail.com
Tue Sep 2 22:15:30 UTC 2014


On Tue, Sep 2, 2014 at 3:39 PM, John <freebsd-lists at potato.growveg.org> wrote:
> Hello list,
>
> I'm thinking of re-doing a host server from virtualbox to bhyve in an effort to
> speed things up. The server is a Dell and the cpu is E5-2650L @ 1.80GHz
> with 32 CPUs and 192GB ram. It runs freebsd 10-stable r267848 generic
> kernel with ZFS throughout (10TB). Unfortunately there's no SSD. There will
> probably be 10 at the most websites on this server as guests, all needing
> MySQL.
>
> The problem I'm having is that with bhyve (and to a lesser extent, ZFS)
> the relevant advice for what I need is kind of scattered. Basically, I
> need to know:
>
> 0. any ballpark figures for zfs tunables? Right now, it's running
> with defaults. top shows this, with one freebsd and one ubuntu guest, on vbox:
>
> Mem: 50M Active, 784M Inact, 78G Wired, 6132K Cache, 108G Free
> ARC: 38G Total, 5778M MFU, 27G MRU, 16K Anon, 4540M Header, 1910M Other
> Swap: 192G Total, 192G Free
>
> 1. does zfs need tuning for bhyve?
>
> 2. does bhyve need tuning for zfs?
>
> 3. do either need tuning for MySQL (or even apache) ?
>
> many thanks for advice (or pointers to documentation)
> --
> John
> _______________________________________________
> freebsd-virtualization at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe at freebsd.org"

Hi,

I see you have 108G free memory. Is this due to a recent reboot and
the ARC hasn't grown much yet, or you are limiting it?

As for ZFS tuning for bhyve, I'm not aware of anything specific, but
you should consider that values you want to put for the zvols for
primarycache and secondarycache. (In your case only primarycache as
you don't have L2ARC).
Leaving this to the default might be faster but might result in double
caching: Once in the ARC on the host system, and then on the buffer
cache of the UFS guest.

For MySQL and databases in general, as far as I can remember the
general advice was to run them on zfs datasets with lower reclen, like
8k for example.
Here you have zvols which default to 8k but the vtbd device reports
512b sectors, not sure if you try to trick it into using larger values
here wouldn't help.
Also different UFS block sizes for different zvol recordlens might be
interesting test.

--Nikolay


More information about the freebsd-virtualization mailing list