Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How much RAM is required to compile packages without swap?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 449

PostPosted: Sun Dec 22, 2019 11:30 pm    Post subject: How much RAM is required to compile packages without swap? Reply with quote

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
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 449

PostPosted: Mon Dec 23, 2019 12:54 am    Post subject: Reply with quote

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
View user's profile Send private message
mDup
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 202

PostPosted: Mon Dec 23, 2019 1:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6873

PostPosted: Mon Dec 23, 2019 5:28 am    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7466

PostPosted: Mon Dec 23, 2019 3:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
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