User:Jens3/Compiling big packages

This page is obsolete, since there is Knowledge_Base:Emerge_out_of_memory

The Raspberry Pi 400 has 4GB RAM and 4 cores. To calculate how many threads should be possible use as a thumb of rule: about 1 thread per core but not more then RAM/2GB and at least one thread. The Pi400 has 4 cores but only (4 GB/2GB)=2 threads are recommended.

Using LTO may lead to a higher RAM usage.

Some programms need more RAM then 2GB per thread. A useful list of big programs can be found at Portage_TMPDIR_on_tmpfs, though that wiki site is for using more RAM to build with a tmp dir in RAM. If you compile packages which need much ram you can add -j1 on a per package base to use less ram.

I use the following configuration to compile some packages with just one thread: