Skip to content

beesh.sh: use pbzip2 for saving build environment when available #23

Merged

Conversation

thomas
Copy link
Contributor

@thomas thomas commented Aug 15, 2018

This will keep the mood down when building kernels :)

src/beesh.sh.in Outdated
@@ -683,7 +683,7 @@ function bee_archivebuild() {
B=${BEEWORKDIR}/build
fi

tar -cjf ${archive} \
tar -cf ${archive} \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use -I to set compress program? so you do not need to store&read file which should give even more speedup..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Marius :)
Good point, IIRC a similar approach using bgzip (a parallel gzip from samtools) failed, so I went for the safe way right from the start. And to be honest, I haven't even checked if pbzip2 can be feed from stdin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-I pbzip2 does work, so I'd vote for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 6b1ee7e holds the new variant using -I.

@pmenzel
Copy link
Contributor

pmenzel commented Aug 20, 2018

For the record, some tests with pbzip2 and lz4.

$ more /etc/motd

  #     #                  ###         #     #  elcattivo
  ##   ##    ##    #####    #   #    #  #   #   system Supermicro 2023US-TR4
  # # # #   #  #   #    #   #   #    #   # #    cpu    128x AMD EPYC 7601
  #  #  #  #    #  #    #   #   #    #    # 64  ram    1031.7 GB
  #     #  ######  #####    #   #    #   # #    arch   x86_64 / 64-bit
  #     #  #    #  #   #    #   #    #  #   #   glibc  2.27
  #     #  #    #  #    #  ###   ####  #     #  kernel 4.14.30.mx64.211 #1

    / to bee or not to bee /   tags: amd mx64 server 
  ** Public compute server **
  ** if the system is full, please use holidayincambodia **

$ cd /dev/shm
$ ls -lh linux-4.14.56-215.x86_64.beebuild.tar.bz2
-rw-r--r-- 1 pmenzel pmenzel 1.7G Jul 20 11:28 linux-4.14.56-215.x86_64.beebuild.tar.bz2
$ time tar -I pbzip2 -xf linux-4.14.56-215.x86_64.beebuild.tar.bz2 # compressed with normal bzip2

real	3m41.398s
user	3m44.894s
sys	0m7.627s
$ time tar -I pbzip2 -cf linux-4.14.56-215.x86_64.beebuild.tar.bz2  linux-4.14.56-215.x86_64

real	0m21.735s
user	22m8.970s
sys	1m50.933s
$ time tar -I lz4 -cf linux-4.14.56-215.x86_64.beebuild.tar.lz4  linux-4.14.56-215.x86_64

real	0m19.761s
user	0m15.200s
sys	0m7.063s
$ ls -lh *lz4 *bz2
-rw-rw---- 1 pmenzel pmenzel 1.7G Aug 20 11:57 linux-4.14.56-215.x86_64.beebuild.tar.bz2
-rw-rw---- 1 pmenzel pmenzel 2.6G Aug 20 11:58 linux-4.14.56-215.x86_64.beebuild.tar.lz4
$ ls -lh /src/mariux/beeroot/build-archives/linux-4.14.56-215.x86_64.beebuild.tar.bz2
-rw-r--r-- 1 root root 1.7G Jul 20 11:28 /src/mariux/beeroot/build-archives/linux-4.14.56-215.x86_64.beebuild.tar.bz2
$ rm -rf linux-4.14.56-215.x86_64
$ time tar -I pbzip2 -xf linux-4.14.56-215.x86_64.beebuild.tar.bz2  

real	0m11.600s
user	10m33.255s
sys	0m51.540s
$ rm -rf linux-4.14.56-215.x86_64
$ time tar -I lz4 -xf linux-4.14.56-215.x86_64.beebuild.tar.lz4

real	0m9.340s
user	0m5.363s
sys	0m6.890s
$ rm -rf linux-4.14.56-215.x86_64
$ time tar -cjf linux-4.14.56-215.x86_64.beebuild.tar.bz2 linux-4.14.56-215.x86_64

real	9m0.065s
user	9m1.129s
sys	0m14.693s

@donald
Copy link
Contributor

donald commented Aug 29, 2018

Fine with me. I suggest, you git rebase -i master, remove the first two commits and git push -f the branch.

@thomas thomas force-pushed the use-pbzip2-for-saving-build-environment-when-available branch from 6b1ee7e to c24f7de Compare August 30, 2018 10:24
@thomas
Copy link
Contributor Author

thomas commented Aug 30, 2018

Cleaned up. What are the next steps, a new bee version?

Well, the present bee file says BEE_VERSION bee-1.2.16-01, but bee --version tells me 1.2.14 -- is this an issue?

@donald donald merged commit 67e07eb into master Aug 30, 2018
@donald
Copy link
Contributor

donald commented Aug 30, 2018

Yes, make a release. Stick to existing name scheme for release name and tag name. Next release will include #24 as well (for the release information). The make an update mariux64/bee-files.

@donald donald deleted the use-pbzip2-for-saving-build-environment-when-available branch March 7, 2019 16:21
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants