çããã®å€ãã¯ãDC Oversan-Mercuryã·ã¹ãã ã®ã¢ãŒããã¯ãã£ã«ã€ããŠå€ãã®ããšãèªã£ãHabréã®ããã°ã®èšäºã§Overseanã«ç²ŸéããŠããŸãã
Skalaxiã¯ã©ãŠãã®ã¢ãŒããã¯ãã£ã«ã€ããŠã話ããŸããããäž»ã«
å°éã®äŒè°ã§ãã¬ããŒãããã¬ãŒã³ããŒã·ã§ã³ã®å€ãã¯ãã§ã«æ代é
ãã§ãããç¡é¢ä¿ã«ãªã£ãŠããŸãã
Skalaxiã®ãµãã·ã¹ãã ãšã¢ãŒããã¯ãã£ãœãªã¥ãŒã·ã§ã³ã®å€ãã¯ããªãã«ãšã£ãŠèå³æ·±ããã®ã«ãªããšæãããããã«ã€ããŠè©±ãããšã«ããŸããã ã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ã®ä¿èšŒéã®åé¡ã¯åžžã«ãã±ãã«ãããããCPUãªãœãŒã¹å²ãåœãŠã®ãããã¯ããå§ããããšã«ããŸãããèå³ã®ããã客æ§ãæ¹è©å®¶ãããã¬ãŒããå®æçã«èããŠããŸãã
ãªãœãŒã¹ã®ååžãç解ããã«ã¯ãå°ãªããšãäžè¬çãªèŠ³ç¹ããä»®æ³åã·ã¹ãã ã®ã¢ãŒããã¯ãã£ãæ€èšãã詳现ãæ€èšããå¿
èŠããããŸãã ãã®èšäºã§ã¯ãã¯ã©ã€ã¢ã³ãä»®æ³ãã·ã³éã®CPUåŠçèœåã®åé
ãã©ã®ããã«æ©èœããããåCPUãåVMã«å¯ŸããŠã©ãã ãã®æéãååŸããã©ã®ããã«éæããããã«ã€ããŠèª¬æããŸãã
å®çŸ©
SkalaxiããŒã ã®ç§ãã¡ã¯ããã®ããã¹ãã§ãã£ã±ãã«ãªãããã€ãã®çšèªãšå®çŸ©ã«æ
£ããŠãããããããã«ãªã¹ãããŸãã
- VRTãã¹ããŸãã¯åã«VRT-1ã€ã®ä»®æ³åãã¹ãããŠãŒã¶ãŒä»®æ³ãã·ã³ããã¹ãããç©çãµãŒããŒã
- VMã¯ãŠãŒã¶ãŒã®ä»®æ³ãã·ã³ã§ãããä»®æ³ãµãŒããŒã§ãã ã¯ã©ã·ãã¯ãã¹ãã£ã³ã°ã®äžçã§ã¯ããã®ããšã®éåžžã«åçŽãªããŒãžã§ã³ã¯VPSãšåŒã°ããŸãã
ä»ã®å€ãã®å®çŸ©ãšçšèªã¯ãè³æãæåºããéã«ä»¥äžã«é瀺ãããŸãã
äžè¬çãªXenã¢ãŒããã¯ãã£
Xenã®CPUã¹ã±ãžã¥ãŒã©ã«ã€ããŠè©±ãå§ããæãç°¡åãªæ¹æ³ã¯ãXenãã€ããŒãã€ã¶ãŒã®åºæ¬çãªåäœåçã«ã€ããŠã®çã玹ä»ã§ãã Xenã¯ãXenã䜿çšããŠç©çãªãœãŒã¹ã«ã¢ã¯ã»ã¹ãã1ã€ã®ç©çãã·ã³ïŒãã¹ãïŒã§è€æ°ã®ã²ã¹ãä»®æ³ãã·ã³ãå®è¡ã§ããæºä»®æ³åã·ã¹ãã ã§ãã ãã®å Žåãã²ã¹ãVMãèµ·åããããã®2ã€ã®ãªãã·ã§ã³ããããŸããæºä»®æ³åïŒPVïŒã¢ãŒããä»®æ³ãã·ã³ãå€æŽãããã«ãŒãã«ã§èµ·åããXenã§å®è¡ãããŠããããšããŸãã¯ãã·ã³ãå€æŽãããŠããªãOSããèµ·åããå®éã®åäœããšãã¥ã¬ãŒãããç¹å¥ãªããã»ã¹ããšãã¥ã¬ãŒããããå ŽåéïŒqemu-dmïŒããã®ã¢ãŒãã¯HVMãšåŒã°ããŸãã
Xenã§ã¯ãã²ã¹ãä»®æ³ãã·ã³ã¯ãã¡ã€ã³ãšãåŒã°ããŸãã ãã€ããŒãã€ã¶ãŒã管çããç¹æš©ãã¡ã€ã³ïŒDom0ïŒã1ã€ãããä»ã®ã²ã¹ããã·ã³ãI / Oã§åäœããä»ã®ä»®æ³ãã·ã³ã管çãããŸãã ã²ã¹ãä»®æ³ãã·ã³ïŒDomUsïŒã¯ãDom0ã®ããŒãåŸã«ã®ã¿èµ·åã§ããŸãã
äžè¬ã«ãXenãã€ããŒãã€ã¶ãŒã®ã¢ãŒããã¯ãã£ã«ã€ããŠã¯ããã§ã«ããã§å€ãã®ããšãè°è«ãããŠããŸãã
CPUãã©ã³ãã³ã°ãšé
é»
ãããã£ãŠããã€ããŒãã€ã¶ãŒãå®è¡ãããŠããããŒããŠã§ã¢ã¬ãã«ãããããã®äžã§è€æ°ã®ã²ã¹ãä»®æ³ãã·ã³ãå®è¡ãããŠããããšãããããŸãïŒDom0ããã³DomUïŒã ãããã®åä»®æ³ãã·ã³ã¯CPUã«ã¢ã¯ã»ã¹ã§ããŸãã ã©ã®ããã«æ§æãããŠããŸããïŒ
åä»®æ³ãã·ã³ã¯ãããããä»®æ³CPUïŒvCPUïŒã§åäœããŸããããã¯1ã€ã®ã³ã¢ã®ä»®æ³åè¡šçŸã§ãã vCPUã®æ°ã¯ãæ§æå
ãŸãã¯xm vcpu-setã³ãã³ãã䜿çšããŠãåä»®æ³ãã·ã³ã«åå¥ã«å²ãåœãŠãããŸãã ããã«ãåä»®æ³ãã·ã³äžã®vCPUã®æ°ã¯ãå°ãªããšã1ã€ã§ããã¹ãã³ã¢ã®æ°ä»¥äžã«ããããšãã§ããŸãã
ãã€ããŒãã€ã¶ãŒã®ã¿ã¹ã¯ã¯ãvCPUéã§ç©çCPUæéãæ£ããåé
ããããšã§ãããCPUã¹ã±ãžã¥ãŒã©ãšåŒã°ããã³ã³ããŒãã³ãããã®ã¿ã¹ã¯ã«é¢äžããŠããŸãã ãã®èšäºã®å·çäžã«ã3ã€ã®æ¢åã®ã¹ã±ãžã¥ãŒã©ãŒã«é¢ããæ
å ±ãšãXenã§çŸåšããã©ã«ãã§äœ¿çšãããŠãããã®ã眮ãæããç¹å®ã®ã¹ã±ãžã¥ãŒã©ãŒã®èª¬æãèŠã€ããŸããã ãããããã®èšäºã®ç®çã¯ããããã¯ã©ãŠãã§ã©ã®ããã«æ©èœããããäŒããããšã§ãããã®ãããã¯ã¬ãžããã¹ã±ãžã¥ãŒã©ãŒã«ã€ããŠèª¬æããŸãã
æ€çŽ¢ããå ŽåãHabr
ã§ãã®ããŒãã«é¢ããèšäºãèŠã€ããããšãã§ããŸãã ãããã£ãŠãããã§ã¯ã¹ã±ãžã¥ãŒã©ã®åºæ¬ååãç°¡åã«èŠçŽãããã®äœæ¥ã®ã¢ã«ãŽãªãºã ãããäžåºŠç解ããŸãã
- ã¹ã±ãžã¥ãŒã©ã¯ããã¥ãŒå
ã®ãªããžã§ã¯ããšããŠvCPUã䜿çšããŸãã Xenã¯VMå
ã®ã¿ã¹ã¯ãèšç»ãããvCPUã©ã³ã¿ã€ã ã®ã¿ãå¶åŸ¡ããã²ã¹ãOSãVMå
ã®ããã»ã¹ãåŠçããŸãã
- ä»®æ³ãã·ã³ã¯ãvCPUã®æ°ã1ããã³ã¢ã®åèšæ°ã«å¶éã§ããŸãã
- ä»®æ³ãã·ã³ã«ã¯ãvCPUã®CPUå²ãåœãŠã®åªå
床ãå¶åŸ¡ããéã¿ãå²ãåœãŠãããŸãã
- ãã£ãã-1ã€ã®ç©çã³ã¢ã®å²åãšããŠã®CPUæéã®æ倧å²ãåœãŠéã®äººçºçå¶éã 1ã€ã®ã³ã¢ã®20ãã20ïŒ
ã400ãã4ã³ã¢ããã¹ãŠã0ããç¡å¶éã
- Dom0ã¯ãããã®ãã©ã¡ãŒã¿ãŒïŒããã³vCPUïŒã䜿çšãããã®ééãšäžéãã©ã¡ãŒã¿ãŒã«åŸã£ãŠããã»ããµãŒæéãåãåããŸãã
ã¢ã«ãŽãªãºã ã®è©³çŽ°ïŒ
- Xenã®åCPUã«ã¯ãvCPUãå
¥ãç¬èªã®ãã¥ãŒããããŸãã ãã¥ãŒå
ã®vCPUã«ã¯ã¯ã¬ãžããã¬ãã«ïŒæ°å€ïŒãšã¹ããŒã¿ã¹ïŒãªãŒããŒ/ã¢ã³ããŒïŒããããä»®æ³ã³ã¢ããã®é
ä¿¡æéã«CPUã®äžéšãåä¿¡ãããããŸã åä¿¡ããŠããªããã瀺ããŸãã
- è«æ±æé-ç¹å®ã®ââæéãå€éšã¹ã¬ããããã¹ãŠã®vCPUã®ã¯ã¬ãžããæ°ãåã«ãŠã³ãããã¯ã¬ãžããæ°ïŒãã€ã³ãïŒã«å¿ããŠã¹ããŒã¿ã¹ãå€æŽããŸãã
- CPUã¿ã€ã ã¹ã©ã€ã¹-CPUã1ã€ã®vCPUã«æäŸããæéïŒããã©ã«ãã§ã¯30ããªç§ïŒã
1ã€ã®ã¿ã€ã ã¹ã©ã€ã¹ã解決ãããšïŒvCPUããããã¯ãããã¢ã€ãã«ç¶æ
ã«ãªããéã«ç®èŠããïŒãCPUã¯ãã¥ãŒå
ã®æ¬¡ã®vCPUã«ç§»åããŸãã åæã«ãCPUã¿ã€ã ã¹ã©ã€ã¹ãæ¶è²»ããŠããã€ã³ããvCPUã¢ã«ãŠã³ãããå·®ãåŒãããŸãããã€ã³ãã®æ°ãè² ã«ãªããšãvCPUã¯ã¹ããŒã¿ã¹ãåä¿¡ãããã¥ãŒã«çœ®ãæãããŸãã ãã¥ãŒã®ã¹ããŒã¿ã¹ãvCPUã䜿ãæãããå ŽåãCPUã¯ä»ã®ã³ã¢ã®ãã¥ãŒã§ãã®ãããªvCPUãæ¢ããŸãã 圌ãããã«ããªãå Žåã圌ã¯æ¬¡ã®vCPUãæ¢ããŸããèªåèªèº«ãšã¹ããŒã¿ã¹ããªãŒããŒç¶æ
ã«ãªã£ãŠããä»ã®vCPUãæ¢ããŸããããã«ãããvCPUãããå°ãçºè¡ã§ããŸãã ãã®ã¢ãããŒãã«ãããã·ã¹ãã ããã³ä»ã®ä»®æ³ãã·ã³ã®CPUãã¢ã€ãã«ç¶æ
ã®å ŽåãããªãäœããŠã§ã€ãã®vCPUã§ãããããã»ããµãŒæéãåãåãããšãã§ããVMãããã»ããµãŒæéãåãåãããšãä¿èšŒãããŸãã
Skalaxiã§ã®æ§æ
Skalaxiã§ã¯ãXenãã€ããŒãã€ã¶ãŒã䜿çšãããŠãŒã¶ãŒä»®æ³ãã·ã³ã¯VRTãã¹ãã§å®è¡ãããŸãã ç¬èªã®éçºã§ããCloudEngineã¯ããã·ã³ãå®è¡ããVRTãã¹ããéžæããŸãã é©åãªãã¹ããéžæããããã®ã¢ã«ãŽãªãºã ã¯ã¢ãã±ãŒã¿ãŒãšåŒã°ããŸãããVMã¹ãããã®æ°ã«åºã¥ããŠç°¡åãªæ¹æ³ã§èª¬æãããšãã¯ã©ãŠãããæ£ãããããã±ãŒãžåãããããã«é©åãªå ŽæãéžæããŸãããã·ã³ã¯ããå€ãã®ãªãœãŒã¹ãååŸããŸããïŒäžèšã®æ®µèœã§ãç©çãã¹ãã100ïŒ
æºæ¯ã§ãªãå ŽåãCPUã¯ä¿èšŒãããæå°å€ãããå€ãå²ãåœãŠããããšèšããŸããïŒã
SLESã¯ãcap = 0ããã³weight = 16384ã§dom0ã§èµ·åãããŸãã次ã«ãCloudEngineã«ãã£ãŠéä¿¡ãããã¯ã©ã€ã¢ã³ãVMãdomUã§èµ·åãããRAMã®1ã¡ã¬ãã€ãããã1ã€ã®éã¿åäœã«åºã¥ããŠéã¿ãå²ãåœãŠãããŸãã ãããã£ãŠãVRTãã¹ããå®å
šã«ããŒãããããšãã®domU-machinesã®ç·ééã¯32768ã§ããã€ãŸãããã¹ããçŒçã«ããŒããããŠããdom0ã¯çªç¶å¿
èŠãªå Žåã«ååãªã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ãååŸãããã¹ãã¯domU-machinesã®ééã§ããã§ãŒã¯ãããŸããã
å®éãdom0ã¯ã»ãšãã©åžžã«ã¢ã€ãã«ç¶æ
ã§ãããããdom0ã§è¥å¹²ã®æ倱ãçºçããŠããCPUã¯ã¯ã©ã€ã¢ã³ãä»®æ³ãã·ã³éã§åæ£ãããŠãããšæ³å®ã§ããŸãã Frank Kohlerã®ãã¬ãŒã³ããŒã·ã§ã³ã§ã¯ãéåžžã¢ãŒãã§èµ·åããåŸãdom0ã¯CPUã®æ倧0.5ïŒ
ããæ¶è²»ããããšäž»åŒµããŠããŸãã
ãŸããéåžžã«éèŠãªãã€ã³ãïŒCloudEngineã¯ã1ã€ã®ãã¹ãã§ãªãœãŒã¹ã®æ倧50ïŒ
ãå æãããããã«ãã·ã³ãã¯ã©ãŠãã«é
眮ããŸãã ããã¯éåžžã«ç°¡åã«å®çŸãããŸãïŒã¯ã©ãŠããäºçŽãããŠããããšãå®æçã«ä¿èšŒããŸããã€ãŸãããã¹ãã®æ倧50ïŒ
ãäœäžãããšãVMãä»ã®ãã¹ãã«ç§»è¡ãããŠåäœãç¶ããããšã«ãªããŸããã€ãŸããã¯ã©ãŠãã®æ倧ååãå æãããå¯èœæ§ããããŸãã ãããŠããã¯ãçæ³çã«ã¯ãåãã¹ãã§äœ¿çšããããªãœãŒã¹ã®50ïŒ
ãè¶
ããªãããšãæå³ããŸããããã«ãããVMã®ã¹ã±ãŒãªã³ã°ã容æã«ãªãïŒã¹ã±ãŒãªã³ã°æã®ç§»è¡ãå°ãªããªãïŒãåãã·ã³ã«éãããCPUã®å²åãå¢å ããŸãã
次ã¯äœã§ãã
ãã®èšäºã§ã¯ãã¯ã©ãŠãå
ã®VMéã§CPUãã©ã®ããã«åæ£ããããã«ã€ããŠèª¬æããŸããã 以äžã§ã¯ããããå®éã«ã©ã®ããã«æ©èœãããã瀺ããããšæããŸãã æ¥é±ã®ããã©ãŒãã³ã¹ãã¹ããåŸ
ã£ãŠãã ãã:)ç¬ç«ãããã¹ããå®æœãããå Žå-æžã蟌ã¿ãããã®ããã®ãªãœãŒã¹ãç¡æã§æäŸããŸãã
é¢é£è³æ
Xenã§ã®CPUãªãœãŒã¹ã®å²ãåœãŠã«é¢ããè³æãèªã¿ããå Žåã¯ã以äžã«æ
å ±ã䜿çšããæ
å ±æºã瀺ããŸãã ä»ã®èå³æ·±ãèšäºãèŠã€ããããã³ã¡ã³ãã§ããã«ã€ããŠæžããŠãã ããã
twitterã賌èªãããšãä»®æ³åãšã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ã«é¢ããèå³æ·±ãè³æãèŠã€ããããšãã§ããŸãã ãããŠã
ç§ãã¡ã«æ¥ãŠ
ãã¹ãããŠãã ãã /
å¿
èŠãªæ©èœã«ã€ããŠã®ã¢ã€ãã¢ãæããŠãã ãã :)