{"id":26367,"date":"2012-02-07T14:35:49","date_gmt":"2012-02-07T06:35:49","guid":{"rendered":"http:\/\/www.yankay.com\/?p=26367"},"modified":"2012-02-07T14:35:49","modified_gmt":"2012-02-07T06:35:49","slug":"linux%e5%a4%a7%e6%96%87%e4%bb%b6%e4%bc%a0%e8%be%93","status":"publish","type":"post","link":"http:\/\/yankay.com\/linux%e5%a4%a7%e6%96%87%e4%bb%b6%e4%bc%a0%e8%be%93\/","title":{"rendered":"Linux\u5927\u6587\u4ef6\u4f20\u8f93"},"content":{"rendered":"
gzip -c \/home\/yankay\/data | ssh yankay01 \"gunzip -c - > \/home\/yankay\/data\"<\/pre>\n\u8fd9\u6761\u547d\u4ee4\u662f\u5c06\/home\/yankay\/data\u7ecf\u8fc7GZIP\u538b\u7f29\uff0c\u901a\u8fc7ssh\u4f20\u8f93\u5230yankay01\u7684\u673a\u5668\u4e0a\u3002<\/p>\n<\/div>\n
data\u6587\u4ef6\u7684\u5927\u5c0f\u662f1.1GB,\u7ecf\u8fc7Zip\u538b\u7f29\u540e\u662f183MB\uff0c\u6267\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u9700\u898145.6s\u3002\u5e73\u5747\u541e\u5410\u91cf\u4e3a24.7MB\/s<\/div>\n\u6211\u4eec\u4f1a\u53d1\u73b0Scp\u4e5f\u6709\u538b\u7f29\u529f\u80fd\uff0c\u6240\u4ee5\u4e0a\u9762\u7684\u8bed\u53e5\u53ef\u4ee5\u5199\u6210<\/div>\n\nscp -C -c blowfish \/home\/yankay\/data yankay01:\/home\/yankay\/data<\/pre>\n\u8fd9\u6837\u8fd0\u884c\u6548\u679c\u662f\u76f8\u540c\u7684\uff0c\u4e0d\u901a\u4e4b\u5904\u5728\u4e8e\u6211\u4f7f\u7528\u4e86blowfish\u7b97\u6cd5\u4f5c\u4e3aScp\u7684\u5bc6\u5319\u7b97\u6cd5\uff0c\u4f7f\u7528\u8fd9\u4e2a\u7b97\u6cd5\u53ef\u4ee5\u6bd4\u9ed8\u8ba4\u7684\u60c5\u51b5\u5feb\u5f88\u591a\u3002\u5355\u5355\u5bf9\u4e0escp,\u4f7f\u7528\u4e86blowfish \u541e\u5410\u91cf\u662f62MB\/s,\u4e0d\u4f7f\u7528\u53ea\u670946MB\/s\u3002<\/p>\n<\/div>\n
\u53ef\u662f\u6211\u6267\u884c\u4e0a\u9762\u4e00\u6761\u547d\u4ee4\u7684\u65f6\u5019\uff0c\u53d1\u73b0\u8fd8\u662f\u9700\u898145s\u3002\u5e73\u5747\u541e\u5410\u91cf\u8fd8\u4e3a24MB\/s\u3002\u6ca1\u6709\u4e1d\u6beb\u7684\u63d0\u5347\uff0c\u53ef\u89c1\u74f6\u9888\u4e0d\u5728\u7f51\u7edc\u4e0a\u3002<\/div>\n\u90a3\u74f6\u9888\u5728\u54ea\u91cc\u5462\uff1f<\/div>\n\u6027\u80fd\u5206\u6790<\/strong><\/h3>\n
\u6211\u4eec\u5148\u5b9a\u4e49\u51e0\u4e2a\u53d8\u91cf<\/p>\n
\n
- \u538b\u7f29\u5de5\u5177\u7684\u538b\u7f29\u6bd4\u662f CompressRadio<\/li>\n
- \u538b\u7f29\u5de5\u5177\u7684\u538b\u7f29\u541e\u5410\u662fCompressSpeed MB\/s<\/li>\n
- \u7f51\u7edc\u4f20\u8f93\u7684\u541e\u5410\u662f NetSpeed MB\/s<\/li>\n<\/ul>\n
\u7531\u4e8e\u4f7f\u7528\u4e86\u7ba1\u9053\uff0c\u7ba1\u9053\u7684\u6027\u80fd\u53d6\u51b3\u4e8e\u7ba1\u9053\u4e2d\u6700\u6162\u7684\u90e8\u5206\u7684\u6027\u80fd\uff0c\u6240\u4ee5\u6574\u4f53\u7684\u6027\u80fd\u662f\uff1a<\/p>\n
$$speed=min(NetSpeed\/CompressRadio,CompressSpeed)$$<\/p>\n
\u5f53\u538b\u7f29\u541e\u5410\u8f83\u7f51\u7edc\u4f20\u8f93\u6162\u7684\u65f6\u5019\uff0c\u538b\u7f29\u662f\u74f6\u9888\uff1b\u4f46\u7f51\u7edc\u8f83\u6162\u7684\u65f6\u5019\uff0c\u7f51\u7edc\u4f20\u8f93\/\u541e\u5410 \u662f\u74f6\u9888\u3002<\/p>\n
\u6839\u636e\u73b0\u6709\u7684\u6d4b\u8bd5\u6570\u636e(\u7eaf\u6587\u672c)\uff0c\u53ef\u4ee5\u5f97\u5230\u8868\u683c\uff1a<\/p>\n
\n
\n \n\n \n \n \n <\/colgroup>\n \n <\/td>\n \u538b\u7f29\u6bd4<\/td>\n \u541e\u5410\u91cf<\/td>\n \u5343\u5146\u7f51\u5361(100MB\/s)\u541e\u5410\u91cf<\/td>\n \u5343\u5146\u7f51\u5361\u541e\u5410\u91cf,\u57fa\u4e8essh(62MB\/s)<\/td>\n \u767e\u5146\u7f51\u5361(10MB\/s)\u541e\u5410\u91cf<\/td>\n<\/tr>\n \n ZLIB<\/td>\n 35.80%<\/td>\n 9.6<\/td>\n 9.6<\/td>\n 9.6<\/td>\n 9.6<\/td>\n<\/tr>\n \n LZO<\/td>\n 54.40%<\/td>\n 101.7<\/td>\n 101.7<\/td>\n 101.7<\/td>\n 18.38235294<\/td>\n<\/tr>\n \n LIBLZF<\/td>\n 54.60%<\/td>\n 134.3<\/td>\n 134.3<\/td>\n 113.5531136<\/td>\n 18.31501832<\/td>\n<\/tr>\n \n QUICKLZ<\/td>\n 54.90%<\/td>\n 183.4<\/td>\n 182.1493625<\/td>\n 112.9326047<\/td>\n 18.21493625<\/td>\n<\/tr>\n \n FASTLZ<\/td>\n 56.20%<\/td>\n 134.4<\/td>\n 134.4<\/td>\n 110.3202847<\/td>\n 17.79359431<\/td>\n<\/tr>\n \n SNAPPY<\/td>\n 59.80%<\/td>\n 189<\/td>\n 167.2240803<\/td>\n 103.6789298<\/td>\n 16.72240803<\/td>\n<\/tr>\n \n NONE<\/td>\n 100%<\/td>\n 300<\/td>\n 100<\/td>\n 62<\/td>\n 10<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u53ef\u4ee5\u770b\u51fa\u6765\u3002\u5728\u5343\u5146\u7f51\u5361\u4e0b\uff0c\u4f7f\u7528QuickLZ\u4f5c\u4e3a\u538b\u7f29\u7b97\u6cd5\uff0c\u53ef\u4ee5\u8fbe\u5230\u6700\u9ad8\u7684\u6027\u80fd\u3002\u5982\u679c\u4f7f\u7528SSH\u4f5c\u4e3a\u6570\u636e\u4f20\u8f93\u901a\u9053\uff0c\u5219\u8fdc\u8fdc\u6ca1\u6709\u8fbe\u5230\u7f51\u5361\u53ef\u4ee5\u8fbe\u5230\u7684\u6700\u4f73\u6027\u80fd\u3002\u5728\u767e\u5146\u7f51\u5361\u7684\u60c5\u51b5\u4e0b\uff0c\u5404\u4e2a\u7b97\u6cd5\u76f8\u8fd1\u3002\u5bf9\u6bd4\u4e0b\u6765QuickLZ\u662f\u6709\u4f18\u52bf\u7684\u3002<\/p>\n
\u5bf9\u4e8e\u4e0d\u540c\u7684\u6570\u636e\u548c\u4e0d\u540c\u7684\u673a\u5668\uff0c\u53ef\u4ee5\u5f97\u51fa\u4e0d\u540c\u7684\u6700\u4f73\u538b\u7f29\u7b97\u6cd5\u3002\u4f46\u6709\u4e00\u70b9\u662f\u80af\u5b9a\u7684\uff0c\u5c3d\u91cf\u628a\u74f6\u9888\u538b\u5728\u7f51\u7edc\u4e0a\u3002\u5bf9\u4e8e\u8f83\u6162\u7684\u7f51\u7edc\u73af\u5883\uff0c\u9ad8\u538b\u7f29\u6bd4\u7684\u7b97\u6cd5\u4f1a\u6bd4\u8f83\u6709\u4f18\u52bf\uff1b\u76f8\u53cd\u5bf9\u4e8e\u8f83\u5feb\u7684\u7f51\u7edc\u73af\u5883\uff0c\u4f4e\u538b\u7f29\u6bd4\u7684\u7b97\u6cd5\u4f1a\u66f4\u597d\u3002<\/p>\n
\u7ed3\u8bba<\/strong><\/h3>\n
\u6839\u636e\u4e0a\u9762\u7684\u5206\u6790\u7ed3\u679c\uff0c\u6211\u4eec\u4e0d\u80fd\u662f\u7528SSH\u4f5c\u4e3a\u7f51\u7edc\u4f20\u8f93\u901a\u9053\uff0c\u53ef\u4ee5\u4f7f\u7528NC\u8fd9\u4e2a\u57fa\u672c\u7f51\u7edc\u5de5\u5177\uff0c\u63d0\u9ad8\u6027\u80fd\u3002\u540c\u65f6\u4f7f\u7528qpress\u4f5c\u4e3a\u538b\u7f29\u7b97\u6cd5\u3002<\/p>\n
scp \/usr\/bin\/qpress yankay01:\/usr\/bin\/qpress\nssh yankay01 \"nc -l 12345 | qpress -dio > \/home\/yankay\/data\" &\nqpress -o \/home\/yankay\/data |nc yankay01 12345<\/pre>\n\u7b2c\u4e00\u884c\u662f\u5c06gpress\u5b89\u88c5\u5230\u8fdc\u7a0b\u673a\u5668\u4e0a\uff0c\u7b2c\u4e8c\u884c\u5728\u8fdc\u7a0b\u673a\u5668\u4e0a\u4f7f\u7528nc\u76d1\u542c\u4e00\u4e2a\u7aef\u53e3\uff0c\u7b2c\u4e09\u884c\u538b\u7f29\u5e76\u4f20\u9001\u6570\u636e\u3002<\/p>\n
\u6267\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u9700\u89812.8s\u3002\u5e73\u5747\u541e\u5410\u91cf\u4e3a402MB\/s,\u6bd4\u4f7f\u7528Gzip+Scp\u5feb\u4e8616\u500d\uff01\uff01<\/p>\n
\u6839\u636e\u4e0a\u6587\u7684\u516c\u5f0f\uff0c\u548c\u81ea\u5df1\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u7ed8\u51fa\u4e0a\u9762\u7684\u8868\u683c\uff0c\u5c31\u53ef\u4ee5\u9009\u62e9\u51fa\u6700\u9002\u5408\u7684\u538b\u7f29\u7b97\u6cd5\u548c\u4f20\u8f93\u65b9\u5f0f\u3002\u8fbe\u5230\u6ee1\u610f\u7684\u6548\u679c\u3002\u5982\u679c\u662f\u4e00\u4e2a\u957f\u671f\u8fd0\u884c\u7684\u811a\u672c\u7684\u8bdd\uff0c\u8fd9\u4e48\u505a\u662f\u503c\u5f97\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u5728\u673a\u5668\u4e4b\u95f4\u4f20\u8f93\u6587\u4ef6\u3002\u6bd4\u5982\u5907\u4efd\uff0c\u590d\u5236\u6570\u636e\u7b49\u7b49\u3002\u8fd9\u4e2a\u662f\u5f88\u5e38\u89c1\uff0c\u4e5f\u662f\u5f88\u7b80\u5355\u7684\u3002\u7528scp\u6216\u8005rsync\u5c31\u80fd\u5f88\u597d\u7684\u5b8c\u6210\u4efb\u52a1\u3002\u4f46\u662f\u5982\u679c\u6587\u4ef6\u5f88\u5927\uff0c\u9700\u8981\u5360\u7528\u4e00\u4e9b\u4f20\u8f93\u65f6\u95f4\u7684\u65f6\u5019\uff0c\u600e\u6837\u53c8\u5feb\u53c8\u597d\u5730\u5b8c\u6210\u4efb\u52a1\u5c31\u5f88\u91cd\u8981\u4e86\u3002\u5728\u6211\u7684\u6d4b\u8bd5\u7528\u4f8b\u4e2d\uff0c\u4e00\u4e2a\u6700\u4f73\u7684\u65b9\u6848\u6bd4\u6700\u5dee\u7684\u65b9\u6848\uff0c\u6027\u80fd\u63d0\u9ad8\u4e8610\u500d\u3002<\/div>\n