meson compile: Improve compile times
Commit Message
From: Owen Hilyard <ohilyard@iol.unh.edu>
Increased compile timeout
Removed workers parameter from ninja compilation command
After a review of CI metrics, we noticed that dts runtimes had increased
greatly over the last few months. A review of recent logs showed
timeouts for compiling dpdk. Upon review, we discovered that, if the
"dut_cores" parameter is not set in conf/crbs.cfg, then dts uses the
default value, which is a single core, as the core list. The number of cores
in this list was then used the number of workers for ninja. This causes DTS
to attempt to compile DPDK serially, resulting in greatly increased compile
times. The IOL's development machine saw a 30x compile speed increase from
the included changes.
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
framework/project_dpdk.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> Increased compile timeout
> Removed workers parameter from ninja compilation command
>
> After a review of CI metrics, we noticed that dts runtimes had increased greatly
> over the last few months. A review of recent logs showed timeouts for
> compiling dpdk. Upon review, we discovered that, if the "dut_cores" parameter
> is not set in conf/crbs.cfg, then dts uses the default value, which is a single core,
> as the core list. The number of cores in this list was then used the number of
> workers for ninja. This causes DTS to attempt to compile DPDK serially, resulting
> in greatly increased compile times. The IOL's development machine saw a 30x
> compile speed increase from the included changes.
>
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Applied, thanks
@@ -281,7 +281,7 @@ class DPDKdut(Dut):
"""
Build DPDK source code on linux use meson
"""
- build_time = 900
+ build_time = 1200
target_info = target.split('-')
arch = target_info[0]
machine = target_info[1]
@@ -315,7 +315,7 @@ class DPDKdut(Dut):
toolchain, extra_options, options_config, default_library, target), "# ", build_time)
assert ("FAILED" not in out), "meson setup failed ..."
- out = self.send_expect("ninja -C %s -j %d" % (target, self.number_of_cores), "# ", build_time)
+ out = self.send_expect("ninja -C %s" % target, "# ", build_time)
assert ("FAILED" not in out), "ninja complie failed ...\r\n %s" % out
# copy kmod file to the folder same as make