From nobody Mon Sep 06 08:16:14 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 826CD17993EE for ; Mon, 6 Sep 2021 08:16:31 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 4H31Sv2wR2z3PVk; Mon, 6 Sep 2021 08:16:31 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-il1-x136.google.com with SMTP id h29so6071572ila.2; Mon, 06 Sep 2021 01:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=89FHPpW/1QV75gd1dBU7ccAM+xU7ekZiMn3XaIYoPdc=; b=G9BMthXJfcmWFFRnSUTlaB/9uqttQH9+I6xRoqIOhzSYpzGe0ASXDbNEmgO+p0Xdm2 3WtQO1HBSCHwpshbsmx3q3XjGYxlLLtQayVg1Unei1LP7nnWtaIZNUX1ewnal5FIRIn7 2/QKcqx5gXuhU4MiU1WoTbR/b7GYxMqclMqZGIpGu8W235ar9PyR73mvnuA3oD2YG83C Mzg4NPKKJni9O1ZxZ/TW61lhSpr4zrjs1UXBgqVHwlk4mejwpLNx8k1b8Bhi1N7LzfjI FW8W3l6a7gulkawq/8xVDC2JAs1Uz9dmbb9/uMXe4FQZivEsyqYBxri4kp9tFAuEP+r7 wIXw== 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=89FHPpW/1QV75gd1dBU7ccAM+xU7ekZiMn3XaIYoPdc=; b=mPzcmxF4oUiDwlKJ5PvVXwhRnS74A941xBFJm2u6Mj3nS6ysTNd+oKqF41BgQrxK4J 6/EujQtBd3IYiAZXgwatcPlpyWkrRZ+AfIsrx1LxEZYFwqn+jvY4pt9h3xzgfCGKqaRd rRIgBHgbuPlT274EYS/eXd2Q9XngN36WaCyh4PNkPMgPw8AlmC7HIXkVttqaSzgj1TyQ BzXq++yKWT6EedTc9NXt5MT4Ggv4mxB2tUlSEREsEMwl8COVGtDWEaur3qKx30ELS6oq 1DEG5FCvSIoHlOBsVdIwS50vkFwN32AS+CEF0leo/Y0xQcFp8xlfFk29I2jTpgeujiGV HmSw== X-Gm-Message-State: AOAM532Zzsb3YgyuYygL0/ubNYuNKWe8gNZ+nHlUC+MVVl4vrB1gvzfa gG19XF5fLQJsyOoEC6ANqBuHzW6q1cIAYakKGV3kmY9V0bGuWQ== X-Google-Smtp-Source: ABdhPJwlgIB+u8e6io+IkbnqpLSv7rZmFpoz+x4OOvLurDoHhi6BKRLNlEfbdZlVLTGd5M4gBOdopStaa3WMsKloXJE= X-Received: by 2002:a92:c532:: with SMTP id m18mr4318591ili.63.1630916185117; Mon, 06 Sep 2021 01:16:25 -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: Michael Schuster Date: Mon, 6 Sep 2021 10:16:14 +0200 Message-ID: Subject: Re: -CURRENT compilation time To: Jeremie Le Hen Cc: FreeBSD Current Content-Type: multipart/alternative; boundary="000000000000df582105cb4f4345" X-Rspamd-Queue-Id: 4H31Sv2wR2z3PVk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: Y --000000000000df582105cb4f4345 Content-Type: text/plain; charset="UTF-8" Jeremie, a few observations (from the POV of someone who builds current ~ once a month) On Mon, Sep 6, 2021 at 10:09 AM Jeremie Le Hen wrote: > Hey, > > I want to build -CURRENT again from sources. It's been a long time > since I hadn't done that. I'm shocked by the compilation time. > > I started the whole thing on Friday night and Monday morning it's > still in stage 4.2 (building libraries). Through occasional glancing > at the screen over the weekend, it seems obvious to me that the > compilation time is utterly dominated by LLVM. Do you actually measure anything? have you looked into what your I/O is doing? How about swap? 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). > > So OK, my CPU is not the most powerful out there but it's still decent [1]. > I didn't check the specs: how many cores does your box have, and how many are you actually using (-j N)? IME, htop gives a good idea of how busy the CPUs really are. > So I have a couple of questions coming to my mind: > 1. Is there any optimization I could benefit from? (I'm sure there's a > knob to use the existing compiler instead of building a > cross-compiler.) > look at the build man page (https://www.freebsd.org/cgi/man.cgi?build(7)) for some tips on how to configure your environment. 2. More generally, isn't this compilation time not considered as a > problem for developers? This seems to terribly slow down the iteration > time for people working on the build system. I wouldn't be surprised > if this drove people away from working on/improving that area. > > [1] > https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i5-6260U+%40+1.80GHz&id=2671 > > Cheers, > -- > Jeremie Le Hen > jlh@FreeBSD.org > > regards Michael -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion' --000000000000df582105cb4f4345--