From owner-freebsd-questions@freebsd.org Thu Jul 22 20:57:48 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A37166527F for ; Thu, 22 Jul 2021 20:57:48 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4GW4XX0ZwKz3Prr for ; Thu, 22 Jul 2021 20:57:48 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 120B9665633; Thu, 22 Jul 2021 20:57:48 +0000 (UTC) Delivered-To: questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10ACA6656A8 for ; Thu, 22 Jul 2021 20:57:48 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 4GW4XW6qz4z3Q7N for ; Thu, 22 Jul 2021 20:57:47 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-wm1-x32c.google.com with SMTP id x14-20020a7bc20e0000b0290249f2904453so3172052wmi.1 for ; Thu, 22 Jul 2021 13:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F9wjGHZTkYUSyvEGHK44nsiLKjqbhX79XwXQWK8F8d4=; b=MwIZgw5JRqZebHFfyLWT3QUKlgMGmJ2jIRQOQ1v9j3RfcxgOygM46FyrOpcaQZeyWn +LPSS7AdeZonhgUManMKecbwQNxIzk8JOmqGm6SO235LBOoisJ0DRW9hMdeNxp8kLIlp 0YX5XW6qFiwlWqcVBAvzhF8O6yoa++ktbq14UfjB/K+vhs/IXMwxu4BfgnE9FGtNKzic hYlqKbrZSFgHUhNhBUdkAYZ4ypgyKtrPXO+0zDjYH9L7HrWhhub2UnkHTkzNyYx8mvrG FOvC+HJOb9/B3OREB6lQqKwtp67Vf1hXuqUSL/hUbCADESxhc3ScNfBy98r0ZUfBWmA3 A3Hg== 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=F9wjGHZTkYUSyvEGHK44nsiLKjqbhX79XwXQWK8F8d4=; b=PsxKZH+4Nu4Q0fjnemqsuaqskLaIPN3KLvzEdv0/BdJP57swe6jjv55B4XVSLZ4ASr XPH1LZa5rplyJait2rOwo92n4UJM0xVvgJ/r/IiVbqtpvNTzZWzFcKrYI7suj/0idJ9a Tzginm64MyjcUGsdu42UM1tXcH1xBnED9Rn5VHIGH//7jNthdDyF6RMGHzbEGv1akKc6 +cOLUqqcQVq8BXCB0rfnnTEZ4TYb0uXRbTEc8YQAZw3imaK6HHwnQAF+XmK5EhTv66ii w7jumIwWKzqjoUUvAsIiptIDqbPN3ye1ZP+qNz9OHrcl/9TwIeDPZ4ino/14PRnWtLDg NaoA== X-Gm-Message-State: AOAM533XPe596ouW7iwBlfdLw4CuYEdlqVprPLt61j+9IXiSyC0G6Idp CS5+NSf62RqFcN0A/K7YwLIcy7/o5AzD7ammt2WC6Fv7Oe9Wfw== X-Google-Smtp-Source: ABdhPJyoQN1igfyCtowNutToeSKC5OeRNzax+GubNT+/HUqa+OHyNPgB0O1EZlQI4S04KJQwOrJ2dqN4FDq0m7OShAQ= X-Received: by 2002:a7b:c41a:: with SMTP id k26mr10976494wmi.117.1626987466026; Thu, 22 Jul 2021 13:57:46 -0700 (PDT) MIME-Version: 1.0 References: <87wnpikbma.wl-herbert@gojira.at> In-Reply-To: <87wnpikbma.wl-herbert@gojira.at> From: Kevin Oberman Date: Thu, 22 Jul 2021 13:57:29 -0700 Message-ID: Subject: Re: Clarification Of -jX Argument For buildworld/kernel To: "Herbert J. Skuhra" Cc: "freebsd-questions@freebsd.org" X-Rspamd-Queue-Id: 4GW4XW6qz4z3Q7N X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2021 20:57:48 -0000 On Thu, Jul 22, 2021 at 1:17 AM Herbert J. Skuhra wrote: > On Wed, 21 Jul 2021 16:17:11 +0200, Tim Daneliuk wrote: > > > > Is it still advisable to explicitly declare the numer of make processes > > when doing buildworld/buildkernel > > Sure, why not!? > > > or are the defaults best left alone? > > If something breaks try the defaults. > > > I am trying to suss through a 13-STABLE build problem to see if using -j4 > > on a 4 core machine is causing a race condition of some sort... > > Even when you build world/kernel with -j4 there should be an error > message. What is it? If you can't find it build without -j4. If it > still fails post the error here or on the stable mailing list. > > I build world and kernel (stable/13 and main) for amd64, armv7 and > arm64 with -j4 and have no issues. > > -- > Herbert While it may have changed, the defaut was originally to build on one processor, it may have changed, but I don't think so. Several years ago someone did some testing and demonstrated that the best performance was using number of threads + 2, but that was at least 12 years ago and systems topped out at 8 or 16 threads while far more are available today. It is likely that improvements may be seen with higher numbers for very large systems. If you wonder why more prarrallel build that threads is better, on an 8 thread system (like mine), if I set '-j8', only a maximum of 8 threads will attempt to run even though one or more processors may be idle while waiting for I/O. Having couple of added threads available means that this idle time is available for another thread. If you set the value to be equal to the available hardware threads, there won't be one. In the many years since parallel world/kernel builds were introduced, issues have been very rare, though mistakes have occasionally happened. I really would not worry too much about races. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683