From nobody Tue Oct 15 12:43:47 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSYgb3KZHz5Yt86 for ; Tue, 15 Oct 2024 12:43:55 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSYgZ6j9rz4ljQ for ; Tue, 15 Oct 2024 12:43:54 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (123-1-21-232.area1b.commufa.jp [123.1.21.232]) (authenticated bits=0) by www121.sakura.ne.jp (8.17.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 49FChlbW048091; Tue, 15 Oct 2024 21:43:48 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1728996228; bh=E2CR2Cnyrth1ffiUpQkkCiAQb8dMEh6Cd4ZdA69RPUo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=OS5pb9nZhVYi3Y4LlkEa4z4MfgBDHUEDYA7DKwxdclfklvrd6TarGz4ADf33u0uqD PQTJr7SJfkvHVadu9pbn/UBjC/Bv/UkZFSzFc7IxGVv0vpOkqX0L4hS0qRKr4TOLPR 542NjicIgY5qh94kCocRCPkoP7iJSEVlNH7Mfte0= Date: Tue, 15 Oct 2024 21:43:47 +0900 From: Tomoaki AOKI To: void Cc: freebsd-hackers@freebsd.org Subject: Re: polling interval Message-Id: <20241015214347.7717f2749fe5807c50d91031@dec.sakura.ne.jp> In-Reply-To: References: Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.1) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Queue-Id: 4XSYgZ6j9rz4ljQ X-Spamd-Bar: ---- On Tue, 15 Oct 2024 11:20:49 +0100 void wrote: > On Tue, Oct 15, 2024 at 10:51:20AM +0100, void wrote: > > >I'll next try setting kern.hz to -1 > > setting it to -1 returns a kern.hz value of 100 on reboot > setting it to 0 returns the kern.hz_min value of 8 > setting it to 1 and the kern.hz_min value to 1 still returns 8. -1 means "choose default". Behaviors for 0 and 1 would be because HZ_MINIMUM is defined as 8 in sys/sys/time.h, causing to clip to 8. > kern.hz=8 and kern.hz=100 gave the same numbers on bandwidth tests. > -- Maybe kern.hz=100 gives enough time (per tick) and kernel returns near the time even for kern.hz=8, disposing remaining time of the tick. # There was an abandoned review D40045 to reuse the disposed remaining # (fragmented) ticks. [1] And forgot tomention in my previous post. kern.hz for VMs (recognized as running on VM by FreeBSD kernel) is 100, as the default is HZ_VM. HZ and HZ_VM is defined as 1000 and 100 respectively, if not defined elsewhere. And if HZ_VM alone is not defined elsewhere, it is defined as HZ. These are because you see default kern.hz=100 on your VMs. [1] https://reviews.freebsd.org/D40045 -- Tomoaki AOKI