Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2020 21:00:46 -0500
From:      Dustin Marquess <dmarquess@gmail.com>
To:        Wanpeng Qian <wanpengqian@gmail.com>
Cc:        Andrea Venturoli <ml@netfence.it>, virtualization@freebsd.org
Subject:   Re: bhyve, Windows guest and trim support
Message-ID:  <CAJpsHY7e5xLnwit1DR1F3AH7ceKG38uA27p_b1aKeoJkCpxwqw@mail.gmail.com>
In-Reply-To: <CANBJ%2BxQ7y330O9gt1A1ZV3h5hENWPv22xwooAMpeVx7A24pPvg@mail.gmail.com>
References:  <e15ba239-9a73-2821-1f42-1700d74d031b@netfence.it> <CAJpsHY6KmhKT5jQ_2RU7N7c-t5q%2BURDE0d%2B8mjDdzuz1Pz69WA@mail.gmail.com> <CANBJ%2BxQ7y330O9gt1A1ZV3h5hENWPv22xwooAMpeVx7A24pPvg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
+1

A ghetto hack  would be to enable compression on the zvol (at least
zle) and then 0-fill available space.  Granted it would still show as
"used", but it would decrease the amount of really used space.

But NVMe would still be better :)

-Dustin

On Mon, Jul 6, 2020 at 8:46 PM Wanpeng Qian <wanpengqian@gmail.com> wrote:
>
> I also recommend NVMe controller, it supports Deallocate(in SATA, it
> is called TRIM.)
>
> chuck has committed a lot of patches to NVMe controller in 13.0 Current.
> Just install 12.1-STABLE, fetch pci_nvme.c from 13.0 Current, recompile bhyve.
> It works great. stable/fast.
>
> On Tue, Jul 7, 2020 at 6:40 AM Dustin Marquess <dmarquess@gmail.com> wrote:
> >
> > Try nvme, I believe that driver supports TRIM and I've had a lot
> > better performance with it over ahci-hd.
> >
> > -Dustin
> >
> > On Mon, Jul 6, 2020 at 12:24 PM Andrea Venturoli <ml@netfence.it> wrote:
> > >
> > > Hello.
> > >
> > > I'm running zvol-backed Windows guests in bhyve on FreeBSD 12.1.
> > > Over time, I see the zvol effectively used space grow in size: a sign
> > > that Windows isn't trimming it.
> > >
> > > I'm using virtio-blk: I guess this driver does not support trim?
> > > I see reports that this support was added, but it's not clear to me
> > > whether it's in the released version or not (I've downloaded the stable
> > > binary ISO from RedHat).
> > > Is trim expected to work in such a scenario?
> > > If not, is it a bhyve problem or a guest-driver problem (or both)?
> > >
> > > I tried virtio-scsi, which should support trim, but the guest doesn't
> > > even start in this case, getting stuck at the UEFI boot stage and ending
> > > up in UEFI prompt.
> > > Again, is this expected?
> > > No guest driver has been loaded yet, so is it a bhyve limitation?
> > > Is some tweak needed?
> > >
> > > I tried changing from virtio-blk to ahci-hd: I was then able to manually
> > > trim the disk from inside the guest and recover a lot of space in the zpool.
> > > Alas ahci-hd is much slower, so I moved back to virtio-blk after that
> > > (at least for the time being).
> > >
> > >   bye & Thanks
> > >         av.
> > > _______________________________________________
> > > freebsd-virtualization@freebsd.org mailing list
> > > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> > > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"
> > _______________________________________________
> > freebsd-virtualization@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJpsHY7e5xLnwit1DR1F3AH7ceKG38uA27p_b1aKeoJkCpxwqw>