From nobody Tue Sep 16 21:31:33 2025 X-Original-To: java@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 4cRFTV18dRz686DM for ; Tue, 16 Sep 2025 21:31:42 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int-backup.realworks.nl (smtp-relay-int-backup.realworks.nl [87.255.56.188]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRFTT4VSPz3bwC for ; Tue, 16 Sep 2025 21:31:41 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Authentication-Results: mx1.freebsd.org; none Received: from smtp-relay-int-backup.realworks.nl (crmlive7.colo2.realworks.nl [10.2.52.27]) by mailrelayint2.colo2.realworks.nl (Postfix) with ESMTP id 4cRFTL12gVzlX; Tue, 16 Sep 2025 23:31:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1758058294; 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: in-reply-to:in-reply-to:references:references; bh=E8IaN5NLGbGwfeHGXc/OVQ564MME4F/VL86eQwvF+30=; b=uDeHaxFUfOMpOKUpk1EkyBp+8Dh3MUazxO5G+BVJL+yq/6qLZcszjmLqlYQVwm5wg+T0ec Xe49pZKsEmcTrO8ke9W+7LoLEbSr2KnR9lb5poHkpU+jiVbrI2543W2hBBC+ApMt5vYpD0 hPKvnSXkJSBvueBKixDaSgRZd/fKvr2iuYHy0WYesDAbuDr0V2IbeewK4NPYrxggaMr+Ap qKbCLRonfZTZfM9xbU/TZQsEE8YGJ8I+V0PWsK9PqZm9/6v7BzMQHM9/NTEujN8Hgcv9wz lz5bu1ap99CGxv6lsle9QNhynhIq3DGN02eDPmYK9gnwTYinMAn22r7dl1sCng== Received: from crmlive7.colo2.realworks.nl (localhost [127.0.0.1]) by crmlive7.colo2.realworks.nl (Postfix) with ESMTP id D4632260124; Tue, 16 Sep 2025 23:31:33 +0200 (CEST) Date: Tue, 16 Sep 2025 23:31:33 +0200 (CEST) From: Ronald Klop To: Harald Eilertsen Cc: java@freebsd.org Message-ID: <1457853127.243778.1758058293681@localhost> In-Reply-To: References: <1221594030.658.1756976173189@localhost> <1330428831.1750.1756980558066@localhost> <2053927433.1876.1757575928041@localhost> <387357483.2815.1757924099539@localhost> Subject: Re: (solved, I think) Re: openjdk build failures on "nm" List-Id: Porting Java to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-java List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-java@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_243777_1489369171.1758058293678" X-Mailer: Realworks (764.61) X-Originating-Host: from (83-81-212-149.cable.dynamic.v4.ziggo.nl [83.81.212.149]) by crmlive7 [10.2.52.27] with HTTP; Tue, 16 Sep 2025 23:31:33 +0200 Importance: Normal X-Priority: 3 (Normal) X-Originating-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cRFTT4VSPz3bwC ------=_Part_243777_1489369171.1758058293678 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Van: Harald Eilertsen Datum: dinsdag, 16 september 2025 13:33 Aan: Ronald Klop CC: java@freebsd.org Onderwerp: Re: (solved, I think) Re: openjdk build failures on "nm" >=20 > Hi Ronald, >=20 > On Mon, Sep 15, 2025 at 10:14:59AM +0200, Ronald Klop wrote: > > The current construction in openjdk17 handles MAKE_JOBS_NUMBER > > properly. And with that also the MAKE_JOBS_UNSAFE variable. After more > > testing we can use this blueprint in other openjdk ports. > > Also in openjdk23 and -24. They don't have flapping builds but can > > improve handling of MAKE_JOBS_NUMBER. >=20 > Nice finds! I don't really have a strong opinion either way, but think > it should probably be selectable whether to use (and how many) parallel > jobs to run. I'm curious if there has been problems with this number of > parallel jobs for other platforms as well. I'll try to ask around a bit. >=20 > The OpenJDK build process does, as you say, determine how many jobs to > spawn on it's own, based on available CPU cores and memory. Having the > port Makefile trying to parallelize that further would get in the way of > this, so we set MAKE_JOBS_UNSAFE to prevent it. As I understand it, this > should not prevent the OpenJDK build system to spawn parallel jobs. >=20 > In addition to setting the --with-jobs config parameter, it's possible > to tune this with the --with-num-cores and --with-memory-size to limit > the number of jobs to not occupy the whole capacity of the machine. >=20 > It would be interesting to know if there's any difference if we clamp > number of cores it's allowed to use to f.ex. 16 or something. >=20 > Will you be at EuroBSDCon or the FreeBSD dev summit? Could be > interesting to dig into these things a bit there with some of the > experts on the port system available too. >=20 > Take care! > Harald >=20 >=20 >=20 Hi Harald, Thanks for the tip. I just found the documentation of --with-num-cores in doc/building.md. I th= ink that is what we need. It makes it possible to set an upper limit on the= number of parallel jobs and lets configure still calculate the balance wit= h the amount of memory available. I'm curious what the pkg build cluster does tomorrow morning. This morning = the relevant pkg builds (like 142amd64-default) crashed before any pkg was = build. Unfortunately I'm not at EuroBSDCon this year. I have been there in previou= s editions. Lots of fun =F0=9F=91=8D Regards, Ronald. =20 ------=_Part_243777_1489369171.1758058293678 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Van: Harald Eilertsen <haraldei@anduin.net>
Datum: dinsdag, 16 september 2025 13:33
Aan: Ronald Klop <ronald-lists@klop.ws>
CC: java@freebsd.org
Onderwerp: Re: (solved, I think) Re: openjdk build failure= s on "nm"

Hi Ronald,

On Mon, Sep 15, 2025 at 10:14:59AM +0200, Ronald Klop wrote:
> The current construction in openjdk17 handles MAKE_JOBS_NUMBER
> properly. And with that also the MAKE_JOBS_UNSAFE variable. After more=
> testing we can use this blueprint in other openjdk ports.
> Also in openjdk23 and -24. They don't have flapping builds but can
> improve handling of MAKE_JOBS_NUMBER.

Nice finds! I don't really have a strong opinion either way, but think
it should probably be selectable whether to use (and how many) parallel
jobs to run. I'm curious if there has been problems with this number of
parallel jobs for other platforms as well. I'll try to ask around a bit.
The OpenJDK build process does, as you say, determine how many jobs to
spawn on it's own, based on available CPU cores and memory. Having the
port Makefile trying to parallelize that further would get in the way of this, so we set MAKE_JOBS_UNSAFE to prevent it. As I understand it, this should not prevent the OpenJDK build system to spawn parallel jobs.

In addition to setting the --with-jobs config parameter, it's possible
to tune this with the --with-num-cores and --with-memory-size to limit
the number of jobs to not occupy the whole capacity of the machine.

It would be interesting to know if there's any difference if we clamp
number of cores it's allowed to use to f.ex. 16 or something.

Will you be at EuroBSDCon or the FreeBSD dev summit? Could be
interesting to dig into these things a bit there with some of the
experts on the port system available too.

Take care!
Harald



Hi Harald,

Thanks for the tip.
I just found the documentation of --with-num-cores in doc/building.md. I th= ink that is what we need. It makes it possible to set an upper limit on the= number of parallel jobs and lets configure still calculate the balance wit= h the amount of memory available.

I'm curious what the pkg build cluster does tomorrow morning. This = morning the relevant pkg builds (like 142amd64-default) crashed before any = pkg was build.

Unfortunately I'm not at EuroBSDCon this year. I have been there in previou= s editions. Lots of fun =F0=9F=91=8D

Regards,
Ronald.
  ------=_Part_243777_1489369171.1758058293678--