21
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

並列圧縮(gz,bz2,xz)

Last updated at Posted at 2014-02-24

pigz,pbzip2,pixzを使用して並列圧縮

.tar.gz

tar zvf directory.tar.gz --use-compress-prog=pigz directory

.tar.bz2

tar jvf directory.tar.bz2 --use-compress-prog=pbzip2 directory

.tar.xz

tar Jvf directory.tar.xz --use-compress-prog=pixz directory

memo: xzの並列圧縮コマンドは、pixzとpxzを比べた場合、pixzの方が良いらしい
https://github.com/vasi/pixz を参照

Linuxカーネルソースコードを圧縮した時間とファイルサイズの結果

テストに用いたコマンド 時間(CPU) 圧縮したファイルのサイズ
tar zcf linux-3.14-rc4.tar.gz linux-3.14-rc4/ 18.101 114M(119322475byte)
tar zcf linux-3.14-rc4.tar.gz --use-compress-prog=pigz linux-3.14-rc4/ 3.684 114M(119383009byte)
tar jcf linux-3.14-rc4.tar.bz2 linux-3.14-rc4/ 48.804 89M(93301912byte)
tar jcf linux-3.14-rc4.tar.bz2 --use-compress-prog=pbzip2 linux-3.14-rc4/ 10.822 89M(93617487byte)
tar Jcf linux-3.14-rc4.tar.xz linux-3.14-rc4/ 3:57.41 77M(80815884byte)
tar Jcf linux-3.14-rc4.tar.xz --use-compress-prog=pixz linux-3.14-rc4/ 53.438 77M(82428744byte)

テスト環境

  • CPU: Intel Xeon E5-1620 v2(Ivy Bridge-EP 4コア)
  • MEM: 32GB
  • メモリ上(/tmp以下)にLinuxカーネルソースコードを置いた。
21
17
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?