View previous topic :: View next topic |
Author |
Message |
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Tue Oct 29, 2024 6:56 am Post subject: building golang takes long |
|
|
Hello
I have to install fzf. That has a dependency to golang. But golang takes too long to install, and I do not know why. It is trying to do
Code: | /usr/lib/go-bootstrap/bin/go build -o cmd/dist/dist ./cmd/dist |
I have 16G memory, but neofetch reports 1200MB being used, and htop reports the same.
Any ideas? |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1792 Location: Germany
|
|
Back to top |
|
|
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Tue Oct 29, 2024 7:57 am Post subject: |
|
|
Banana wrote: | What exactly do you mean by "But golang takes too long to install...."? Just too long for your taste or does en error happen? |
Not to my taste. It took me ~2 hrs to build golang. Did not expect that.
i did not set the makeopts because of a description in the manual.
Quote: | # If left undefined, Portage's default behavior is to:
# - set the MAKEOPTS jobs value to the same number of threads returned by `nproc`
# - set the MAKEOPTS load-average value slightly above the number of threads returned by `nproc`, due to it being a damped value
# Please replace '4' as appropriate for the system (min(RAM/2GB, threads), or leave it unset.
MAKEOPTS="-j4 -l5" |
and
Quote: | Further, as of Portage 3.0.53[2], if left undefined, Portage's default behavior is to set the MAKEOPTS load-average value to the same number of threads returned by nproc |
I am assuming that it would use as much memory as possible, but the system only uses ~2G out of 16G, that is also something unexpected.
Regards |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3768 Location: Rasi, Finland
|
Posted: Tue Oct 29, 2024 9:49 am Post subject: |
|
|
rzdndr wrote: | I am assuming that it would use as much memory as possible, but the system only uses ~2G out of 16G, that is also something unexpected.
Regards | The memory usage of compilation processes vary vastly.
The 2Gig per compiler thread is just a result of rough estimate what the worst case scenario would be.
I recently ran few tests compiling qtwebengine, which is notoriously long and memory intensive process.
During the compilation process I saw maximum of 1.3G per thread memory usage. It could have been more, I didn't track the memory usage very accurately.
Then there's the possibility of extra memory usage if you place your PORTAGE_TMPDIR on tmpfs. Again referring to qtwebengine compilation, it seemed like it took around 5G of memory from the tmpfs mount.
So no. Each compilation process doesn't (and normally shouldn't) use all your memory.
CPU usage on the other hand can be easily utilized to the max with larger packages. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
Last edited by Zucca on Tue Oct 29, 2024 2:40 pm; edited 1 time in total |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 240
|
Posted: Tue Oct 29, 2024 12:23 pm Post subject: |
|
|
rzdndr wrote: | Banana wrote: | What exactly do you mean by "But golang takes too long to install...."? Just too long for your taste or does en error happen? |
Not to my taste. It took me ~2 hrs to build golang. Did not expect that.
|
There is a simple, common solution to the issue of it not being to one's taste to spend a long time compiling certain packages:
https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html |
|
Back to top |
|
|
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Tue Oct 29, 2024 1:32 pm Post subject: |
|
|
eschwartz wrote: | rzdndr wrote: | Banana wrote: | What exactly do you mean by "But golang takes too long to install...."? Just too long for your taste or does en error happen? |
Not to my taste. It took me ~2 hrs to build golang. Did not expect that.
|
There is a simple, common solution to the issue of it not being to one's taste to spend a long time compiling certain packages:
https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html |
Was looking at go-bin package. I see I could have gotten go from the binhost hosts. |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 2027
|
Posted: Tue Oct 29, 2024 3:02 pm Post subject: |
|
|
Note that I think there is some long-standing odd interaction between sandbox and building Go where sometimes it seems to take ages to build. |
|
Back to top |
|
|
|