From nobody Mon Oct 28 14:34:26 2024 X-Original-To: freebsd-current@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 4XcbW82PHPz5bPgQ for ; Mon, 28 Oct 2024 14:34:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XcbW81krpz4lwF; Mon, 28 Oct 2024 14:34:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730126068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BJ2eBssKo1a0QVTCqYdgGSeCBpifMlQH07+Lh6UNHLY=; b=NfY8guwgXIaU9RvWiSMa9ka2A1iGXRz5tx+0zGkVUMjlHrxd0lek/fqA2huKgT1zF0VCyW spo4o3o95OGaHwM9zRoW4vTeHJUEPtz+WqeL4HUlr7pc/Tv4gp+wgdgDZzR4EXWY2b3ZC4 nIHe16aPVcnzaMcnMkbpnLRhzLQKGLqt1wg1AI3PfGyUrjheRnM5zyyDj9HKwVXpQDmTs3 wVJ77iJczdOO+q1qJOT1ajdmtMMzbnsj9BotDQ6IDZHjCFrjviXz1oyQ5Dj5L2gAv4XGuD GYOKdqG9P3K6RIYbu2F3ky9hjCDbDCEzGP5qIh+OMLH8hZFYsKjXutmffF4NqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730126068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BJ2eBssKo1a0QVTCqYdgGSeCBpifMlQH07+Lh6UNHLY=; b=XvT1EJsoD3eu2yiu8ewkazALoY6caV5xfbrawcO5xDYBvmiySJ/2Or9Ygu1eRWT1cfBtN3 Q4AGY4fVtR2NAiMmWOtDEEsiCtwRGVB+3PmES85DSS8La0VQR+1lg8TeTuFcrwNVP/AbwU msNytdP7/S5vu4sOStG+aKc22IqXrUcutpcSZU1THT5Bj83U+GA3s+Y9qqEaeSqejIhvt2 vq/3BNuU01S0BERj6U+Ddhpa/qIPxS1ioA7a+XLmQT5wERuGdTORyaApncl09yjLx8Ns3F 9MB4ZHnnw80yCrZuBsLHvSkojVlr66tgrvFASp8OCrI36wjDjYQVr2aq5FX/hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730126068; a=rsa-sha256; cv=none; b=VyAjo4OKJK6iCSx/W3Q56VfOpK8aYYMxx+Z3UxZy84FPrce1Iq9fljGCXVY1gdMtQ/Zicz 6zoBWhCmJrHkbFH9fFlk/Tl4Kw6NyTEpitR36MZt2RAA8IY6i53CjtKF7Ho2CnYbrF4yeS uWmRby2hnVLGih1guoToEdp92GUO5S8EYfTODTDm4F+BUhwvUwgdmorwMd+xziq/SZjhXi he5GEXRoHbhgQROppOYYnOpb9/9CCuap/8bK2m5idrXVc5ujnyDyuuGKkN113mM6dnJ5ws qde/PoqBfR9RgEuIhBtjQIr5nWMUJDGsE0exo0fUEJnx1muqMO8WQMw/M+zfAw== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XcbW80dpgzJ9Z; Mon, 28 Oct 2024 14:34:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8291066A3F; Mon, 28 Oct 2024 15:34:26 +0100 (CET) Content-Type: text/plain; charset=utf-8 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.2\)) Subject: Re: speedup build time From: Dimitry Andric In-Reply-To: Date: Mon, 28 Oct 2024 15:34:26 +0100 Cc: Alexander Leidinger , Maku Bex , David Wolfskill , freebsd-current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <82E9BF47-2A79-4052-8EAF-A52418B9C8A5@FreeBSD.org> References: <012d01db28cc$5fc66ac0$1f534040$@gmail.com> <015001db28db$690b03c0$3b210b40$@gmail.com> <192d2702590.2805.fa4b1493b064008fe79f0f905b8e5741@Leidinger.net> To: Nuno Teixeira X-Mailer: Apple Mail (2.3731.700.6.1.2) The compiler and linker can run faster, if you disable their internal = seatbelts. How much faster depends on the use case, but I have heard = 5-10% being thrown around. The same holds for FreeBSD itself of course, = though the performance difference there is probably different. In any case, if you disable assertions, and run into a segfault or = another internal compiler error, it is always useful to turn assertions = back on, as almost always some internal assumption was violated. In 99% = of the other cases, it is due to bad RAM or unstable hardware. -Dimitry > On 28 Oct 2024, at 14:15, Nuno Teixeira wrote: >=20 > Hello, >=20 > In what way could WITHOUT_LLVM_ASSERTIONS speed up builds? >=20 > Thanks, >=20 > Alexander Leidinger escreveu (segunda, = 28/10/2024 =C3=A0(s) 10:02): > Hi,=20 >=20 > Try (add) > src.conf: > WITHOUT_CLEAN=3DYES > WITH_MALLOC_PRODUCTION=3DYES > WITHOUT_LLVM_ASSERTIONS=3Dyes >=20 > This may only give a result in subsequent builds, not on the first = build or when a lot or something essential has changed.=20 >=20 > Note (just in case...) the make jobs number you use is not used for = the world, only for ports. For the world/kernel build it's really the -j = option.=20 >=20 > Bye,=20 > Alexander.=20 >=20 > --=20 > Send from a mobile device, please forgive brevity and misspellings. >=20 > Am 28. Oktober 2024 02:50:38 schrieb "Maku Bex" = : >=20 >> Hi David, >>=20 >> * What (if any) "max_jobs" (make's "-j" parameter) are you using? 16 >>=20 >> * For a 16T system, I expect I would start with a value of around 28. = Shouldn't this number be equal to $(nproc --all)? >>=20 >> * Are you using make's "meta" mode? I do. Yes. >>=20 >> * Can you get more memory for that system? Yes, I can bump it to = 32GB. This is a Dell OptiPlex 7080 Micro, and not sure if it is worth = upgrading the other components. >>=20 >> If your laptop can complete the builds in such a small amount of = time, then there's either something wrong with my machine or the config = files. Oh! The build just finished as I was typing this reply and...(not = for the weak hearts): >>=20 >> -------------------------------------------------------------- >>>>> World built in 32437 seconds, ncpu: 16 >> -------------------------------------------------------------- =20 >>=20 >> Here are the contents of: >>=20 >> make.conf: >>=20 >> CPUTYPE?=3Dicelake-client >> CFLAGS=3D -O2 -pipe -march=3D${CPUTYPE} >> #CXXFLAGS=3D${CFLAGS} >> MACHINE_CPU+=3D avx512 avx2 avx sse42 sse41 ssse3 sse3 f16c >> MAKE_JOBS_NUMBER=3D 16 >> BATCH=3Dyes >> WRKDIRPREFIX=3D/var/ports/tmp >> CCACHE_DIR=3D/var/ccache/tmp >>=20 >> OPTIONS_UNSET+=3D QT5 QT6 CUPS VESA SCFB TWM XCONSOLE XCLOCK GNOME = KDE EXAMPLES \ >> DEBUG ASPELL NLS DOCS >> = --------------------------------------------------------------------------= ----- >> src-env.conf: >>=20 >> WITH_META_MODE=3Dyes >> WITH_CCACHE_BUILD=3Dyes >> #WITH_DIRDEPS_BUILD=3Dyes <> #WITH_DIRDEPS_CACHE=3Dyes <>=20 >> WITHOUT_TALK=3Dyes >> WITHOUT_TELNET=3Dyes >> WITHOUT_TFTP=3Dyes >> WITHOUT_IPFILTER=3Dyes >> WITHOUT_IPFW=3Dyes >> WITHOUT_FLOPPY=3Dyes >> WITHOUT_GAMES=3Dyes >> WITHOUT_BLUETOOTH=3Dyes >> WITHOUT_EE=3Dyes >> WITHOUT_FREEBSD_UPDATE=3Dyes >> WITHOUT_GPIO=3Dyes >> WITHOUT_MAIL=3Dyes >> WITHOUT_TESTS=3Dyes >> WITHOUT_AMD=3Dyes >> WITHOUT_CLANG=3Dyes >> WITHOUT_DEBUG_FILES=3Dyes >> WITHOUT_EXAMPLES=3Dyes >> WITHOUT_HYPERV=3Dyes >>=20 >> Happy Hacking, >>=20 >> -----BEGIN PGP PUBLIC KEY BLOCK----- >>=20 >> mJMEZlPMfxMFK4EEACMEIwQA/hAHZ4KNJLw5eRl6DAOyzkuHQ7PaK2hTYLVIPoxC >> sCe8lB/hzET5KxMW9GXgFgPaSP7Es+ul6ajyq8pr9DeGnXUAFymi7GoT1kLIqgrn >> X+rDAwMk9JNEElTmVNvgKWv/G+pSg2rAQ8sIw6smgckA0CaX1JdcNavrHDgKMO4u >> Duo44Te0BkpPTUlTTYjbBBMTCgBBFiEENyUvu5bQVBXM019e8anbed+sQ8YFAmZT >> zH8CGwMFCQHnaREFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ8anbed+s >> Q8Y5BgIHcX19jz0KP89uTmqvLGZcKsITDJKweAnccCZRS8hvXT8JBwR1LyxsBBKF >> ++eN2JJasZLo+s6sy7pDMN+9z4Gkdy0CCOj+arfLdvajfzdK4QeKpINfpa2SkQD1 >> CP98lvfI/luIbetUVW+qNDkzT1jZphYuzgsCaofTGCIQpFk19q22ZcZquJcEZlPM >> fxIFK4EEACMEIwQANy4VvpnTHneZipCPwzVJnMN82coCudRAiL2i2m3GPA06lRtU >> njcn9r9Sm26A0sajwc3kQw/ekWrHXpXV0aL076cAUW9GKYDljIHVlr76wgHbLt6q >> BX5VkA6xS0cq3skbMEI0QpIqIK81Yf0z8wfyF5uqAgNPUpY4nHMV9S856JB2VDQD >> AQoJiMEEGBMKACYWIQQ3JS+7ltBUFczTX17xqdt536xDxgUCZlPMfwIbDAUJAedp >> EQAKCRDxqdt536xDxjIuAgjacZCttPWpKGfMbnNWePz6t9rcMUb496tSWfKRActr >> Rco8lSaDNTVohT/6hLZ5wUX5NFUqTb+kOXJcUGHGbnw2KQIJAQu1m9zEP5XdWmFi >> SvGg1NHW2kzqAvFsG37flbwrGRu5fmTnS/LZ/oPzOCuwU6F+o1q0E7gLwFwnzD93 >> riKeabdd >> =3DiCV+ >> -----END PGP PUBLIC KEY BLOCK----- >>=20 >> -----Original Message----- >> From: David Wolfskill =20 >> Sent: Sunday, October 27, 2024 19:50 >> To: Maku Bex >> Cc: freebsd-current@freebsd.org >> Subject: Re: speedup build time >>=20 >> On Sun, Oct 27, 2024 at 07:00:17PM -0500, Maku Bex wrote: >>> ... >>> I'm trying to figure out a way to decrease build time of -CURRENT=20 >>> and/or -STABLE but it is not working out that well. >>> I've tried the following: >>> * Tuning /etc/make.conf and /etc/src-env.conf based on their = manpages >>> (make.conf(5), make(1), src.conf(5)). >>> * Removed certain options from GENERIC, which reduced the kernel = build >>> time significantly.=20 >>>=20 >>> Hardware specs: >>> * I7-10700T 8C/16T @2.0GHz. >>> * 16GB RAM. >>> * 256GB NVMe. >>>=20 >>> Currently, 'make buildworld' has been running for 7hrs and counting.=20= >>> Is there anything else I can do to speed up world build? >>> .... >>=20 >> First, some questions -- whether or not you wish to share the = answers, I believe that answering the questions (if only for yourself) = may be >> helpful: >>=20 >> * What (if any) "max_jobs" (make's "-j" parameter) are you using? = For a >> 16T system, I expect I would start with a value of around 28. >>=20 >> * Are you using make's "meta" mode? I do. >>=20 >> * Can you get more memory for that system? >>=20 >> Some context: I am in the (definitely peculiar; perhaps unfortunate) = habit of "tracking" FreeBSD head and latest stable branch on a small = collection of machines ... daily. One of those is the laptop that I use = for normal "desktop" stuff, as well as accessing all other machines on = the planet that I access. (Oh: I also update ports daily, too -- though = I let my dedicated "build machine" handle chromium.) >>=20 >> That laptop has 4C/8T & 32 GB RAM. This morning, it took: >>=20 >> * 17:46 for stable/14-n269310-bbd018d0aaaf -> = stable/14-n269315-b21c677ed28a >> (0:02 to update /usr/src; 17:44 to build; 0:00 to delete old = libraries) >>=20 >> * 24:03 for main-n273250-9d585fc395c3 -> main-n273270-cadb71e4b013 >> (0:03 to update /usr/src; 23:59 to build; 0:01 to delete old = libraries) >>=20 >> * Updating ports (other than www/chromium) took 1:52. >>=20 >> (Those times are "mm:ss" in case it wasn't obvious.) >>=20 >> The above is fairly classic "sample size of 1" -- it's not = necessarily representative. Folks who are "sufficiently interested" are = welcome to trawl through the logs at = https://www.catwhisker.org/~david/FreeBSD/history/ to get a rough idea = of how long it is before the "uname" output from a successful build is = logged; there is probably some correlation to build times. >>=20 >> I also recently acquired a replacement "build machine": 64C/128T; 256 = GB RAM; a fistful of SATA SSDs (build/boot on one; the rest is a = poudriere play area in a zraid). That's a wee bit faster than the = laptop. :-) >>=20 >> Peace, >> david >> --=20 >> David H. Wolfskill david@catwhisker.org >> It has been said that history repeats itself. This is perhaps not = quite correct; it merely rhymes. -- Theodor Reik >>=20 >> See https://www.catwhisker.org/~david/publickey.gpg for my public = key. >=20 >=20 >=20 > --=20 > Nuno Teixeira > FreeBSD UNIX: Web: https://FreeBSD.org