Home > Database > Mysql Tutorial > body text

让远程传输大文件变得更快

WBOY
Release: 2016-06-07 17:37:51
Original
1781 people have browsed it

我是在两台虚拟机做的测试。如果用传统SCP远程拷贝,速度是比较慢的,如图:现在采用lz4压缩传输。LZ4是一个非常快的无损压缩算法,压缩速度在单核300MB/S,可扩

我是在两台虚拟机做的测试。


如果用传统SCP远程拷贝,,速度是比较慢的,如图:

225134616.jpg


现在采用lz4压缩传输。LZ4是一个非常快的无损压缩算法,压缩速度在单核300MB/S,可扩展支持多核CPU。它还具有一个非常快速的解码器,速度单核可达到和超越1GB/S。通常能够达到多核系统上的RAM速度限制。

225329569.jpg

项目主页:


安装(在本地和远程均安装lz4压缩工具)

# wget https://dl.dropboxusercontent.com/u/59565338/LZ4/lz4-r108.tar.gz

# cd lz4-r108/

# make;make install


远程传输

time tar -c aa.img |pv|lz4 -B4|ssh 192.168.17.129 "lz4 -d |tar -xC /root/"

225705201.jpg

传输2G的文件,速度是119M/S,花费了17秒传输完毕。


本文出自 “贺春旸的技术专栏” 博客,请务必保留此出处

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!