Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2014 11:04:26 -0700
From:      Peter Grehan <grehan@freebsd.org>
To:        Willem Jan Withagen <wjw@digiware.nl>
Cc:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   Re: Bheve: Slow linux syscalls on AMD
Message-ID:  <539748AA.5060005@freebsd.org>
In-Reply-To: <53971C3A.30406@digiware.nl>
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> <CALnRwMQFmQRxg0jWi5tqXFXARsj-sD5F3wAAXdTvNf7%2BVPoezw@mail.gmail.com> <5394817F.4030203@digiware.nl> <53948DA5.4040000@digiware.nl> <53962141.8070702@freebsd.org> <5396D18C.8000401@digiware.nl> <53970F5A.8060900@freebsd.org> <53971C3A.30406@digiware.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539748AA.5060005>