public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 212f17c1145bb6978b4797eb9c805f603ecb1f29
Date: Wed, 23 May 2018 12:06:18 +0100	[thread overview]
Message-ID: <20180523110619.5FCD41081DF2@git01.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2858 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  212f17c1145bb6978b4797eb9c805f603ecb1f29 (commit)
      from  30a42c6df9e7db23cf5f202d749747967fbcbf55 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 212f17c1145bb6978b4797eb9c805f603ecb1f29
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Wed May 23 12:03:06 2018 +0100

    make.sh: Refactor XZ compression parameters again
    
    I completely ruined this now and therefore I had to make
    it new again:
    
    * I split the parameters into smaller chunks now and added
      comments about why we have chosen those.
    
    * I move it all to configure_build() since we do not need
      to check if the host architecture is 64 bit capable, but
      the architecture we are building for.
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 make.sh | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

Difference in files:
diff --git a/make.sh b/make.sh
index 703ce0c48..070271658 100755
--- a/make.sh
+++ b/make.sh
@@ -225,6 +225,30 @@ configure_build() {
 
 		MAKETUNING="-j${parallelism}"
 	fi
+
+	# Compression parameters
+	# We use mode 8 for reasonable memory usage when decompressing
+	# but with overall good compression
+	XZ_OPT="-8"
+
+	# We try to use as many cores as possible
+	XZ_OPT="${XZ_OPT} -T0"
+
+	# We need to limit memory because XZ uses too much when running
+	# in parallel and it isn't very smart in limiting itself.
+	# We allow XZ to use up to 70% of all system memory.
+	local xz_memory=$(( HOST_MEM * 7 / 10 ))
+
+	# XZ memory cannot be larger than 2GB on 32 bit systems
+	case "${build_arch}" in
+		i*86|armv*)
+			if [ ${xz_memory} -gt 2048 ]; then
+				xz_memory=2048
+			fi
+			;;
+	esac
+
+	XZ_OPT="${XZ_OPT} --memory=${xz_memory}MiB"
 }
 
 configure_build_guess() {
@@ -861,20 +885,6 @@ fi
 # Get the amount of memory in this build system
 HOST_MEM=$(system_memory)
 
-# We compress archives with "xz -8", using all cores and up to 70% of memory
-XZ_MEM=$(( HOST_MEM * 7 / 10 ))
-
-# XZ memory cannot be larger than 2GB on 32 bit systems
-case "${HOST_ARCH}" in
-	i*86|armv*)
-		if [ ${XZ_MEM} -gt 2048 ]; then
-			XZ_MEM=2048
-		fi
-		;;
-esac
-
-XZ_OPT="-T0 -8 --memory=${XZ_MEM}MiB"
-
 if [ -n "${BUILD_ARCH}" ]; then
 	configure_build "${BUILD_ARCH}"
 else


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2018-05-23 11:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180523110619.5FCD41081DF2@git01.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox