From owner-freebsd-virtualization@FreeBSD.ORG Tue Jun 10 18:04:32 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EA1C8F0 for ; Tue, 10 Jun 2014 18:04:32 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 2C53A21F0 for ; Tue, 10 Jun 2014 18:04:32 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 6D8FF12677; Wed, 11 Jun 2014 04:04:30 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local ([64.245.0.210]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BUW82934 (AUTH peterg@ptree32.com.au); Wed, 11 Jun 2014 04:04:29 +1000 Message-ID: <539748AA.5060005@freebsd.org> Date: Tue, 10 Jun 2014 11:04:26 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Willem Jan Withagen Subject: Re: Bheve: Slow linux syscalls on AMD References: <5388B56D.1000501@digiware.nl> <20140530212900.6B74B6BF@hub.freebsd.org> <53891BC1.9050701@digiware.nl> <53891EAA.8040105@freebsd.org> <538927FC.3000903@digiware.nl> <53939AE2.80804@freebsd.org> <539434B6.6020804@digiware.nl> <5394817F.4030203@digiware.nl> <53948DA5.4040000@digiware.nl> <53962141.8070702@freebsd.org> <5396D18C.8000401@digiware.nl> <53970F5A.8060900@freebsd.org> <53971C3A.30406@digiware.nl> In-Reply-To: <53971C3A.30406@digiware.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD virtualization X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18 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, 10 Jun 2014 18:04:32 -0000 Hi Willem, > I've got KTR compiled in, but last time I switched it on. > I got swamped in traffic, and I sort of got locked out of the server... :( > Could also be because I was writing it to a file as well. > > So you'll have to help/tell me what to do. For looking at this, I'd use one single-vCPU guest to avoid KTR noise from other vCPU/guests. The problem shows up with this so no issue there. First, boot the VM and get it sitting at a shell prompt idling. On the host, first see that there are enough entries in the KTR buffer # sysctl debug.ktr.entries <32/64K is a good number> If it's too small, it can be bumped up # sysctl debug.ktr.entries=65536 debug.ktr.entries: 8192 -> 65536 The bhyve kernel module uses the ktr mask value 0x01. This should be turned off by default: # sysctl debug.ktr.mask debug.ktr.mask: 0 To get some traces, turn this on for a few seconds # sysctl debug.ktr.mask=1 ; sleep 3 ; sysctl debug.ktr.mask=0 The ktr trace buffer can now be examined: # ktrdump -ct To repeat/rerun the process, make sure the ktr buffer is cleared with # sysctl debug.ktr.clear=1 debug.ktr.clear: 0 -> 0 later, Peter.