From owner-freebsd-virtualization@freebsd.org Tue Jul 7 01:46:18 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 52FF934F43C for ; Tue, 7 Jul 2020 01:46:18 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4B14zG0nnfz3bFG for ; Tue, 7 Jul 2020 01:46:18 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 1B37634F43B; Tue, 7 Jul 2020 01:46:18 +0000 (UTC) Delivered-To: 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 1AFC434F1B3 for ; Tue, 7 Jul 2020 01:46:18 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B14zD2NWJz3bHN for ; Tue, 7 Jul 2020 01:46:16 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: by mail-qt1-x834.google.com with SMTP id e12so30578923qtr.9 for ; Mon, 06 Jul 2020 18:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=96nJ2PLQPz/WEadttPuOUoz7e0kKT+dcD3dJtNb5aro=; b=N2UGCyNZNK+x6RvUcMxDkVCjanKwXAVU+ZO0osw2GDY4KYqJeZdRl5sTGCMvIxf3nQ LJrL+Dkgel3Fa9QPs2yse2cxWAcfI1+8AkoMhVKAmwoz32/NQTS6MWm8CSDU7DrPrqGI UsGFdf+p5hpnfLreJGcswFIfCsHxRMGp1D37ZT0pCgL0pGXGEzAjmtqiiX0SI9uZBBOh nxr4PJy1WLHdlFhbDA7Exfp4Om1OONAerZHesSBRo4C8KEGJJOnyByI4E2Guy8nxAa+3 19X+NGxag0dtcWndt1waU7IG3LOCk953GHcdiafQzWpM6Qp5tHtoy4RtAx40jkLYCPLR VMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=96nJ2PLQPz/WEadttPuOUoz7e0kKT+dcD3dJtNb5aro=; b=CUZbIrdFPQ4o1a5BEfE3VJxDp58gI9Wjnd921ssRHESn57NOrVO0E8/nQKRjoy1N+R 62gm9AsKt40oetByxnA7orSpVx2UxP1o1hKLrvic5en7sx1C677oFr9ElzcvaKC9le9y r+2YDvxBnIU07LiIUWbKf1bnAA1ybibIMJg31vVBSyfnGBNg0J5LCnP+YHVFLnGBicbF NflzTFJjX3uHd3UU+M3NtscI1udoJXZE0Ymkc8YPHKNV9nB/irwUVhNJhhU45l+ZuwyG UF21qgAdsK1QdtyvOzChEFSq9GhG2RJjlBwo+7E4M0hC/XyT1JH5AaW0NeqdQksSkLLJ fweQ== X-Gm-Message-State: AOAM532nxGn3mrvy6JRcF1rkNhwLvLG+gLf9GkiheDt4S87RxH5yfBXl Y4XYjvDECcrrP1VNqTEJEPCFAVfvQ+Zx2x+GHcw= X-Google-Smtp-Source: ABdhPJyyDHX9AVH5/jM27BXnv9WQQ6xu0dI/8E7hrsawIjFfZ2H/yzU+yfNXPvPIJ4DukRFAZf6gdf8iIMazWVo18+c= X-Received: by 2002:ac8:4a88:: with SMTP id l8mr38567017qtq.209.1594086375306; Mon, 06 Jul 2020 18:46:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Wanpeng Qian Date: Tue, 7 Jul 2020 10:46:28 +0900 Message-ID: Subject: Re: bhyve, Windows guest and trim support To: Dustin Marquess Cc: Andrea Venturoli , virtualization@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4B14zD2NWJz3bHN X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=N2UGCyNZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of wanpengqian@gmail.com designates 2607:f8b0:4864:20::834 as permitted sender) smtp.mailfrom=wanpengqian@gmail.com X-Spamd-Result: default: False [-3.44 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[virtualization@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.002]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::834:from]; NEURAL_HAM_SHORT(-0.45)[-0.447]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com: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: Tue, 07 Jul 2020 01:46:18 -0000 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 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 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"