🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.bugs
1 messages
1 total messages Started by bugzilla-noreply Thu, 22 Oct 2026 13:47
[Bug 299733] freebsd-update is slow on spinning hdd
#188
Author: bugzilla-noreply
Date: Thu, 22 Oct 2026 13:47
56 lines
3937 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299733

            Bug ID: 299733
           Summary: freebsd-update is slow on spinning hdd
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: titus@edc.ro

Created attachment 276107
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=276107&action=edit
fixes slowness of freebsd-update (mostly install)

freebsd-update is extremely slow on hdds in various phases but the install
phase only pushes 2-3 files per second and for thousands of files its very bad

the simple fix is to have a tmpfs scratch dir used to decompress the file
before installing it on the fs and then remove it instead on doing it in
/var/db/freebsd-update directly (/var/db/freebsd-update can't be on non
persistent storage)
from 14.5 on we can zcat ${HASH}.gz |install - 
but only 14.5 has an install capable of installing /dev/stdin

mostly the patch does this 
-                               gunzip < files/${HASH}.gz > ${HASH}
+                               gunzip < files/${HASH}.gz >
${SCRATCHDIR}${HASH}
                                install -o ${OWNER} -g ${GROUP}         \
-                                   -m ${PERM} ${HASH} ${BASEDIR}/${FPATH}
-                               rm ${HASH}
+                                   -m ${PERM} ${SCRATCHDIR}${HASH}
${BASEDIR}/${FPATH}
+                               rm ${SCRATCHDIR}${HASH}

if $SCRATCHDIR is for example /tmp/ which is tmpfs the speedup is 150x for 1000
files (2.7 sec vs 5min)

the attached patch has other improvements but they are not as significant

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads