From owner-freebsd-hackers@freebsd.org Sun Jul 12 23:42:41 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5996599BD0A for ; Sun, 12 Jul 2015 23:42:41 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3B78F1885 for ; Sun, 12 Jul 2015 23:42:41 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yuri.doctorlan.com (c-50-184-63-128.hsd1.ca.comcast.net [50.184.63.128]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id t6CNgXPZ026874 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 12 Jul 2015 16:42:34 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-50-184-63-128.hsd1.ca.comcast.net [50.184.63.128] claimed to be yuri.doctorlan.com Message-ID: <55A2FB68.3070006@rawbw.com> Date: Sun, 12 Jul 2015 16:42:32 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Subject: Does /dev/random in virtual guests provide good random data? Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2015 23:42:41 -0000 'cat /dev/random' in Linux VM (tried Ubuntu and Arch) is extremely slow, supposedly because VM runs out of entropy. This cat sometimes stops for minutes, and usually produces very few bytes per minute. Randomly clicking on the window helps speed it up a bit. Same in FreeBSD VM produces steady ~28MB/s stream. Does FreeBSD VM do something special for entropy, or the resulting stream actually lacks entropy, or maybe Linux does something wrong? I ran VMs on the same FreeBSD VirtualBox host. Somewhat relevant link: https://stackoverflow.com/questions/26021181/not-enough-entropy-to-support-dev-random-in-docker-containers-running-in-boot2d Yuri