From nobody Wed Aug 13 22:05:12 2025 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 4c2Mqr4Prsz64Zsg for ; Wed, 13 Aug 2025 22:05:12 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Mqr37Yxz3Zkq for ; Wed, 13 Aug 2025 22:05:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755122712; 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; bh=9mm6hk8anv9fs6Ctfr9xaD+pZi86rCo2SFMCXWwOWx8=; b=tVP4qkmR/W99dMaJ4/wEuaARtDWoxeYdbrFL/5kgY831lAQyRux0OEy/Xo2hEAVYmSTXGE S5glzlOp2vhNNXcW4gvMH3dwjTuePkGibqT1Y5mbxpXNI6ZTsCXLYYoAw9ux6vPx42EypH ZSNsmBBL4LDYv62/lr2BG38piyUSjJmpIg4tz3mvWBuiLGnBoFKXmYAv2yCqriEyWceupo dW8/t6wVYukfit0Shvq9336nyGMmUvhO9jrR/eDzXunTB5YPt5sZrQDJJ0xGRyTm4vPivs 3++3KfC+KjoKHopHaQImWaOzSTKEzjhM6o/9uBEPF4z7zNIp7NknNclpPvXxuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755122712; 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; bh=9mm6hk8anv9fs6Ctfr9xaD+pZi86rCo2SFMCXWwOWx8=; b=jGWcu0nV9YvzvkCHtSOTCjmtIuibjli534/bXtZJHA0I9memTRyeNWOjv5/2NC2ITCIZ1q 5d5uf9fibqG/5cDJIk/X949npzJNRdqs/6n+36qlWzg3YTksFt8JZFAhfFZAr+/P2FHp6Q mwYgCTyghcIDR4nrdDIpE3bLsqLw78NQREts1mVWj7n/FfYUsRMbc7Q+/Dth92TBwPi2Dg Vb+ZjgsDr0BBEfs6GdT2xSymcNVPYQoZuJVH8MbnSeWSA9kv/Wddq9a7B+OL/CCaPIoOzR g5fM/swuESgU4Y+P9NfTTZM5n5pr8oRncSxwqX4G4Dz2zWTMBZuD/D7/Q2dULw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755122712; a=rsa-sha256; cv=none; b=bF/rDQq+JM3Y/v42X3c+GfUGgyfe0AiknarZnhgytj8KRjTBfVzDhbZaUwRGRiQ9vM116y fNj68Roip+kcQ+KpIDOhKpHbRApP2tgUbgvOjM/CP7q8cx/bFZyEuunKuq/AhYTh3bu1ml cKpJ0AQvywrOvCJmAOyQrlIfJaxWqng9gfsQ1v9S+VBlfj+hpf+WzU21aWmcv26jzSH03w qSIW2lbCLrggGgm6Se0FOQYt+BSZOIqf1fT3xTutFQzD0dqfCWLnGI/oajBlikuS5ffrIr kVSMsFoUWo46GeN3OVHoV1MVP2D6Ot5VTJf5oKqCLs7qTdDnSmOG03caumC1kA== 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 4c2Mqr2CY1z9SJ for ; Wed, 13 Aug 2025 22:05:12 +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 57DM5CGf014338 for ; Wed, 13 Aug 2025 22:05:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 57DM5C2v014337 for bugs@FreeBSD.org; Wed, 13 Aug 2025 22:05:12 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 288856] freebsd-update slow Date: Wed, 13 Aug 2025 22:05:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: heikki@suonsivu.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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=3D288856 Bug ID: 288856 Summary: freebsd-update slow Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: heikki@suonsivu.net For any computer with small memory (such as sub-1G), such as embedded syste= m, small raspberry, etc, freebsd-update is extremely slow when going upgrade. = It seems that many people as seeing this.=20 This is typically not I/O bound (fast ssd's mirrored with gmirror, systat s= hows %busy few percent) nor it is network bound (doing install, so no more netwo= rk activity, and our network connectivity is 10G with beefy internal network). Symptom seems to be high system load %. I am usually doing this on gmirrored ssd's, but others seem to see this on = zfs root as well. Theory: One possible reason seems to be that /var/db/freebsd-update/files h= as very large number of files in a single directory, for example, right now in= the system I am doing "freebsd-update install", it has 124211 files at this mom= ent. systat first showed 99.5% system time, and after a while system time becomes around 70%. According to systat, dir-cache only gets 1% hit ratio, if that = is relevant?=20 In systems with considerably larger memory this effect is not clearly visib= le, though that might also be faster cpus. There seems to be similar reports wh= en running freebsd-update in a VM with small memory allocation so it might be = that fast cpu does not help. Suggestion: as the file names are hashed anyway, take, say two first letter= s, and build a/b/abf222etcfullhashedname.gz directory hierachy, keeping the directories smaller. --=20 You are receiving this mail because: You are the assignee for the bug.=