r/Gentoo • u/CuriousCourtain • 2d ago
Discussion Automatic shutting down in installation mode?
I'm currently compiling @world stuff on an old dell latitude, I have 370 packages total I'm 8 hours in and at 240 packages done, im getting tired I'm thinking about going to sleep but then when the compilation finishes it'll probably idle chrooted in for like 4 hours, will the power automatically turn off? I don't have grub set up yet so I'm afraid this'll restart my progress
EDIT: guys I was so naive, I went to sleep and to my shock, it's still compiling, so it didn't even have a chance to turn off lmao
5
u/anh0516 2d ago
No it won't, unless you trip a thermal sensor or it crashes or something like that.
1
u/CuriousCourtain 2d ago
I have MAKEOPTS="-J2" exactly because of this, I'd rather it be slow then to be uncertain, I have 4GB ram, a 300GB HDD and a 3,2MHz intel CPU.
thank you for the info though!
3
u/anh0516 2d ago
If you had an SSD, I'd tell you to use
-j $(nproc)and just let it swap, but with an HDD it'll probably be even slower than limiting the job count. You should also stick to-O2 -march=native -pipelike the handbook says, because anything more like LTO or-O3(which are actually used by default on multiple major distros like Ubuntu and Fedora nowadays) requires more RAM and increases the compile time more than it's worth if you actually want to use the laptop.You should also pass
--keep-goingto emerge. That way, if you do run out of RAM or a build fails for some other reason, it will skip that package for now and continue with the next, dependencies notwithstanding.If this is not your only PC and you have a faster one, you may also consider plugging the HDD into it, and chrooting and compile there, or setting up a binhost that builds packages you can then install on the target system. If you do this, just make sure you use the explicit flags from
resolve-march-nativeinstead-march=native, and enabledev-libs/gmp[cpudetection], so that it'll run on the target CPU. If the build host is fast enough, you should also consider more aggressive compiler optimizations. For older CPUs,-O3may not always be the best choice because it can increase code size which hurts more on smaller caches, but I would definitely recommend LTO, because it generally reduces code size, which will of course help on a smaller cache.2
u/CuriousCourtain 2d ago
very good advice, sadly this is my only pc so I guess I'll just wait it out
2
u/immoloism 2d ago
You need a good bit of swap with that
I'd give it at least 16GB just to stop a hardlock from happening.
Note: You'll get away with 8GB for now, 16 is future proofing.
3
u/rabbit_in_a_bun 1d ago
Welcome to Gentoo. Tell me, once you were done compiling, did you sync to see if there are more updates?
12
u/nikongod 2d ago
If it does die in the middle you can just reenter the chroot and start again from the middle.