多cpu核心gzip大文件 [英] multi cpu core gzip a big file

查看:113
本文介绍了多cpu核心gzip大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过OpenVZ使用服务器中的所有cpu内核(具有4个内核)linux Debian来 gziping 更快地一个大文件



我正在尝试使用这些命令,但无法将各个部分放在一起



获取内核数

CORES = $(grep -c'^ processor'/ proc / cpuinfo)



在更大的

中分割大文件split -b100 file.big



此用于多核

的gzip命令find / source -type f -print0 | xargs -0 -n 1 -P $ CORES gzip --best



我不知道这是否是最好的

解决方案

使用 pigz ,一个并行的gzip实现。



parallel gzip pigz 会产生单个gzip流。 p>

How can I use all cpu cores in my server(has 4 cores) linux Debian over OpenVZ to gzipping faster one big file?

I am trying to use these commands but I can not put the pieces together

get number of cores CORES=$(grep -c '^processor' /proc/cpuinfo)

this for split big file in more split -b100 file.big

this for use gzip command with multiple core find /source -type f -print0 | xargs -0 -n 1 -P $CORES gzip --best

I don't know if this is the best way for optimize gzip process of big files..

解决方案

Use pigz, a parallel gzip implementation.

Unlike parallel with gzip, pigz produces a single gzip stream.

这篇关于多cpu核心gzip大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆