From nobody Sun Jul 30 23:04:41 2023 X-Original-To: bugs@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 4RDcQd54HCz4pZ0Q for ; Sun, 30 Jul 2023 23:04:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDcQL13gQz3yDf for ; Sun, 30 Jul 2023 23:04:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690758282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=icsFHtFWyd7r08NTEqYKO4dO0ztZ3OtO5loqvvwl9rs=; b=i0VWV1KGmtkGNYL1Lql5LyrNWbVbEKLRgRgyT+owVMeuLiJoWspsqrrEb+O2JN1o4eBv35 neAZbo12Yeq0CefXGM29dWxhmuG62dLOmDzbhd6+QKdV4dTWQLE3zLj8PqYbwqdDOwud3U h5Ue55MSbb+CuwMOZ9DQ9o5clF6bQya9EHSnB8BCShKtMaetEGvIu2xBFt3ZJLMXqkK0t6 lD7l6nhGcRlv0GQAG0KVRA1ZZloDAbcR4tPrOLmrSNYjl8PdOZ/hpK0zMRn7WYc0jRinI5 soZgWwG8R0GsWiJbCvRpsxVR3ZHPqwNwXU6wwzilZahXhjeutWAr5a2UrDeQkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690758282; a=rsa-sha256; cv=none; b=qxuViV2OeVGRyF7fjFQ1MOAyqRXcA0NSXxi+4qQc6yoF6Y55GTocdVDh4WL5Q1zsu+/NZ7 PYYLEG6Y8z8NCE3qo3E/H1iwCiGubIhmuRh5Rru4ucUc3Ob4GoHi9cGrkF+1Ed/ew6U+4J bIcPzlI+I89s9Y3kChbWdC/y9rifx74ycBmeJxuR3SO4XJaIJFJYUD0MvLHC9+f8dyv9eW os64OCzkmOh8Iz1xk1SgnYmRab5xcqe5uWGsnhX1IR9GBGnD2BCt5E5av9Qx63Z8YIXTzD BV4/aawB9aSwiaTNit+Z07U0YTEcZ7F/Hwg9hqKCs1XViuKsMOP2DjLDUXfDhQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDcQK3WBdzXWW for ; Sun, 30 Jul 2023 23:04:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 36UN4fE8004613 for ; Sun, 30 Jul 2023 23:04:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36UN4f3N004612 for bugs@FreeBSD.org; Sun, 30 Jul 2023 23:04:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272818] hv_kvp_daemon high CPU usage on Internet router Date: Sun, 30 Jul 2023 23:04:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: greg@codeconcepts.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272818 Greg Becker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |greg@codeconcepts.com --- Comment #1 from Greg Becker --- Presuming "hn1" is an interface (?), there's only one "default" route, and = the default route is always printed within the first few lines, then having awk stop on the first match should kill the netstat command before it generates very much output, which I would think would greatly reduce the CPU overhead. But I'd have to see the output of your 'netstat -rn' command to be sure. W= orst case, netstat does a whole lot of CPU intensive work before it starts emitt= ing routes, in which case curbing the output may not help much. I didn't see any sysctl to print the default route, which would have been n= ice and probably result in much less overhead than launching into netstat. Per= haps there is some other light-weight way in which to get the default route? Off the top of my head, something like the following might improve things: netstat -rn | awk -v interface=3Dhn1 '$1 =3D=3D "default" && $4 =3D=3D inte= rface {print $2; rc=3D1; exit; } END{exit !rc}' --=20 You are receiving this mail because: You are the assignee for the bug.=