Swap on a Pi reads and writes to the SD card with a speed of about 25 MB/sec. The speed of regular RAM is 2500 MB/sec. Therefore, assuming swap size has been increased enough so it doesn't just crash instead, the slowdown could be noticeable.What is the problem with running 4 compilers in parallel? How does it stall the RAM? At most it will make the system slower, right? What is the relation?
Pi 02W only has 512M. Trying to run 4 compilers (or even worse linkers) in parallel is likely to exhaust RAM and leave you in swap hell.
Are all 4 compilers running on the same processor, or on different processors?
Will the same issue occur if I execute/run multiple C threads, or GO routines or such in parallel?
Restricting the build to only one core means less swap is needed and so the slowdown less.
The difficulty is the compiler and link optimiser take lots of memory so it's impractical to run them in parallel on a Zero 2. Other kinds of parallel tasks, for example a collection of less memory hungry Go routines will not have any problem running in parallel using all four cores.
Statistics: Posted by ejolson — Thu Sep 26, 2024 3:48 am