p4-dpdk-target icon indicating copy to clipboard operation
p4-dpdk-target copied to clipboard

Consider using fewer parallel processes during build

Open jafingerhut opened this issue 3 years ago • 1 comments

The -j48 in the ninja command line requires at least about 8 GB of RAM on the system in order to avoid random process crashes due to the Linux kernel OOM process killer: https://github.com/p4lang/p4-dpdk-target/blob/0baaa0cd296008bb307cb750cd2419036dd804bc/src/lld/dpdk/Makefile.am#L5

https://www.kernel.org/doc/gorman/html/understand/understand016.html

It also does not help builds go any faster on a system with relatively few CPU cores, e.g. 4 to 8.

Consider either hard-coding a smaller number (perhaps -j8 ?) or perhaps make it configurable via an environment variable.

jafingerhut avatar Dec 20 '21 10:12 jafingerhut

Makes sense. will address it

swaroopsarma avatar Jan 07 '22 10:01 swaroopsarma

Now its detected at run time and used for parallel builds

swaroopsarma avatar Dec 19 '22 13:12 swaroopsarma