linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
ÔÎÄ£ºhttp://www.orczhou.com/index.php/2013/11/make-scp-faster-with-cipher-and-compression/
µ±ÐèÒªÔÚ»úÆ÷Ö®¼ä´«Êä400GBÎļþµÄʱºò£¬Äã¾Í»á·Ç³£ÔÚÒâ´«ÊäµÄËÙ¶ÈÁË¡£Ä¬ÈÏÇé¿öÏÂ(Ô¼125MB´ø¿í£¬ÍøÂçÑÓ³Ù17ms£¬Intel E5-2430£¬±¾ÎĺóÐøÌÖÂÛĬÈÏÊÇÖ¸¸Ã»·¾³)£¬scpµÄËÙ¶ÈԼΪ40MB£¬´«Êä400GBÔòÐèÒª170·ÖÖÓ£¬Ô¼3Сʱ£¬Èç¹û¿ÉÒÔ¼ÓËÙ£¬Ôò¿ÉÒÔ´ó´ó½ÚÔ¼¹¤³ÌʦµÄʱ¼ä£¬Èù¥³ÇʦÃÇÓиü¶àʱ¼äÈ¥¿´¸öµçÓ°£¬ÅãÅã¼ÒÈË¡£
Ŀ¼ [hide]
1. ½áÂÛ
ÉùÃ÷£ºÕâÀï¸ø³öµÄ²âÊÔÊý¾Ý²»¾ßÓÐÒ»°ãÐÔ£¬½ö¹©²Î¿¼¡£²âÊÔÓëÊý¾Ý±¾ÉíÌØÐÔÓкܴó¹Øϵ£¬±¾ÎÄʹÓÃInnoDBµÄredo log×÷Ϊ²âÊÔÊý¾Ý¡£
* ¸Ä±ässh¼ÓÃÜËã·¨£¬¿ÉÒÔÈÃËٶȸü¿ì£»Í¨³££¬Ô½ÈõµÄ¼ÓÃÜËã·¨£¬ËÙ¶ÈÔ½¿ì
* ͨ³£Ñ¹Ëõ»á½µµÍscpËٶȣ¬µ«ÕâÓëÊý¾ÝÀàÐÍÓкܴó¹Øϵ£¬¶ÔѹËõÂʷdz£¸ßµÄÊý¾ÝÆôÓÃѹËõ£¬¿ÉÒÔ¼ÓËÙ
* ѹËõ¼¶±ð¶Ô´«ÊäЧÂÊÓ°ÏìºÜС
* ÓÃÓÚÍêÕûÐÔУÑéµÄ²»Í¬MAC( message authentication code)Ëã·¨£¬¶ÔÐÔÄÜÔ¼ÓÐ10%-20%µÄÓ°Ïì¡£
ËùÒÔ£¬¼òµ¥³¢ÊÔÈçÏ£¬ÈÃÄãµÄSCPËÙ¶Èdoubleһϣº
scp -r -c aes192-cbc ...
scp -r -c arcfour128 -o "MACs umac-64@openssh.com" ...
×¢£ºÆôÓÃѹËõʹÓòÎÊý£º -o "Compression yes"
2. ²âÊÔÊý¾Ý£º¼ÓÃÜËã·¨ºÍѹËõµÄÓ°Ïì
ÕâÀï¶Ô±ÈÁË12ÖÖsshÖÐʵÏֵļÓÃÜËã·¨ºÍÊÇ·ñʹÓÃѹËõµÄ´«ÊäЧÂÊ£¬²âÊÔÎļþʹÓõÄÊÇInnoDBµÄ1GB*4µÄÈÕÖ¾Îļþ(×¢Ò⣺²»Í¬ÀàÐ͵ÄÎļþ²âÊÔ½á¹û»áºÜ²»Í¬)£¬ÕâÀï×Ý×ø±êµ¥Î»ÎªMB/s£¬Êý¾Ý·ÖΪѹËõ´«ÊäºÍ²»Ñ¹Ëõ´«ÊäÁ½×飺
ÔʼÊý¾Ý£ºscp_speed.txt
¿ÉÒÔ¿´µ½£¬²»Í¬¼ÓÃÜËã·¨´«ÊäËÙ¶ÈÏà²îºÜ´ó£»Ê¹ÓÃÁËѹËõÖ®ºó£¬ËÙ¶ÈϽµºÜ¶à£¬Ò²¿´µ½²»Í¬¼ÓÃÜËã·¨¼ÓÃܺóÇø±ð²¢²»´ó¡£
3. ¹ØÓÚÊÇ·ñÆôÓÃѹËõ
* ѹËõÖ»ÓÐÔÚÍøÂç´«ÊäËٶȷdz£Âý£¬ÒÔÖÂÓÚѹËõºó½ÚÊ¡µÄ´«Êäʱ¼ä´óÓÚѹËõ±¾ÉíµÄʱ¼ä£¬Õâʱ²ÅÓÐЧ¹û£¬ËùÒÔÊÇ·ñÆôÓÃѹËõ£¬ÐèҪʵ¼Ê²âÊÔ
* ѹËõ±ÈºÜµÍµÄÊý¾Ý£¬²»ÒªÔÙÆôÓÃѹËõ(ÀýÈçÒѾѹËõ¹ýµÄÊý¾Ý¡¢ÊÓƵµÈ)
* ͨ³£½¨Ò飬´«ÊäÇ°ÏÈѹËõ£¬¶ø²»ÊÇʹÓÃsshµÄѹËõ£»½¨ÒéʹÓÃpigz/lbizp2µÈ²¢ÐÐѹËõ¹¤¾ß
* Êý¾ÝÖдóÁ¿Öظ´¡¢¿Õ¶´£¬ÕâÀàÊʺÏѹËõµÄÊý¾Ý£¬¿ÉÒÔ³¢ÊÔѹËõÑ¡ÏÀýÈçÈçÏÂÊÇÒ»×飬´óÁ¿"¿Õ¶´"Êý¾ÝµÄ²âÊÔ£º
¿´µ½£¬Ñ¹Ëõ´ó´óÌá¸ßÁË´«ÊäЧÂÊ
4. "ѹËõ¼¶±ð"¶Ô´«ÊäËÙ¶ÈÓ°Ïì²»´ó
×îºóÒ»×é¶Ô±ÈÊÇ£¬½«Ñ¹Ëõ¼¶±ð´Ó1¸Äµ½9£¬¶Ô±È´«ÊäËٶȣ¬×Ý×ø±êµ¥Î»MB/s£¬¶Ô12ÖÖ¼ÓÃÜËã·¨·Ö±ðʹÓÃÁ˲âÊÔ9¸öѹËõ¼¶±ð£¬Êý¾ÝÈçÏ£º
´óͼÁ´½Ó ÔʼÊý¾Ý:scp-compression-level.txt
¿ÉÒÔ¿´µ½£¬Ñ¹Ëõ¼¶±ð¶Ô´«ÊäÓ°Ïì½ÏС¡£sshʹÓõÄĬÈÏѹËõ¼¶±ðÊÇ6¡£
5. ²âÊÔÊý¾Ý£ºÍêÕûÐÔУÑéËã·¨MACsÑ¡Ôñ
ͨ¹ýÑ¡ÏîMacs¿ÉÒÔÉèÖöÔÓ¦µÄ¹þÏ£Ëã·¨£¬man ssh_config¿ÉÒÔ¿´µ½Ö§³ÖÄÄЩ¹þÏ£Ëã·¨¡£ÕâÀï¶ÔÁ˱ÈÁË12ÖмÓÃÜËã·¨ÏÂʹÓò»ÓõÄÍêÕûÐÔУÑéËã·¨µÄÐÔÄÜÇé¿ö£º
¿´µ½£¬¾ø´óÊýÇé¿öÏÂ"umac-64@openssh.com"(¹ØÓڴ˹þÏ£)ÐÔÄܶ¼¸üºÃ£¬ËùÒÔ½¨Òé³¢ÊÔʹÓô˹þÏ£Ëã·¨×öÑéÖ¤£¬¿´¿´ÄãµÄ³¡¾°ÏÂËÙ¶ÈÊÇ·ñÓëÌáÉý¡£Ò²¿ÉÒÔ¿´µ½£¬Ä¬ÈϵÄhmac-md5¹þÏ£ÔÚĬÈϵļÓÃÜaes128-ctrϱíÏֱȽϺã»
6. ²Î¿¼ÔĶÁ
* differenct between -ctr/cbc£º½éÉÜÁËctrºÍcbcµÄÇø±ð
* The use of UMAC in the SSH Transport Layer Protocol½éÉÜumacÏà¹ØµÄ¹þÏ£Ëã·¨
* ÔÚ<<The Secure Shell: The Definitive Guide>> ISBN: 0-596-00011-1ÖиÅÊöÁ˸÷ÖÖ¼ÓÃÜËã·¨µÄ°²È«ÐÔºÍЧÂÊ ²Î¿¼
* man scp/ssh/ssh_config
* OpenSSH ciphers performance benchmark
* 100% SCP/SSH Performance Gain by Selecting the Right Algorithm
* AES VS 3DES@MSDN Blogs - ACE Team
ÍƼöÐÅÏ¢
- linuxÃüÁîѧϰ±Ê¼Ç£¨11£©£ºnlÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨5£©£ºrmÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨4£©£ºmkdirÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨1£©£ºlsÃüÁî
- ½«CentosµÄyumÔ´¸ü»»Îª¹úÄڵİ¢ÀïÔÆÔ´
- ʹÓÃNginxÌí¼Óheader·ÀÖ¹ÍøÒ³±»frame
- linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
- linuxϵͳÉ϶ÔnginxÈÕÖ¾·Ö¸î´¦Àí
- lnmp/nginxϵͳÕæÕýÓÐЧµÄͼƬ·ÀµÁÁ´ÍêÕûÉèÖÃÏê½â
- Í»ÆÆÊ®Íò²¢·¢µÄNginxµÄÅäÖü°ÓÅ»¯
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ²éÕÒ²¢É¾³ý.svnĿ¼Îļþ
- redis ÆßÖÖÊý¾ÝÀàÐ͵ÄʹÓó¡¾°
- linux ÏÂÎļþ¸´ÖƵ½windowsÏÂÂÒÂëµÄ½â¾ö°ì·¨
- nginx³öÏÖ502 upstream sent too big he....
- linuxÏÂsudoÅäÖÃÏê½â
- linuxÃüÁîѧϰ±Ê¼Ç£¨15£©£ºtailÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨14£©£ºheadÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨13£©£ºlessÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨12£©£ºmoreÃüÁî
- ¼ÓÃÜËã·¨±È½Ï3DES AES RSA ECC MD5 SHA1µÈ
ÆÀÂÛ