From f21eaaa91cf610f4996eb829a39ae83d17522c0f Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Fri, 26 Feb 2021 19:39:38 +0100 Subject: [PATCH] restrict chromium and qtwebengine (which basically compiles chromium) to -j2 to restrict memory usage --- profiles/targets/desktop/bashrc/half_parallell.rc | 2 -- profiles/targets/desktop/bashrc/makeopts-j2.rc | 1 + profiles/targets/desktop/package.bashrc/chromium | 2 +- profiles/targets/desktop/package.bashrc/qtwebengine | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 profiles/targets/desktop/bashrc/half_parallell.rc create mode 100644 profiles/targets/desktop/bashrc/makeopts-j2.rc diff --git a/profiles/targets/desktop/bashrc/half_parallell.rc b/profiles/targets/desktop/bashrc/half_parallell.rc deleted file mode 100644 index 0f7634a..0000000 --- a/profiles/targets/desktop/bashrc/half_parallell.rc +++ /dev/null @@ -1,2 +0,0 @@ -nr_cpu=$(lscpu -p | egrep -v '^#' | wc -l) -export MAKEOPTS="-j$(( ${nr_cpu}/2 )) -l$(( ${nr_cpu}/4 ))" diff --git a/profiles/targets/desktop/bashrc/makeopts-j2.rc b/profiles/targets/desktop/bashrc/makeopts-j2.rc new file mode 100644 index 0000000..95e3046 --- /dev/null +++ b/profiles/targets/desktop/bashrc/makeopts-j2.rc @@ -0,0 +1 @@ +export MAKEOPTS="-j2 -l2" diff --git a/profiles/targets/desktop/package.bashrc/chromium b/profiles/targets/desktop/package.bashrc/chromium index d772b38..f21fb3b 100644 --- a/profiles/targets/desktop/package.bashrc/chromium +++ b/profiles/targets/desktop/package.bashrc/chromium @@ -1 +1 @@ -www-client/chromium half_parallell.rc +www-client/chromium makeopts-j2.rc diff --git a/profiles/targets/desktop/package.bashrc/qtwebengine b/profiles/targets/desktop/package.bashrc/qtwebengine index eb76623..d6d811b 100644 --- a/profiles/targets/desktop/package.bashrc/qtwebengine +++ b/profiles/targets/desktop/package.bashrc/qtwebengine @@ -1 +1 @@ -dev-qt/qtwebengine half_parallell.rc +dev-qt/qtwebengine makeopts-j2.rc