From owner-freebsd-virtualization@freebsd.org Sun Jul 12 13:11:35 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C3533633B7 for ; Sun, 12 Jul 2020 13:11:35 +0000 (UTC) (envelope-from felix@palmen-it.de) Received: from stef.palmen-it.de (stef.palmen-it.de [IPv6:2001:470:1f0b:bbb:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4Rxf2zBVz4WSV for ; Sun, 12 Jul 2020 13:11:34 +0000 (UTC) (envelope-from felix@palmen-it.de) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=palmen-it.de; s=20200414; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jcaEAKUeZ7C4h6t20taE+Xk0BNWomMS6OeLnOK/AQSY=; b=uTKU2/vjud7MbmQZ4ebgRuz96 vXS974mlz1T4rPL0zNAMalibDu2D/KMMjbocbgHLMMxab0WLd1C4xOtQwqfnQMgi41iYrORGzsxJz Va2bKVGlt3K/kpencbN2fPyukMZ/oQeMTDNiC+OAnCXiCh+IFeLw1PrDE4no+mQW+/wRlcbgVkxNm Rs4vFIsbO+cEws6r3iUZ0DcG8MPKgfLPOD214Ea2BeMhVKCbn5S3mG0zGLskHBcPpm+gims8ZJNi4 65Uwip4GAp0laYZsjUtbZ0kdK/MJl19H1icvmQgGdrkQL4Nv3IiAFo0Xyu2Q3bSsh6uMWfqLLQHGm EFMMuKNoA==; Received: from [192.168.71.101] (helo=mail.home.palmen-it.de) by stef.palmen-it.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jublT-0006hN-Td for freebsd-virtualization@freebsd.org; Sun, 12 Jul 2020 13:11:31 +0000 Received: from nexus.home.palmen-it.de ([192.168.99.2]) by mail.home.palmen-it.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1jublT-0007pw-IH for freebsd-virtualization@freebsd.org; Sun, 12 Jul 2020 13:11:31 +0000 Date: Sun, 12 Jul 2020 15:13:47 +0200 From: Felix Palmen To: freebsd-virtualization@freebsd.org Subject: Re: bhyve, Windows guest and trim support Message-ID: <20200712131347.cjvr4cpbo3rsgnik@nexus.home.palmen-it.de> Mail-Followup-To: freebsd-virtualization@freebsd.org X-Face: /1K@t"h.}e~pR@]c7HorQ!T`F^RJCa'BCr#e>IKA{>C/9OTGB4|xh"y2{?1Z5M i2w"AH^pN_LlHR^{+f',_Np~; .B; !M/bL}*qk]p5*r7F5vW}; {:@4u5S?T&f0$7BJ-71Q5SV]:v$`5 A0[DZ:=?S52x8HJ~5@^P_\T@MsjG{R( Organization: palmen-it.de References: <4e0c7427-8bb4-37d6-b717-181d5c9b66d3@freebsd.org> <20200707154025.wm6u4abbrz5tesha@nexus.home.palmen-it.de> <75f28176-c22a-8742-e86c-d73609cd5463@netfence.it> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cpf5td6akwyecouv" Content-Disposition: inline In-Reply-To: <75f28176-c22a-8742-e86c-d73609cd5463@netfence.it> User-Agent: NeoMutt/20200626 X-Rspamd-Queue-Id: 4B4Rxf2zBVz4WSV X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=palmen-it.de header.s=20200414 header.b=uTKU2/vj; dmarc=pass (policy=none) header.from=palmen-it.de; spf=pass (mx1.freebsd.org: domain of felix@palmen-it.de designates 2001:470:1f0b:bbb:1::1 as permitted sender) smtp.mailfrom=felix@palmen-it.de X-Spamd-Result: default: False [-5.76 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[palmen-it.de:s=20200414]; NEURAL_HAM_MEDIUM(-1.00)[-1.003]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:1f0b:bbb:1::1]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.03)[-1.031]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[palmen-it.de:+]; DMARC_POLICY_ALLOW(-0.50)[palmen-it.de,none]; RCVD_IN_DNSWL_NONE(0.00)[2001:470:1f0b:bbb:1::1:from]; NEURAL_HAM_SHORT(-0.63)[-0.627]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[palmen-it.de:dkim] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 13:11:35 -0000 --cpf5td6akwyecouv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Andrea Venturoli [20200707 18:18]: > I have yet to try this, but, as I said, I switched temporaly to ahci-hd a= nd > used the instructions at the following link to reclaim space (without the > need to start a new zvol): >=20 > https://winaero.com/blog/trim-ssd-windows-10/ 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. A word of warning: From the source cited here, I figured something like | Optimize-Volume -DriveLetter C -Verbose would automatically do "the right thing" for a thinly provisioned virtual disk. Turns out it would indeed, but as I had an older version of the virtio drivers installed, the disk was treated like a physical HDD and this command started a (very) lengthy defragmentation process instead. So, make sure you have a recent version of virtio drivers installed before attempting this with virtio-blk :) > Don't know if you are using other OSes, but I guess something similar must > exist. Yep, now I need the same thing for a 13-CURRENT guest. I'll probably need to apply this patch that's still in review, but what would be the next step? Is there a ZFS command to trigger a "re-TRIM"? --=20 Dipl.-Inform. Felix Palmen ,.//.......... {web} http://palmen-it.de {jabber} [see email] ,//palmen-it.de {pgp public key} http://palmen-it.de/pub.txt // """"""""""" {pgp fingerprint} A891 3D55 5F2E 3A74 3965 B997 3EF2 8B0A BC02 DA2A --cpf5td6akwyecouv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEqJE9VV8uOnQ5ZbmXPvKLCrwC2ioFAl8LDIcACgkQPvKLCrwC 2iodZwf/WdlSDqe7BV6CEhCZVn8dqAWv5d4Ef34JyqU1Znnvk3u0HoUZg15b+Cwi 2Y48fAp8GfBGLfG3CLoqcxTa1FaXVjjTgkY27QI0eHRyNTfSUQ6igQSeiyfHAQls pvDvh/en6UEPZiEEQgwKcHWgZMYDrLUYythUPAtNKq9fM6pNKvynkfTli1/Y0IeV QWVOSiAoU0aUq0HbasiLjjyjuafYFNeIn2mXOAu8/Nk4numoe4jM4XPoi/PGU362 eVNfkbnSSpnEIRAekJYXU49pBG3K9SU2jIJUmpfr/1RtFIx771KbwyPgtBdTZX8I BQwmONG4pwoOAE8+Zlan7sFT3BKjUw== =S3t5 -----END PGP SIGNATURE----- --cpf5td6akwyecouv--