From owner-freebsd-virtualization@freebsd.org Wed Aug 22 00:35:21 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5BA01084E67 for ; Wed, 22 Aug 2018 00:35:21 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17C2476C96 for ; Wed, 22 Aug 2018 00:35:20 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id w7M0ZC03004101 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Aug 2018 17:35:13 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id w7M0ZClM004100; Tue, 21 Aug 2018 17:35:12 -0700 (PDT) (envelope-from jmg) Date: Tue, 21 Aug 2018 17:35:12 -0700 From: John-Mark Gurney To: Support SimpleRezo Cc: freebsd-virtualization@freebsd.org Subject: Re: [HyperV-2016] urandom performance issue... Message-ID: <20180822003512.GI97145@funkthat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-RELEASE-p7 amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Tue, 21 Aug 2018 17:35:13 -0700 (PDT) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 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: Wed, 22 Aug 2018 00:35:21 -0000 Support SimpleRezo wrote this message on Tue, Aug 21, 2018 at 19:06 +0200: > I was figuring a performance issue of a FreeBSD on HyperV, after: > - moving it from an Hyper-V 2012 host to a Hyper-V 2016 > - updating to FreeBSD 11.2 (custom kernel, but same issue with GENERIC) > After loosing some times because i was thinking about hardware issue (disk > controller was my first thought...) and testing with "dd > if=/dev/urandom"... I discovered this... > > I ran the following test... and quite surprised by the speed result! > $ dd if=/dev/urandom of=/dev/null bs=10M count=3 > 3+0 records in > 3+0 records out > 31457280 bytes transferred in 27.960431 secs (1125064 bytes/sec) > The test was also sometimes "freezing" the Hyper-V host! > > Looking into "dmesg" i have found this: > random: registering fast source Intel Secure Key RNG > random: fast provider: "Intel Secure Key RNG" > > So I rebuilt my KERNEL without "rdrand_rng" (didn't find another way to > disable it...)... and performances went back to normal! > > I think this issue should documented on https://wiki.freebsd.org/HyperV ! This is likely the same issue as: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230808 If you're having troubles w/ the host freezing, this should probably still be investigated as even w/ the excessive locking, it should never freeze. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."