Re: bhyve, Windows guest and trim support

2020-07-14 Thread Felix Palmen
* Andrea Venturoli [20200714 09:53]: > I applied the same patch and, still using virtio-blk, when trying to retrim, > Windows says "Optimize-Volume : The volume optimization operation requested > is not supported by the hardware backing the volume." The reason is the same I accidentally started a

Re: bhyve, Windows guest and trim support

2020-07-14 Thread Peter Grehan
Hi Andrea, Where would I download a fresher driver? Do I need RedHad's virtio-win-latest? Is it in there? Or else, what? The link in the PR pointed to https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.185-1/ (currently an alias of https://fedo

Re: bhyve, Windows guest and trim support

2020-07-14 Thread Andrea Venturoli
On 2020-07-14 10:34, Peter Grehan wrote:  You may need a recent Windows viostor driver. A working configuration was reported in     https://github.com/virtio-win/kvm-guest-drivers-windows/issues/392 Thanks. I saw that page and hoped the binary version I downloaded already had that change a

Re: bhyve, Windows guest and trim support

2020-07-14 Thread Peter Grehan
Hi Andrea, Thanks for this hint, I can now confirm this also works with virtio-blk (applied Allan's patch to 12.1). REFER for the zvol backing my Windows Server 2016 dropped from 315G to 72.5G. Hmm... I applied the same patch and, still using virtio-blk, when trying to retrim, Windows says "O

Re: bhyve, Windows guest and trim support

2020-07-14 Thread Andrea Venturoli
On 2020-07-12 15:13, Felix Palmen wrote: * Andrea Venturoli [20200707 18:18]: I have yet to try this, but, as I said, I switched temporaly to ahci-hd and used the instructions at the following link to reclaim space (without the need to start a new zvol): https://winaero.com/blog/trim-ssd-windo

Re: bhyve, Windows guest and trim support

2020-07-12 Thread Felix Palmen
* Andrea Venturoli [20200707 18:18]: > I have yet to try this, but, as I said, I switched temporaly to ahci-hd and > used the instructions at the following link to reclaim space (without the > need to start a new zvol): > > https://winaero.com/blog/trim-ssd-windows-10/ Thanks for this hint, I ca

Re: bhyve, Windows guest and trim support

2020-07-07 Thread Andrea Venturoli
On 2020-07-07 17:40, Felix Palmen wrote: As I don't have background knowledge how TRIM works exactly: Should guests that support it automatically free unused space when running on the updated bhyve? Or would I have to do a "clean restart", by creating a new zvol and copying everything over in th

Re: bhyve, Windows guest and trim support

2020-07-07 Thread Felix Palmen
* Allan Jude [20200707 10:51]: > I added support for bhyve to understand virtio-blk TRIM messages to > FreeBSD 13 back in April, r360229 Awesome, thanks, I was looking for this as well. The changeset applies almost cleanly to 12.1, only problem are some debug printing macros. As I don't have bac

Re: bhyve, Windows guest and trim support

2020-07-07 Thread Allan Jude
On 2020-07-06 13:23, Andrea Venturoli 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?

Re: bhyve, Windows guest and trim support

2020-07-06 Thread Dustin Marquess
+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 wrot

Re: bhyve, Windows guest and trim support

2020-07-06 Thread Wanpeng Qian
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

Re: bhyve, Windows guest and trim support

2020-07-06 Thread Dustin Marquess
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 wrote: > > Hello. > > I'm running zvol-backed Windows guests in bhyve on FreeBSD 12.1. > Over time, I see the zvol effectively used s