View previous topic :: View next topic |
Author |
Message |
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sun Dec 22, 2019 11:30 pm Post subject: How much RAM is required to compile packages without swap? |
|
|
Let's assume that I mounted tmpfs on /tmp, but not on /var/tmp/portage. Because ARM single board computers do not come with much memory, I want to know how much is actually required to compile packages without swap.
- How much ram does a basic gentoo server need? It is going to need sys-devel/gcc, dev-lang/rust, dev-lang/go, dev-lang/python, and optionally dev-lang/ghc. It also has to compile linux kernel.
- How much ram does a basic gentoo desktop need? It is going to compile firefox and chromium as well.
|
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Mon Dec 23, 2019 12:54 am Post subject: |
|
|
According to How much RAM do I need to emerge www-client/chromium, it seems 4GB should be sufficient for chromium if I built it outside a tmpfs mount and kept the number of simultaneous make jobs low.
MAKEOPts="-j 1" or MAKEOPTS="-j 2"
I could also try to fix cross distcc in qemu-aarch64 chroot. I never bothered to fix cross distcc issues before. |
|
Back to top |
|
|
mDup Apprentice
Joined: 14 Apr 2006 Posts: 212
|
Posted: Mon Dec 23, 2019 1:28 am Post subject: |
|
|
crocket wrote: | According to How much RAM do I need to emerge www-client/chromium, it seems 4GB should be sufficient for chromium if I built it outside a tmpfs mount and kept the number of simultaneous make jobs low.
MAKEOPts="-j 1" or MAKEOPTS="-j 2"
I could also try to fix cross distcc in qemu-aarch64 chroot. I never bothered to fix cross distcc issues before. |
Good that you mention number of build jobs, typically (perhaps not recently) one recommends '#jobs = #cores +1' , and that obviously linearly has an advantage (time) and a disadvantage (memory). It seems chromium building may add up memory as you mention: for example on a 12 core 8GB RAM (amd64) device it will swap with -j13=#c+1. So I use -j5 (only for chromium, that is). That said: exactly those huge ebuilds will matter when it comes to get your job done in one day or in one week on an arm64 device. I have 8core 3GB arm64 devices and nevertheless use -j3 (in stead of -j9) for most building. But my time takes 3 times longer... Basically, even if one manage to build everything, one never manages to be up to date as new ebuilds come. I will add: my arm64 devices are lightweight devices and I do not run into this 'bite in own (time) tail' dilemma. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Dec 23, 2019 5:28 am Post subject: |
|
|
Compiling something like chromium, it's generally a better idea to let the system swap out unused anonymous memory than to reach a state where it has to discard pages of the running gcc executable to proceed. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Dec 23, 2019 3:34 pm Post subject: |
|
|
swap will be slow, but its value comes from saving you from oom
oom is an issue if a 10 hours compile application is been stop for few Kb of memory missing after 9 hours.
not using swap and using /tmp on tmpfs is really counter productive for an arm device (it's not because portage won't use /tmp that other applications will stop using it when portage is running) |
|
Back to top |
|
|
|