pigz 並行壓縮
並行壓縮
#安裝
cd /tmp
wget
tar -zxvf pigz-2.3.3.tar.gz
或者 tar -xvf pigz-2.3.3.tar.gz
make
#壓縮
]$tar cvf - dmp_result/ |/tmp/pigz-2.3.3/pigz -p 10 > /var/lib/mysql/dmp.tar.gz
-p 是指定使用幾core的cpu
此處指定-p 10 可以透過top命令看到 pigz程式可以cpu 1000% 的樣子(也就是使用了10 core)
$ /tmp/pigz-2.3.3/pigz --help
Usage: pigz [options] [files ...]will compress files in place, adding the suffix '.gz'. If no files are
specified, stdin will be compressed to stdout. pigz does what gzip does,
but spreads the work over multiple processors and cores when compressing.
Options:
-0 to -9, -11 Compression level (11 is much slower, a few % better)
--fast, --best Compression levels 1 and 9 respectively
-b, --blocksize mmm Set compression block size to mmmK (default 128K)
-c, --stdout Write all processed output to stdout (won't delete)
-d, --decompress Decompress the compressed input
-f, --force Force overwrite, compress .gz, links, and to terminal
-F --first Do iterations first, before block split for -11
-h, --help Display a help screen and quit
-i, --independent Compress blocks independently for damage recovery
-I, --iterations n Number of iterations for -11 optimization
-k, --keep Do not delete original file after processing
-K, --zip Compress to PKWare zip (.zip) single entry format
-l, --list List the contents of the compressed input
-L, --license Display the pigz license and quit
-M, --maxsplits n Maximum number of split blocks for -11
-n, --no-name Do not store or restore file name in/from header
-N, --name Store/restore file name and mod time in/from header
-O --oneblock Do not split into smaller blocks for -11
-p, --processes n Allow up to n compression threads (default is the
number of online processors, or 8 if unknown)
-q, --quiet Print no messages, even on error
-r, --recursive Process the contents of all subdirectories
-R, --rsyncable Input-determined block locations for rsync
-S, --suffix .sss Use suffix .sss instead of .gz (for compression)
-t, --test Test the integrity of the compressed input
-T, --no-time Do not store or restore mod time in/from header
-v, --verbose Provide more verbose output
-V --version Show the version of pigz
-z, --zlib Compress to zlib (.zz) instead of gzip format
-- All arguments after "--" are treated as files
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27000195/viewspace-2123614/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- pigz更快的壓縮和解壓工具
- 使用Rust的ripunzip和rayon並行解壓縮檔案Rust並行
- Nginx網路壓縮 CSS壓縮 圖片壓縮 JSON壓縮NginxCSSJSON
- OceanBase學習之路14|體驗並行匯入 & 資料壓縮並行
- git合併多個commit & 壓縮合並GitMIT
- python 壓縮檔案並進行郵件傳送(附件格式為zip)Python
- 檔案壓縮和解壓縮
- 觸屏 H5 如何實現壓縮並上傳多張圖片,同時還可以進行圖片壓縮H5
- linux 壓縮目錄並排除某個目錄Linux
- 並查集系列之「路徑壓縮( path compression ) 」並查集路徑壓縮
- vue-前端匯出 pdf 並且壓縮 zipVue前端
- Python實現壓縮和解壓縮Python
- linux下壓縮解壓縮命令Linux
- linux壓縮和解壓縮命令整理Linux
- JS壓縮方法及批量壓縮JS
- Linux中Bin檔案壓縮包解壓執行Linux
- Linux tar分卷壓縮與解壓縮Linux
- Laravel 中建立 Zip 壓縮檔案並提供下載Laravel
- 批處理 壓縮zip 並過濾部分檔案
- 怎麼轉換圖片格式並壓縮圖片
- Linux壓縮解壓Linux
- CentOS 壓縮解壓CentOS
- linux 高效壓縮工具之xz的壓縮解壓使用Linux
- Linux中檔案的壓縮和解壓縮Linux
- CSS單行格式化與壓縮CSS
- PE檔案格式詳細解析(四)-- 執行時壓縮及UPX壓縮除錯除錯
- 使用Java API進行tar.gz檔案及資料夾壓縮解壓縮JavaAPI
- 打包/壓縮
- Gzipped 壓縮
- linuxtar解壓和壓縮Linux
- linux分卷壓縮解壓Linux
- 壓縮包格式有哪些?壓縮包格式大全
- ppt怎麼壓縮,ppt壓縮的技巧分享
- 壓縮Word,一鍵實現Word文件壓縮
- 使用 BZ2Compressor 進行增量壓縮
- SQL Server 2008中的行壓縮(上)JUSQLServer
- 分卷壓縮怎麼解壓 快速解壓電腦分卷壓縮檔案方法
- Linux下的tar壓縮解壓縮命令詳解Linux
- Linux 常用的壓縮與解壓縮命令詳解Linux