View previous topic :: View next topic |
Author |
Message |
sgtmcc n00b
Joined: 11 Jul 2023 Posts: 10
|
Posted: Mon Aug 14, 2023 12:09 pm Post subject: Make.conf |
|
|
I've been playing with Gentoo about a month. building, tweaking, doing fresh installs etc. I have a few questions about setting up the make.conf
1. Is it better to have more or less USE flags? I've built with use flags of just amd and systemd, and also going through the list and picking anything that I think might be beneficial. I understand the more USE flags I have in make.conf or in portage.use will cause more and sometimes longer build times. I'm just curious what the community has to say.
2. Is it a bad idea to have a * in ACCEPT_LICENSE?
3. Is it better to have a more detailed and fine tuned make.conf or stick to a simple config file?
4. I understand the general rule about MAKEOPTS being half your system memory. Other than longer build times, are there any advantages or disadvantages to setting it lower? For example I have 16GB of RAM. The rule of thumb is to make it -j8. Would there be any advantages to setting to -j6 or -j4?
One last thing, not a make.conf question per say, but are there any advantages to doing an emerge -e world after the first updates and before I install additional things not covered in the handbook? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Mon Aug 14, 2023 12:39 pm Post subject: Re: Make.conf |
|
|
Welcome to Gentoo!
A lot of answers depends on what you expect from your installation so it's tough to give an exact answer.
1. Technically, the fewer the manual USE flags you use, the easier it is to maintain because the default is what the regression testers mainly use. However do not let this to stop you from setting all the USE flags you want/need in your machine and software (note that other distributions the same software package may behave different if you don't use all the USE flags), just expect to possibly fight more conflicts (or not).
2. If you are welcome to closed source, license restricted software, there's no problem with ACCEPT_LICENSE=* but Richard Stallman would not be happy!
3. The more detailed your make.conf is, the more tuned your setup will be with your computer (and yourself!). A default or minimized make.conf may not suit your needs or not allow builds to run optimally.
4. MAKEOPTS is totally used to optimize your system for build speed. You can leave it blank and it'd work just fine, except if you have a capable machine you'll be waiting for builds to complete, possibly much longer than necessary. If you have gobs of RAM and lots of cores/threads you should take advantage of it to speed things up, but if not, it can be detrimental. The trick is that MAKEOPTS sometimes depends on what package you're building and possibly a worst case scenario is best - and that 2GB per job is a good starting point as a place to not exceed.
As for emerge -e @world I'd not do other than as a last resort if things won't run/build properly. Usually this is unnecessary except if you want to reflect some setting you want to add to all packages, like if you want all packages to be rebuilt with a new compiler. I just personally think it's probably a waste of time except for the last resort case when things seem to be broken beyond repair. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Last edited by eccerr0r on Mon Aug 14, 2023 12:40 pm; edited 1 time in total |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4124 Location: Bavaria
|
Posted: Mon Aug 14, 2023 12:40 pm Post subject: |
|
|
sgtmcc wrote: | 1. Is it better to have more or less USE flags? I've built with use flags of just amd and systemd, and also going through the list and picking anything that I think might be beneficial. I understand the more USE flags I have in make.conf or in portage.use will cause more and sometimes longer build times. I'm just curious what the community has to say. |
Choose only these use flags you really need. Think about updates of your installed applications. The more packages you have installed the more packages will get a new version ... and you update software you will never use ... I dont must say this is senseless
sgtmcc wrote: | 2. Is it a bad idea to have a * in ACCEPT_LICENSE? |
Yes. With this setting you accepts every license of eevry possible package. Portage installs every package - even a package which need an "end user license agreement" (EULA). I have:
Code: | ACCEPT_LICENSE="* -@EULA" |
If I accidentally want to install a package that requires an EULA, Portage will not allow me to do so for now. If I really want this kind of software I can allow it individuelly for this package.
sgtmcc wrote: | 3. Is it better to have a more detailed and fine tuned make.conf or stick to a simple config file? |
I am a fan of the KISS prinicple ...
sgtmcc wrote: | 4. I understand the general rule about MAKEOPTS being half your system memory. Other than longer build times, are there any advantages or disadvantages to setting it lower? For example I have 16GB of RAM. The rule of thumb is to make it -j8. Would there be any advantages to setting to -j6 or -j4? |
It depends if you wait for an emerge job or if you dont care how long it takes. I am doing all @world updates at night, and I dont care if it takes 2 hours or 3 hours ... but I take care how much my system has to work: Think about your fans running at maximum speed ... So I have a smaller value than possible. AND: If I really want emerge a package at daytime and I waint for it, I can easily override my setting from make.conf in the command line; example:
Code: | # MAKEOPTS="-j32" emerge -pvD newpackage |
Maybe you want read this:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Optimize_compile_times
sgtmcc wrote: | One last thing, not a make.conf question per say, but are there any advantages to doing an emerge -e world after the first updates and before I install additional things not covered in the handbook? |
It depends ...
If you want really every application with specific compile options THEN a onetime "emerge -e world" is senseful. In every other case: No
(my installation steps; look at step A.3.4:
https://wiki.gentoo.org/wiki/User:Pietinger/temp/delete_me
) |
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 249
|
Posted: Mon Aug 14, 2023 12:41 pm Post subject: Re: Make.conf |
|
|
sgtmcc wrote: | 1. Is it better to have more or less USE flags? I've built with use flags of just amd and systemd, and also going through the list and picking anything that I think might be beneficial. I understand the more USE flags I have in make.conf or in portage.use will cause more and sometimes longer build times. I'm just curious what the community has to say. |
You should set up your USE flags according to the way you use your computer. Are you running a desktop with an xorg server? You should probably have X in your default USE flags. Are you using Wayland instead? Then put wayland in the defaults instead. Also, maybe negate the other one. Do you want a minimalistic distro? Consider USE="-*", which might be an overkill, but some people do that too.
sgtmcc wrote: | 2. Is it a bad idea to have a * in ACCEPT_LICENSE? |
I would say "yes". Are you sure you want to run software with a license saying "do not redistribute, do not disassemble, do not reverse engineer"? There are some wacky restrictions in some proprietary software.
sgtmcc wrote: | 3. Is it better to have a more detailed and fine tuned make.conf or stick to a simple config file? |
Again, that depends on how you plan to use your computer.
sgtmcc wrote: | 4. I understand the general rule about MAKEOPTS being half your system memory. Other than longer build times, are there any advantages or disadvantages to setting it lower? For example I have 16GB of RAM. The rule of thumb is to make it -j8. Would there be any advantages to setting to -j6 or -j4? |
That's a new one. The "jobs" translate to the number of threads the compiling process is allowed to use. Yes, lower number of jobs does equal lower RAM usage, but also longer compile times.
General recommendation is "if you have enough RAM go for
Code: | echo $(($(nproc)+1)) |
sgtmcc wrote: | One last thing, not a make.conf question per say, but are there any advantages to doing an emerge -e world after the first updates and before I install additional things not covered in the handbook? |
I doubt there would be anything noticeable there, except a longer time before you can use your computer. What do you expect to gain out of such an exercise?
Last edited by bstaletic on Mon Aug 14, 2023 1:01 pm; edited 1 time in total |
|
Back to top |
|
|
krumpf Apprentice
Joined: 15 Jul 2018 Posts: 174
|
Posted: Mon Aug 14, 2023 12:55 pm Post subject: Re: Make.conf |
|
|
eccerr0r wrote: | 2. If you are welcome to closed source, license restricted software, there's no problem with ACCEPT_LICENSE=* but Richard Stallman would not be happy! |
Stallman |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54212 Location: 56N 3W
|
Posted: Mon Aug 14, 2023 1:08 pm Post subject: |
|
|
sgtmcc,
Lets have a little backgound to USE flags.
You profile, shown an the top of sets some default USE flags that are a good starting point for your intended use case. If you choose the 'right' profile.
More on the 'right' profile later.
USE is a cascading variable, so settings in make.conf override the settings inherited from your profile. Thus USE="foo -bar" sets foo and unsets bar.
If foo and bar are like that in the profile anyway, the settings have no effect.
Its also possible to set per package USE flags in portage.package.use.
I like to choose the right profile, then modify it in make.conf and use portage.package.use for things I know I won't want to set globally.
This avoids a setting in portage.package.use forcing another setting in portage.package.use ... causing another setting in portage.package.use ... and so on.
What is the 'right' profile ?
That's very much up to you as the system designer. I use default/linux/amd64/17.1/no-multilib as there is no desktop profile for no-multilib, so I have to add the other USE flags myself.
systemd users on multilib can choose from.
Code: | [1] default/linux/amd64/17.1 (stable)
[5] default/linux/amd64/17.1/desktop (stable)
[6] default/linux/amd64/17.1/desktop/gnome (stable)
[7] default/linux/amd64/17.1/desktop/gnome/systemd (stable)
[8] default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr (stable) |
Checking how the USE flags differ is free. Make a note of your current profile.
Choose another profile and run
USE flags in green with an * have changed due to the profile change.
Remember to select your original profile when you have finished.
Where you start from and how you get to what you want is a decision for the system designer. That's you.
Quote: | 2. Is it a bad idea to have a * in ACCEPT_LICENSE? |
I wouldn't want to accept the "Gates Private License" or the "I will sacrifice my firstborn License" without reading them first.
Its a user decision.
If you are thinking of sharing binaries or sometimes even source code, you need to read licences as many non free licences forbid one or both
Quote: | 4. I understand the general rule about MAKEOPTS being half your system memory. |
If you are building on a laptop, with inadequate cooling (that's all of them) keeping the system out of thermal throttling may actually speed up build times.
By default, portage spawns build processes with nice=3, so interactive processes (nice=0) get priority for the CPU.
The portage nice value can be changed in in make.conf.
Even at nice=19, the nicest value you can set, it will still use all the CPU if there is nothing else ready to run. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4124 Location: Bavaria
|
Posted: Mon Aug 14, 2023 1:25 pm Post subject: Re: Make.conf |
|
|
bstaletic wrote: | General recommendation is "if you have enough RAM go for
Code: | echo $(($(nproc)+1)) |
|
This is an old and outdated recommendation. Dont add +1 to your maximum (logical) CPU cores. |
|
Back to top |
|
|
sgtmcc n00b
Joined: 11 Jul 2023 Posts: 10
|
Posted: Mon Aug 14, 2023 1:34 pm Post subject: |
|
|
First off, thank you for everyone who has offered up advice. I see some are in favor of one thing, while others go a different path
I might should have given a little background. Not sure if this will help, but here it is for those who want to waste their time
I played with Gentoo probably 10 years ago, but did not really know enough about Linux to really use it properly. At the time I just wanted something that worked and was easy, so Ubuntu has been my go to for as long as I can remember
While playing with Gentoo this past month, I've noticed it's not as quick as my Ubuntu desktops...especially programs in X such as browsers and libreoffice. I have absolutely no doubt this is still because I do not fully know what I'm doing with Gentoo. I figured it had to be something with the make.conf since that is where the main package building config is. So I went from minimal to extreme, but I've seen little to no benefit from either. While researching issues that have come up I have seen some extremely customized make.conf files, and those that go with the default and stick with it. I know it's something I'm just not seeing, so that's why I asked. I wasn't sure if an emerge -e world would go and rebuild everything and that might show some improvement or what. Again, thank you for your time and advice. I'll keep looking
Edit: My system has 2 4core INTEL cpus, and 32 GB RAM along with a GTX1080 Nvidia card. The WM I run is XFCE, so I do not think it is a hardware or WM issue. As I stated when I install Ubuntu, it just seems to run a lot quicker and smoother, and expected the same if not better from Gentoo. Could it be the kernel? I used genkernel and the only thing I changed was taking off Nouveau so I could install nvidia drivers
Last edited by sgtmcc on Mon Aug 14, 2023 2:16 pm; edited 2 times in total |
|
Back to top |
|
|
sgtmcc n00b
Joined: 11 Jul 2023 Posts: 10
|
Posted: Mon Aug 14, 2023 2:08 pm Post subject: |
|
|
NeddySeagoon wrote: | sgtmcc,
Lets have a little backgound to USE flags.
You profile, shown an the top of sets some default USE flags that are a good starting point for your intended use case. If you choose the 'right' profile.
More on the 'right' profile later.
USE is a cascading variable, so settings in make.conf override the settings inherited from your profile. Thus USE="foo -bar" sets foo and unsets bar.
If foo and bar are like that in the profile anyway, the settings have no effect.
Its also possible to set per package USE flags in portage.package.use.
I like to choose the right profile, then modify it in make.conf and use portage.package.use for things I know I won't want to set globally.
This avoids a setting in portage.package.use forcing another setting in portage.package.use ... causing another setting in portage.package.use ... and so on.
What is the 'right' profile ?
That's very much up to you as the system designer. I use default/linux/amd64/17.1/no-multilib as there is no desktop profile for no-multilib, so I have to add the other USE flags myself.
systemd users on multilib can choose from.
Code: | [1] default/linux/amd64/17.1 (stable)
[5] default/linux/amd64/17.1/desktop (stable)
[6] default/linux/amd64/17.1/desktop/gnome (stable)
[7] default/linux/amd64/17.1/desktop/gnome/systemd (stable)
[8] default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr (stable) |
Checking how the USE flags differ is free. Make a note of your current profile.
Choose another profile and run
USE flags in green with an * have changed due to the profile change.
Remember to select your original profile when you have finished. |
My current profile would be default/linux/amd64/17.1/desktop/systemd (stable)
Not sure if that would be correct, it just seemed that way during the install process |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54212 Location: 56N 3W
|
Posted: Mon Aug 14, 2023 2:45 pm Post subject: |
|
|
sgtmcc,
That's a good place to start.
Do not confuse 'using' gentoo and building/maintaining/installing gentooo
You use Gentoo, just like and binary distro.
The building/maintaining/installing is quite different to binary distros. All Gentoo really is is the portage package manager and the ::gentoo ebuild repository.
Everything else is $UPSTREAM. You must make all the choices that binary distros make for you.
Gentoo is a toolkit you use to design and install your own Linux. Think of LFS with a package manger.
By way of an example, app-office/libreoffice has at least Code: | accessibility base bluetooth +branding clang coinmp +cups custom-cflags +dbus debug eds firebird googledrive gstreamer +gtk java kde ldap +mariadb odk pdfimport postgres test valgrind vulkan | , that's 25 USE flags or 2^25 different possible ways to configure libreoffice. You can pick one, build it and if you don't like it try another.
How many ways does Ubuntu give you?
I suspect, exactly one.
Share your , yourand outputs if you want a heath check.
lspci will tell about your hardware on the PCIe bus. lsusb will do the same for connected USB devices and will tell us your current global settings for portage. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
sublogic Apprentice
Joined: 21 Mar 2022 Posts: 222 Location: Pennsylvania, USA
|
Posted: Mon Aug 14, 2023 11:45 pm Post subject: |
|
|
sgtmcc wrote: | ... While playing with Gentoo this past month, I've noticed it's not as quick as my Ubuntu desktops...especially programs in X such as browsers and libreoffice. ... | I would investigate how the video card is utilized. Maybe you can pull in better drivers ? Run the commands suggested by NeddySeagoon to show us what you have. Also, your /var/log/Xorg.0.log will show what driver is used. (Use wgetpaste for large files instead of posting them here.)
Other than that, the COMMON_FLAGS in make.conf could make a difference, but don't overdo it. COMMON_FLAGS="-march=native -O2 -pipe" is pretty common.
The MAKEOPTS won't make any difference. It affects how fast the programs are compiled, not how fast they run. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|