Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

2022q2/gcc.adoc: Add warning about LTO #489

Merged
merged 4 commits into from Jul 22, 2022
Merged

Conversation

lsalvadore
Copy link
Member

Warn users about the amount of ram and time needed to build GCC with
LTO_BOOTSTRAP enabled.

Reviewed by: gerald

Warn users about the amount of ram and time needed to build GCC with
LTO_BOOTSTRAP enabled.

Reviewed by:	gerald
2022q2/gcc.adoc Outdated
@@ -12,7 +12,7 @@ Contact: Piotr Kubaj <pkubaj@FreeBSD.org>
* salvadore@ worked on the upgrade of GCC_DEFAULT in Mk/bsd.default-versions.mk from 10 to 11, opening bug reports based on antoine@'s exp-runs and fixing some: many thanks to all those that helped with this task. The GCC_DEFAULT update from GCC 10 to GCC 11 has now been committed by gerald@ and happened in time for the next quarterly branch.
link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378]

* pkubaj@ switched GCC bootstrapping to use Link Time Optimization for GCC itself for GCC 11 and newer.
* pkubaj@ switched GCC bootstrapping to use Link Time Optimization for GCC itself for GCC 11 and newer by introducing a new option enabled by default. Building with LTO_BOOTSTRAP enabled requires significant amounts of memory and time. Consider disabling it in favor of STANDARD_BOOTSTRAP (or disabling BOOTSTRAP altogether) in case that is a problem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a specific figure or a range for memory needed, eg is it 4GB, 64 GB, or 1 TB?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some figures in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264949, in particular https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264949#c17 . However, I think it is better to keep the statement general as:

  • it regards 5 different ports, with different statistics;
  • memory consumption depends on many different things. For example, are we building from ports or with poudriere? If we are using poudriere, how is USE_TMPFS defined? What about the machine architecture?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think some rough figures would help a reader decide whether it's worth trying at all, or is it nearly certain that the attempt will run out of memory after wasting 12 hours on say, an 8GB laptop. Or failing that, a link to that information.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added some figures, let me know if it is better.

Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me.

@lsalvadore lsalvadore requested review from GeraldPfeifer and removed request for GeraldPfeifer July 15, 2022 13:15
@lsalvadore
Copy link
Member Author

I am still working on it, please wait to merge.

2022q2/gcc.adoc Outdated
@@ -12,7 +12,7 @@ Contact: Piotr Kubaj <pkubaj@FreeBSD.org>
* salvadore@ worked on the upgrade of GCC_DEFAULT in Mk/bsd.default-versions.mk from 10 to 11, opening bug reports based on antoine@'s exp-runs and fixing some: many thanks to all those that helped with this task. The GCC_DEFAULT update from GCC 10 to GCC 11 has now been committed by gerald@ and happened in time for the next quarterly branch.
link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378]

* pkubaj@ switched GCC bootstrapping to use Link Time Optimization for GCC itself for GCC 11 and newer by introducing a new option enabled by default. Building with LTO_BOOTSTRAP enabled requires significant amounts of memory and time. Consider disabling it in favor of STANDARD_BOOTSTRAP (or disabling BOOTSTRAP altogether) in case that is a problem.
* pkubaj@ switched GCC bootstrapping to use Link Time Optimization for GCC itself for GCC 11 and newer by introducing a new option enabled by default. Building with LTO_BOOTSTRAP enabled requires significant amounts of memory and time. How much resources are actually needed depends on your configuration (e.g. are you building from ports or with poudriere? What is your architecture?). To give an idea, link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264949#c17[a user reported that he needed 5 GiB of tmpfs]. Consider disabling LTO_BOOTSTRAP in favor of STANDARD_BOOTSTRAP (or disabling BOOTSTRAP altogether) in case that is a problem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/a user reported that he needed/a user reported needing/

2022q2/gcc.adoc Outdated
@@ -12,7 +12,7 @@ Contact: Piotr Kubaj <pkubaj@FreeBSD.org>
* salvadore@ worked on the upgrade of GCC_DEFAULT in Mk/bsd.default-versions.mk from 10 to 11, opening bug reports based on antoine@'s exp-runs and fixing some: many thanks to all those that helped with this task. The GCC_DEFAULT update from GCC 10 to GCC 11 has now been committed by gerald@ and happened in time for the next quarterly branch.
link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378]

* pkubaj@ switched GCC bootstrapping to use Link Time Optimization for GCC itself for GCC 11 and newer by introducing a new option enabled by default. Building with LTO_BOOTSTRAP enabled requires significant amounts of memory and time. How much resources are actually needed depends on your configuration (e.g. are you building from ports or with poudriere? What is your architecture?). To give an idea, link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264949#c17[a user reported that he needed 5 GiB of tmpfs]. Consider disabling LTO_BOOTSTRAP in favor of STANDARD_BOOTSTRAP (or disabling BOOTSTRAP altogether) in case that is a problem.
* pkubaj@ switched GCC bootstrapping to use Link Time Optimization for GCC itself for GCC 11 and newer by introducing a new option enabled by default. Building with LTO_BOOTSTRAP enabled requires significant amounts of memory and time. How much resources are actually needed depends on your configuration (e.g. are you building from ports or with poudriere? What is your architecture?). To give an idea, link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264949#c17[a user reported that he needed 5 GiB of tmpfs], while link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265254#c2[another one estimated he would need about 130GB of memory for a successful build]. Consider disabling LTO_BOOTSTRAP in favor of STANDARD_BOOTSTRAP (or disabling BOOTSTRAP altogether) in case that is a problem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/another one estimated he would need/another estimated they would need/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the use of singular they really needed here? While I am not giving the name of the reporter, the reporter's identity is well known, I don't think this case needs a gender neutral form.

Moreover, if gender neutrality is needed, I usually prefer to use passive form if possible (in this case I would use "but in a different case it has also been estimated that 130GB of memory would be needed for a successful build"), but this might be because I am not a native English speaker and I will not insist if you confirm that singular they is better.

Anyway, I might need to remove the reference to this PR as this might be related to a bug instead of expected behavior, so it is not much important, at least for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the use of singular they really needed here? While I am not giving the name of the reporter, the reporter's identity is well known, I don't think this case needs a gender neutral form.

Fair question. I tend to err on the side of caution and use gender-neutral pronouns unless I know the person's preference, as the gender implied by the first name isn't 100% conclusive, non-binary people being an obvious case where it can mislead. That said, you appear to know the commenter better than I do (which is not at all), so I'll trust your judgement here.

@pauamma pauamma marked this pull request as draft July 17, 2022 09:49
@pauamma
Copy link
Contributor

pauamma commented Jul 17, 2022

I am still working on it, please wait to merge.

I just flagged it as a draft so I remember not to do that. Let me know when it's ready.

@lsalvadore
Copy link
Member Author

Thank you very much pauamma for your review. I did not know about drafts: I will use that next time.

- s/a user reported that he needed/a user reported needing/ [1]

- Provide a bit more information about the LTO second example.
  Discussion is still in progress so the example cannot be completely
  clear, but we now give all the references necessary to follow the
  topic.

Reported by:	pauamma [1]
@lsalvadore lsalvadore marked this pull request as ready for review July 20, 2022 00:11
@lsalvadore
Copy link
Member Author

I think this is ready for review now.

@pauamma pauamma merged commit 282693c into freebsd:main Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants