From nobody Mon Sep 06 19:34:13 2021 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 65A4517A2C12 for ; Mon, 6 Sep 2021 19:34:32 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H3JWD2RMwz3lgk; Mon, 6 Sep 2021 19:34:32 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: by mail-lf1-f45.google.com with SMTP id n2so5591037lfk.0; Mon, 06 Sep 2021 12:34:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VkyF9caspzEBP5P13JiTOUtwsEcRZclme04YPSHqb+U=; b=mdxwLdORintYV2jSacWskdQgq+9MKYCuxvUOR1CKlkNpI3qkjnRwCb92hrCgDcoLxQ z72glShnFnd6Xln1COHs+HmhErHgIlhFEBzM3ciYINwFG/g833AQhAPl3El47cA3LPub fS3L5ZZvwsfGTSnBY2qplYbANhUleVjw+uYGc4yFW34lBzw9mEGaXqNBWEwG7v8Hmr2V VuoSefBmPeZZT8gmgOUPdW+u0HLeYVfJGaLhdR8Snkq1/1PnxqC/EHzALtVknxSdViCx rccBYnNbmUg0LVT4qZUkF3AiofBNWHSTbgW+yAAmlOBb+OourMybzjuD7G75fb7jdZdR C4tQ== X-Gm-Message-State: AOAM531srCGAS5ETuSF0x3B5uyYdn2MVDskqsBs5/kG4nljdTElyl5ku 6RCK39YffoOS+S3wlmNAod5CrUeUOyPtdoD1vAwmjRnHTOk= X-Google-Smtp-Source: ABdhPJwGPEE8+A643xSji3kMNYydFdefXr+glFJMJHI9D4d7iBuahw0BAdf0iSFGg21zvTsDoobYX2mElvjZ6OFpD44= X-Received: by 2002:a05:6512:31c9:: with SMTP id j9mr2575238lfe.322.1630956864741; Mon, 06 Sep 2021 12:34:24 -0700 (PDT) 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 References: In-Reply-To: From: Wolfram Schneider Date: Mon, 6 Sep 2021 21:34:13 +0200 Message-ID: Subject: Re: -CURRENT compilation time To: David Chisnall Cc: freebsd-current@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4H3JWD2RMwz3lgk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Mon, 6 Sept 2021 at 11:44, David Chisnall wrote: > > On 06/09/2021 09:08, Jeremie Le Hen wrote: > > Compiling C++ seems > > extremely CPU heavy and this is made worse by the fact LLVM is built > > twice (once for build/cross tools, once for the actual world). > > Note that you need to build LLVM twice only if you are actively > debugging LLVM reproduceable deployment images. You actually don't need > to build it at all, you can use an external toolchain to skip the first > build and you can compile WITHOUT_TOOLCHAIN to avoid building the > version that's installed and then install a toolchain from packages: > > https://wiki.freebsd.org/ExternalToolchain I did a test on a 16 core (32 VCPU) machine (Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz). With the option WITHOUT_TOOLCHAIN=yes the world build time is 2.5 times faster (real or user+sys), down from 48 min to 19.5 min real time. time make -j16 buildworld -------------------------------------------------------------- >>> World build completed on Mon Sep 6 12:00:45 UTC 2021 >>> World built in 2862 seconds, ncpu: 32, make -j16 -------------------------------------------------------------- 2862.04 real 41234.87 user 1582.66 sys time make -j16 WITHOUT_TOOLCHAIN=yes buildworld -------------------------------------------------------------- >>> World build completed on Mon Sep 6 11:32:41 UTC 2021 >>> World built in 1181 seconds, ncpu: 32, make -j16 -------------------------------------------------------------- 1180.73 real 16076.27 user 988.73 sys -Wolfram -- Wolfram Schneider https://wolfram.schneider.org