ãããã£ã¯ã©ã¦ãã§rsyncãå©ç¨ããããã¯ã¢ãããè¡ã£ãå ´å Disk200ã¨Disk40ã©ã¡ãã使ãã¹ããï¼
ã¯ã©ã¦ãä¸ã§ãµã¼ãã¹ãæä¾ããå ´åãã¼ã¿ã®å®å ¨æ§ã«ã¤ãã¦ã¯ããã¼ãé¢ã®HAã¯ãµã¼ãã¹ãæä¾ãã¦ãããã*1ãã¢ããªã±ã¼ã·ã§ã³ã®é害ã人çºçãã¹ã«ãããã¼ã¿æå·ã«å¯¾å¿ããããã®ããã¯ã¢ãããæä½éå¿ è¦ã«ãªãã¾ãã
co-meetingã¯ããã¼ã¿ãã¼ã¹ä»¥å¤ã®ãã¼ã¿ã®ããã¯ã¢ããã¯ãã·ã³ãã«ã«è¿½å ãã£ã¹ã¯ã«rsyncã§å·®åããã¯ã¢ãããæ°æ¥éä¿æãã¦ãã¾ãã
co-meetingã¯ããããã£ã¯ã©ã¦ãä¸ã§ãµã¼ãã¹ãæä¾ãã¦ãã¾ããããããã£ã¯ã©ã¦ãã¯ã¹ãã¬ã¼ã¸ã«3x3éã®åé·æ§ãæããã¦ããã®ã§ããã¯ä¿¡é ¼ãã¦ããã¯ã¢ãããã¡ã¤ã«ãS3ãªã©å¤é¨ãµã¼ãã¹ã«ä¿åãããã¨ã¯è¡ã£ã¦ãã¾ãã*2ã
ã¾ããããã¯ã¢ããã®ä»çµã¿ã«ã¯LVMã®ã¹ãããã·ã§ãããæ¤è¨ãã¦ãã¾ãããLVMã®éç¨çµé¨ãç¡ããããä»ã®ã¨ãã復æ§ãããã·ã³ãã«ã§ç¢ºå®ãªrsyncãæ¡ç¨ãã¦ãã¾ã*3
ã§ã¯ãæ¬é¡ã
ãããã£ã¯ã©ã¦ãã§å©ç¨å¯è½ãªã¹ãã¬ã¼ã¸ã¯ä»¥ä¸ã®ç©ãããã¾ãã
- ãã¼ã«ã«ãã£ã¹ã¯
- Disk200
- Disk40
- ãããã£ã¯ã©ã¦ãã¹ãã¬ã¼ã¸
rsyncã¯ãæ¯æcronã§å®è¡ãã¦ãã¾ãããå·®åã®ã¿ã®ã³ãã¼ã¨ã¯ããã³ãã³ãã®å®è¡æéãçãã«è¶
ãããã¨ã¯ããã¾ããã
ã³ã¹ããèããªããã°ãDisk200ãè¿·ããé¸ã³ã¾ãããã
ãã ãDisk200ã¯10500å/100Gbytesã¨çµæ§ãããå¤æ®µããã¾ãã
ããã«å¯¾ãã¦ãDisk40ã¯4100å/100Gbytesã¨ãæé ä¾¡æ ¼ã§ãã
ã³ãã³ãã®å®è¡ã¯ãCPUããããã¯ã¼ã¯ããã£ã¬ã¯ããª/ãã¡ã¤ã«ã®æ§é ã«ãå½±é¿ãããã®ã§åç´ã«ãã£ã¹ã¯ã®ã¹ãã¼ãã ãã§ã¯æ¯è¼ã§ãã¾ããã
ããã§ãåã¹ãã¬ã¼ã¸ã«å¯¾ãã¦ã³ãã³ããå®è¡ãã¦è¨æ¸¬ãã¦ã¿ã¾ããã
rsyncã¯ãUbuntu10.04ã«ã¤ã³ã¹ãã¼ã«ããã¦ãã3.0.7ãå©ç¨ãã¦ãã¾ãã
ä»å使ç¨ãããã¼ã¿ã¯ãç´11Gãã¤ãã®å¤§ããã®co-meetingã®ãã¼ãã£ã³ã°ãã¼ã¿ã§ãã
ãã¼ã«ã«ãã£ã¹ã¯
$ time rsync -ae "ssh -i privatekey.pem" --delete [email protected]:/path/to/source /root/test rsync -ae "ssh -i privatekey.pem" --delete /root/test 117.21s user 40.12s system 16% cpu 16:05.19 total
ãã¡ã¤ã«ã³ãã¼å¾ã®å·®ååæ
$ time rsync -ae "ssh -i privatekey.pem" --delete [email protected]:/add_disk/data/mtg /root/test rsync -ae "ssh -i privatekey.pem" --delete /root/test 1.60s user 2.96s system 1% cpu 5:35.99 total
åèã¾ã§ãã¼ã«ã«ãã£ã¹ã¯éã§å®è¡ããå ´åã¯ä»¥ä¸ã®çµæã«ãªãã¾ããã®ã§ãsshã¨ãããã£ã¯ã©ã¦ãå ã®ãããã¯ã¼ã¯ã®ãªã¼ãã¼ãããã¯ã»ã¼ç¡ãããã§ãã
$ time rsync -ae --delete /add_disk/data/mtg /root/test rsync -ae --delete /add_disk/data/mtg /root/test 56.09s user 54.20s system 11% cpu 16:01.07 total
$ rsync -ae "ssh -i privatekey.pem" --delete [email protected]:/add_disk/data/mtg /add_disk2
rsync -ae "ssh -i privatekey.pem" --delete /add_disk2 1.64s user 2.36s system 1% cpu 5:04.77 total
*1:復æ§ã§ããªãã¬ãã«ã®ã¹ãã¬ã¼ã¸é害ãèµ·ããããµã¼ãã¹ãããã¤ãããã®ã§ä»ã®ã¯ã©ã¦ãã«ããã¼ã¿ã¯ããã¯ã¢ãããããã¨ããã§ãããããã¯ã³ã¹ãã¨ã®å ¼ãåãã«ãªãã¾ã
*2:å ã ã¯s3syncã使ã£ã¦ãã¾ããããã¼ã¿éãå¢ãã¦æ¥ãããå³ãããªã£ã¦ãã¾ãããEnterpriseçã¯å度æ¤è¨ããäºå®ã§ã
*3:ãããã£ã¯ã©ã¦ããããã£ã¹ã¯ã®ã¹ãããã·ã§ããæ©è½ãæä¾ãã¦ãããã°ãããã®ä»çµã¿ãå¿ è¦ãªããªãã¾ããã追å ãã£ã¹ã¯ãã¤ãã¦ã¯å³ãããã§ããã