Javaããã©ãŒãã³ã¹ãšå šèœã®JVM
Javaä»®æ³ãã·ã³ïŒJVMïŒåŽã§äœãèµ·ãããŸãããããã©ãŒãã³ã¹ã«ã©ã®ããã«åœ±é¿ããŸããïŒ SAP Volker Simonisã® JVMãšã³ãžãã¢ãšãããã«ã€ããŠãããã³Javaããã©ãŒãã³ã¹å šè¬ã«ã€ããŠå°ã話ããŸããã ãã©ã«ã«ãŒã¯è±èªã§è³ªåã«çããŸãããããã§ç¿»èš³ãå ¬éããŸãã
-ãªãJavaãé ããããã©ãŒãã³ã¹ã®åé¡ãéèŠã§ãããšèšãããŠããã®ã§ããïŒ
-Javaãé ããã®ãšããŠèªèãããã®ã¯éå»ã®ããšã ãšæããŸãã çŸåšãJavaä»®æ³ãã·ã³ã«ã¯ãéåžžã«é«åºŠãªJITã³ã³ãã€ã©ãšã¬ããŒãžã³ã¬ã¯ã·ã§ã³ã¢ã«ãŽãªãºã ããããéåžžã®ã¢ããªã±ãŒã·ã§ã³ã«éåžžã«åªããããã©ãŒãã³ã¹ãæäŸããŸãã ãã¡ãããJavaããã€ãã£ãC / C ++ã¢ããªã±ãŒã·ã§ã³ãããé ãäŸã¯åžžã«èŠã€ãããŸãã ãã ããHadoopãNeo4jãH20ãªã©ã®ã·ã¹ãã ã¯ã倧èŠæš¡ã§è€éãªé«è² è·ã®ã¢ããªã±ãŒã·ã§ã³ã§ããJavaã§èšè¿°ã§ããäŸã§ãã ã€ãŸããJavaã®ããã©ãŒãã³ã¹ã¯éåžžã«é«ããJavaãã¯ãããžãŒãšããŠéåžžã«ç«¶äºåããããŸãã
ç§ã®çµéšã§ã¯ãä»æ¥ã®äººã ã¯ãRubyïŒJRubyïŒãClojureãScalaãªã©ãJVMã®ã代æ¿ãèšèªã®ããã©ãŒãã³ã¹ã«ã€ããŠäžæºãè¿°ã¹ãŠããŸãã JVMã¯çŽç²ãªJavaã³ãŒããšåæ§ã«ããããæé©åã§ãããšæããŸãã ããã¯æéã®åé¡ã§ãã
-Javaããã©ãŒãã³ã¹ãè©äŸ¡ããã³æž¬å®ããæ¹æ³
-Javaã®ããã©ãŒãã³ã¹ã®æž¬å®ã¯æ¬åœã®ç§åŠã§ãã OracleãGoogleãTwitterãOdnoklassnikiãªã©ã®äŒæ¥ããçµéšè±å¯ã§è³æ Œã®ããåŸæ¥å¡ã§æ§æãããå°ä»»ã®ããã©ãŒãã³ã¹ããŒã ãæã£ãŠããããšã¯é©ãããšã§ã¯ãããŸããã
Javaã¢ããªã±ãŒã·ã§ã³ã®äœ¿ãæ £ããããã©ãŒãã³ã¹ãããã¡ã€ãªã³ã°ã¢ãããŒãã¯ãåžžã«å€±æããå¯èœæ§ããããŸãã
çŸåšãOpenJDKã®äžéšã§ããJava Microbenchmark HarnessããŸãã¯ç°¡æœã«ããããã«ãJMH Aleksey ShipilevïŒå°ãªããšããã·ã¢èªã®åºçç©ã§ã¯ãããã¯ãããä»ããŠäž»åŒµããŠããŸãïŒã¯ãããã©ãŒãã³ã¹ã®æž¬å®ããã³åæã®æšæºãšããŠç¢ºç«ãããŠããŸãäžå°èŠæš¡ã®Javaã¢ããªã±ãŒã·ã§ã³ã JMHå®è£ ã®è€éããšåµæ工倫ã«ãããJavaã¢ããªã±ãŒã·ã§ã³ã®ããã©ãŒãã³ã¹ãæ£ç¢ºã«æž¬å®ããããã«JMHãäœãããã®ããããããŸãã http://shipilev.net/ã«ãã圌ã®ããã°ã¯ãJavaã®ããã©ãŒãã³ã¹ãšæé©åã®åé¡ã«é¢ããäžå¯æ¬ ãªæ å ±æºã§ãã
ãŸããJMHã¯äž»ã«Javaã³ãŒãã®ããã©ãŒãã³ã¹ã®æž¬å®ãšæé©åãæ åœããŸãããGCããã©ãŒãã³ã¹ã®æ¹åã«ã¯åŒãç¶ãåé¡ããããŸãã ãããŠãããã¯ç¬èªã®ç°ãªãããŒã«ãšå°éç¥èã®ã»ãããå¿ èŠãšããå¥ã®è©±ã§ãã
-æãäžè¬çãªããã©ãŒãã³ã¹ã®åé¡ã¯ã©ãã«ãããŸããïŒ
-ãã¡ããããã¯ãJavaã¢ããªã±ãŒã·ã§ã³ã®ã¿ã€ãã«å€§ããäŸåããŸãã ããŒã¿ãã€ã³ãã¢ããªã±ãŒã·ã§ã³ã«ã€ããŠè©±ããŠããå ŽåïŒã€ãŸãã巚倧ãªããŒã¿ã«å¯ŸããŠåçŽãªã³ãŒããå®è¡ããå ŽåïŒãGCã¢ã«ãŽãªãºã ãæ£ããéžæããŠæ§æããããšãããããéèŠã§ãã ãã®å Žåã§ããæåã«ã¢ããªã±ãŒã·ã§ã³ãæ倧垯åå¹ åãã«æé©åããããã¢ããªã±ãŒã·ã§ã³ã®ã¬ã€ãã³ã·ãããéèŠããããéžæããå¿ èŠããããŸãã
äžæ¹ãã¢ããªã±ãŒã·ã§ã³ãèšç®ã«äŸåããŠããå Žåã¯ãJMHããã€ãã£ããããã¡ã€ã©ãŒãªã©ã®ããŒã«ã䜿çšããŠãä»®æ³ãã·ã³ãããŒãããããã¹ãŠã®å®è¡å¯èœãã©ã³ããå®éã«å®å šã«åã蟌ã¿ãæé©åããããšã確èªã§ããŸãã
ç·å¯ã«äžŠååãããã¢ããªã±ãŒã·ã§ã³ã®å Žåãæ£ããåæ/ããããã³ã°ããªã·ãŒïŒã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããŠããããŒããŠã§ã¢/ãã©ãããã©ãŒã ã«ãã£ãŠç°ãªãå ŽåããããŸãïŒãéžæããããšããå§ãããŸãã ã
ããããæãéèŠãªã«ãŒã«ïŒä»®æ³ãã·ã³ã¯ãäžå®å šã«èšè¿°ãããã³ãŒããé«æ§èœããã°ã©ã ã«å€ããããšã¯ã§ããªããããã»ãšãã©ã®åªåã¯ã¢ã«ãŽãªãºã ã®æ£ç¢ºãã«åããããã¹ãã§ãã äžã§èª¬æããããã«ãJVMã¬ãã«ã§ã®åŸ®èª¿æŽã¯åžžã«éçºãµã€ã¯ã«ã®æåŸã®ã¹ãããã«éããŸããã
-ããªãã¯JVMã®ãšãã¹ããŒãã§ãã JVMã¯ã©ã®ãããã®é »åºŠã§ããã©ãŒãã³ã¹ã®äœäžãåŒãèµ·ãããŸããïŒ äž»ãªåé¡ãšãã®å¯ŸåŠæ¹æ³ã¯äœã§ããïŒ
-çæ³çã«ã¯ãäžå®åæ°ã®å埩ã®åŸãJavaã¢ããªã±ãŒã·ã§ã³ã¯ã³ã³ãã€ã«ãããJITã³ãŒããå°ãªããšã95ïŒ ã®æéå®è¡ãããç¶æ ã«å°éããå¿ èŠããããŸãã ãã®å Žåãå®æçã§ãããããªãçãGCããŒãºãçºçããŸãã ããã¯ãJConsoleãJITwatchãFlight Recorderãªã©ã®ããŒã«ã䜿çšããŠç°¡åã«æ€èšŒã§ããŸãã ããã§ãªãå Žåã¯ãä»®æ³ãã·ã³ã®ã©ã®éšåãåé¡ãåŒãèµ·ãããŠããããèŠã€ãã察å¿ããVMã³ã³ããŒãã³ããäžæçã«ããïŒãŸãã¯æé©åããïŒå¿ èŠããããŸãã
HotSpot JVMã®è£œåããŒãžã§ã³ã«ã¯ãçŽ600ã®ããããé«åºŠãªãªãã·ã§ã³ïŒãããã¯-XXã§å§ãŸããªãã·ã§ã³ïŒãããããããã°ãã«ãã«ã¯1200ãè¶ ãããªãã·ã§ã³ãå«ãŸããŠããããšãããããŸãïŒå®å šãªãªã¹ããååŸããã«ã¯ãããŒã䜿çšã§ããŸãïŒ -XXïŒ+ PrintFlagsFinalïŒã ãããã®ãªãã·ã§ã³ã䜿çšãããšãä»®æ³ãã·ã³å ã§äœãèµ·ãã£ãŠãããã«ã€ããŠã®è©³çŽ°æ å ±ãååŸã§ããŸãã ããããæãéèŠãªããšã¯ããããã®ãªãã·ã§ã³ã䜿çšããŠãä»®æ³ãã·ã³ã®ã»ãŒãã¹ãŠã®ãµãã·ã¹ãã ã埮調æŽã§ããããšã§ãã æªããã¥ãŒã¹ã¯ããããã®ãªãã·ã§ã³ãååã«ææžåãããŠããªãããšã§ãããã®ããããœãŒã¹ã調ã¹ãŠãå®éã«äœãèµ·ãã£ãŠããã®ããç解ããå¿ èŠãããã§ãããã
ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ã®ããã€ãã®åé¡ã¯ãæ£ããã¬ããŒãžã³ã¬ã¯ã¿ïŒHotSpotã®çŸåšã®ããŒãžã§ã³ã«ã¯å€æ°ãããŸãïŒãšæ£ããããŒãæ§æãéžæããããšã§è§£æ±ºã§ããŸãã çæãããã³ãŒãã®ããã©ãŒãã³ã¹ã®åé¡ã¯ãå€ãã®å Žåãã€ã³ã©ã€ã³åããééã£ãã³ãŒããéžæããããšã«ãã£ãŠåŒãèµ·ããããŸãã ç¹°ãè¿ããŸãããããã¯ããçšåºŠåœ±é¿ããŸãããæ®å¿µãªãããããã¯éåžžã«è€éãªãããã¯ã§ãããä»ã®éšåã®ããã©ãŒãã³ã¹ã«åœ±é¿ãäžããã«ã³ãŒãã®äžéšãæ¹åããããšã¯å°é£ã§ãã
ããã¯ãã¹ã¬ããã®æåŸ ãããã³ãã£ãã·ã¥ã®ããŸããŸãªå¹æããããããåé¡ã®åå ã§ãã ãããããã®ãœãªã¥ãŒã·ã§ã³ã«ã¯ãä»®æ³ãã·ã³ã®æ·±ãç¥èãšãããŒããŠã§ã¢ãã©ãããã©ãŒã ãšãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®å éšã®ç¥èãå¿ èŠã§ãã
æåŸã«ãæè¿ãä»®æ³ç°å¢ã§ã®Javaã®åé¡ãå¢å ããŠããããšã«æ³šæããŠãã ããã JVMã¯ãç°å¢ã«æé©ã«é©å¿ããããã«ãèµ·åæã«å€æ°ã®ãèªå·±æ§æããå®è¡ããŸãã ãã ããå®éã®ãªãœãŒã¹ã«é¢ããæ å ±ïŒCPUã®æ°ã䜿çšå¯èœãªã¡ã¢ãªã®éãªã©ïŒãJVMãåãåã£ããã®ãšäžèŽããªãå Žåãããã©ãŒãã³ã¹ãéåžžã«äœäžããå¯èœæ§ããããŸãã
ããšãã°ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå€æ°ã®äœ¿çšå¯èœãªè«çCPUãå ±åããå Žåãä»®æ³ãã·ã³ã¯ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãšJITã®ã¹ã¬ãããå€æ°äœæããŸãã ãã ãããã¹ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããããã®ã¹ã¬ãããéåžžã«å°æ°ã®ç©çCPUã«åæ£ããå ŽåãJavaã¢ããªã±ãŒã·ã§ã³ã®ãŠãŒã¶ãŒã¹ã¬ããã¯ãä»®æ³ãã·ã³ã®ã·ã¹ãã ã¹ã¬ããã«å®å šã«çœ®ãæããããšãã§ããŸãã ã²ã¹ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãäžéšã®JVMã«å€§éã®ã¡ã¢ãªãå²ãåœãŠããããã®ã¡ã¢ãªãä»ã®ã²ã¹ãOSéã§å ±æïŒå ±æïŒãããå Žåãåæ§ã®åé¡ãçºçããŸãã
-ã¡ã¢ãªç®¡çã¢ã«ãŽãªãºã ã¯çŸåšJVMã«ã©ã®ããã«å®è£ ãããŠããŸããïŒéçºè ãããã©ãŒãã³ã¹ã®åé¡ãããå°ãªãããããã«äœãè¡ãããŠããŸããïŒ
-å®éãHotSpotä»®æ³ãã·ã³ã¯ããŸããŸãªã¡ã¢ãªç®¡çã·ã¹ãã ãšæŠç¥ã䜿çšããŠããŸãã éåžžã®Javaããã°ã©ããŒã«ãšã£ãŠæ倧ãã€æããæãæåãªã®ã¯ããã¡ãããããã«åãçµãã§ããããŒããšããŒãåéã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ã¢ã«ãŽãªãºã ã§ãã
ãã ããJVMã¯ä»ã®å€ãã®ã¡ã¢ãªããŒã«ã§ãæ©èœããŸãã ããŒããããã¯ã©ã¹ãæ ŒçŽããã¡ã¿ã¹ããŒã¹ãšãä»®æ³ãã·ã³ã«ãã£ãŠçæãããã³ãŒããæ ŒçŽããããã®ãã£ãã·ã¥ããããŸãïŒæãããç¥ãããŠããã³ãŒãã®åœ¢åŒã¯ãJITã«ãã£ãŠã³ã³ãã€ã«ãããã¡ãœãããããã³ã€ã³ã¿ãŒããªã¿ãŒã®çæãããéšåãšããŸããŸãªã³ãŒãã¹ã¿ãã§ãïŒã
æåŸã«ãGCãJITã³ã³ãã€ã©ãªã©ã®ä»®æ³ãã·ã³ã®ããŸããŸãªãµãã·ã¹ãã ã§ã¯ããžã§ããå®è¡ããããã«ãã°ããã®éããªãã®ãã€ãã£ãã¡ã¢ãªãå¿ èŠã«ãªãå ŽåããããŸãã ãã®ã¡ã¢ãªã¯éåžžãªã³ã¶ãã©ã€ã§å²ãåœãŠãããããŸããŸãªã»ã°ã¡ã³ãããªãœãŒã¹ãŸãŒã³ããŸãã¯ãµãã·ã¹ãã ãã£ãã·ã¥ã§ãµããŒããããŸãã ããšãã°ã倧ããªã¡ãœãããã³ã³ãã€ã«ããJITã§ã¯ãäžæçã«1ã®ã¬ãã€ããè¶ ãããã€ãã£ãã¡ã¢ãªãå¿ èŠã«ãªãå ŽåããããŸãã ãããã®ã¡ã¢ãªããŒã«ã¯ãã¹ãŠãã¢ããªã±ãŒã·ã§ã³ã«åãããŠã«ã¹ã¿ãã€ãºã§ããŸãã
-Javaã®ããã©ãŒãã³ã¹ã«åé¡ããã£ããšãã®å®è·µããèå³æ·±ã話ãæããŠãã ããã ã©ã®ããã«è§£æ±ºãããŸãããïŒ
ãåœç€Ÿã®SAP JVMã¯ãPARISCããã³Itanium CPUäžã®HP-UXãå«ãå€ãã®ç°ãªããã©ãããã©ãŒã ã§å®è¡ãããŸãã Itaniumäžã®HP-UXã¯ãPARISCãã€ããªãã¡ã€ã«ã®ãœãããŠã§ã¢ãšãã¥ã¬ãŒã·ã§ã³ãæäŸããPARISCã¢ããªã±ãŒã·ã§ã³ã®å®è¡ãç°¡åãã€ééçã«ããŸãã 確ãã«ããã€ãã£ãã¢ããªã±ãŒã·ã§ã³ããã1æ¡é ãã§ãã
HP-UX / Itanium JVMã®ããã©ãŒãã³ã¹ãéåžžã«äœããšããã客æ§ããã®èŠæ ãå€ãå¯ããããåŸãäœãèµ·ãã£ãŠããã®ããææ¡ãå§ããŸããã ã¯ã©ã€ã¢ã³ãã¯PARISCãã€ããªã䜿çšããŠHP-UX / Itaniumã§å®è¡ããããšãå€æããŸããã åã¯ã©ã€ã¢ã³ãã«ãšãã¥ã¬ãŒã·ã§ã³ã®è€éãã説æã§ããªãã£ãããã次ã®ããŒãžã§ã³ã®JVMã«ãã§ãã¯ãè¿œå ããã ãã§ãããã°ã©ã ãšãã¥ã¬ãŒã·ã§ã³ã¢ãŒãã§ã®PARISCã®ã³ãŒãå®è¡ãçŠæ¢ãããŸããã
ãšã³ã¿ãŒãã©ã€ãºåãã®Javaããã©ãŒãã³ã¹
åæããŸããã¢ããªã±ãŒã·ã§ã³ãå®çšŒåã«å ¥ãããã¬ãŒããšããªãŒãºã«é¢ããã¯ã©ã€ã¢ã³ãããã®äžå¿«ãªã³ã¡ã³ããè¿ãããäžå¿«ãªç¬éã§ãã Javaããã©ãŒãã³ã¹ã®åé¡ã¯ãäž»ã«ãšã³ã¿ãŒãã©ã€ãºãœãªã¥ãŒã·ã§ã³ã«ãšã£ãŠéèŠã§ãã ãã®ãããçéå ¥ãã®å®çšçãªã¢ããã€ã¹ãåŸãããã«ãNetCrackerïŒãã¬ã³ã ãœãªã¥ãŒã·ã§ã³äŒæ¥ïŒã®ããã©ãŒãã³ã¹ã¢ãŒããã¯ãVladimir Sitnikovã«å°é家ãäŸé ŒããŸãã ã
ãæè²ç°å¢ãšãããã§ãã·ã§ãã«ç°å¢ã®äž¡æ¹ã§æœåšçãªJavaããã©ãŒãã³ã¹ã®åé¡ã«ã€ããŠèããããšããããŸãã ãã¹ãŠã®ãžã§ãŒã¯ã«ã¯ã»ãã®äžéšã®ãžã§ãŒã¯ããããŸãã äžéšã«ã¯ãJavaã®é ãã¯ç¥è©±ã§ããç¹ã«ãã©ãããã©ãŒã ã®ããã©ãŒãã³ã¹ã¯æéãšãšãã«å€åãã10幎åã«æ¹å€ãããŠããããšãä»ã§ã¯ãŸã£ããç°ãªãæ¹æ³ã§æ©èœããããã§ãã ãã¹ããŒããŠã³-ã¹ããŒããŠã³ã§ã¯ãªããã¬ãã«ã§Javaã®ããã©ãŒãã³ã¹ã«ã€ããŠè©±ãã®ã¯ç¡è¬ã§ãã
å®éã«ã¯ãç£æ¥çšã¢ããªã±ãŒã·ã§ã³ã®äž»ãªåé¡ã¯ãåé¡ã解決ããããã«å¿ èŠãªã¢ã¯ã·ã§ã³ãããå€ãã®ã¢ã¯ã·ã§ã³ãå®è¡ãããå Žåã®éå°ãªã³ãŒãã®ååšã«é¢é£ããŠããŸãã ã©ããã§ãéçºè ã¯ããŸãã«ãè³¢æã§ããããã©ããã§ããžãã¹èŠä»¶ãéåžžã«æ··ä¹±ããŠããã®ã§ãæåã¯ããã«æžãããšãã§ããŸããã éã®æ§èœã§ååãªå Žåãããã°ãäºæ³ããã解決ãé ãå ŽåããããŸãã ããã§ã®äž»ãªæšå¥šäºé ã¯1ã€ã§ããäžèŠãªã³ãŒããŸãã¯å°ãªããšããã®äžéšãå®è¡ããªãã§ãã ããã
ããã©ãŒãã³ã¹ãäœäžãããã1ã€ã®çç±ã¯ãã¢ã«ãŽãªãºã ã«ãããŸãã ããšãã°ãã¢ã«ãŽãªãºã ã®åºæºã§ã¬ã³ãŒããèŠã€ããã®ã§ã¯ãªãã培åºçãªæ€çŽ¢ã䜿çšããå Žåã ãããå®éã«ã¯ãããã©ãŒãã³ã¹ãåäžãããããã«ç¬åµçãªïŒHashMapãããã¹ããŒããªïŒããŒã¿æ§é ã䜿çšãããããšã¯ã»ãšãã©ãããŸããã
ã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ãªã©ã®ããã©ãŒãã³ã¹ããã³ãµãŒãããŒãã£ã®éçºããŒã«ã«åœ±é¿ãäžããå¯èœæ§ããããŸãã å®éã«ã¯ãåé¡ã¯ãã¹ãŠã®ã¬ãã«ã«ããå¯èœæ§ããããŸã-ãããŠããããã¯èµ·ãããŸãã éçºè ã¯éåžžããã¹ãã§ããããèå¥ããåæã¯ããŸããŸãªãããã¡ã€ãªã³ã°ææ³ïŒãã©ãŠã¶ãŒã¬ãã«ãã¢ããªã±ãŒã·ã§ã³ãµãŒããŒãããŒã¿ããŒã¹ïŒã䜿çšããŠå®è¡ãããŸãã ãµãŒãããŒãã£ã®ã³ãŒãã§åé¡ãçºçããããšãããããããããããã£ããããå¯äžã®æ¹æ³ã¯ã枬å®ãè¡ãããã®éåžžã«ãµãŒãããŒãã£ã®ã³ãŒãã®éçºã泚ææ·±ãç£èŠããããšã§ãã ç§ã®ç·Žç¿ã§ã¯ãæ¯æãçºèŠã§ãã 1è¡ã®ã³ãŒãã眮ãæãããšãããŒã¿ããŒã¹ãžã®ããŒã¿ã®æ¿å ¥ã10åéããªããŸãã
äžè¬ã«ãJavaããã©ãŒãã³ã¹ã®æž¬å®ãšæäœã®äž»ãªããšã¯ãè² è·ãã¹ããå¿ããªãããšã§ãã ãããã£ãŠããšã³ã¿ãŒãã©ã€ãºéçºã®ããã®ããžãã¹èŠä»¶ãã©ãã»ã©å€§ãããŠå³ããã®ããããããã¹ãããããã©ãŒãã³ã¹ã«é¢é£ããäžå¿«ãªç¬éã«æ°ä»ãã®ã«åœ¹ç«ã€å·šå€§ãªãã¹ãã ããšãã°ãäŒæ¥ç°å¢ã®è² è·ãåçã§ãªãããšãèæ ®ããå¿ èŠããããŸãïŒæã«å šå¡ãå ¥ã£ãŠãã·ã¹ãã ã«å ¥ããã¯ãŒã¯ããŒãã®ããŒã¯ã«éãããã®åŸäœäžããååŸã«è² è·ãæå°ã«ãªããæŒé£åŸã«ãŠãŒã¶ãŒãæ°ããåã§è² è·ãé«ãå€ã«å¢ãããŸãã ãã¡ãããæåã®åæã§ã¯ããã®ãããªãã¥ã¢ã³ã¹ã¯èŠèœãšãããå¯èœæ§ããããŸãã å®éãããã©ãŒãã³ã¹ã®åé¡ãåé¿ããããã«ã倧éã®ããŒããäºæ³ãããå Žæãšã³ãŒãã®èšè¿°æ¹æ³ã«å€§ãã圱é¿ããŸãã
æãäžè¬çãªééããçæã«ã€ããŠç§ã«å°ããŠããŸãã ããããã«ç¬èªã®ãã®ããããŸãã ããšãã°ãç¹å®ã®ããã»ããµãŸãã¯ã¡ã¢ãªã¢ãã«ãéžæããŠãã»ãšãã©å€æŽãããŸããã ãã¡ããã2006幎ãš2016幎ã®ãµã³ãã«ãæ¯èŒããå Žåãã¢ãã«ã¯éèŠã§ãã å€ãã®è³ªåã¯ã¹ã±ãŒã©ããªãã£ã®é¢ã«ãããŸãã å€ãã®äŒæ¥ãäŒæ¥éçºã®èæ¯ãæ±ããŠããŸãã誰ããå¿ èŠãªãµãŒããŒã®æ°ãšã¢ããªã±ãŒã·ã§ã³ãå±éããããã®ãã¯ãŒãäºæž¬ããããã«åäžã®æž¬å®ãè¡ããããšèããŠããŸãã ããã§ã®å¯äžã®æ¹æ³ã¯ã皌åäžã®ãµãŒããŒã§ãã¹ããããã©ãŒã«ããã¬ã©ã³ã¹ã®ããã«ãªãœãŒã¹ã®äºçŽãèæ ®ããããšã§ãã
äžè¬çã«ããããããæ®éçãªæé©åããŒã«ããããŸã-ãã¹ãã®å¿ ç¶æ§ã ã¹ãã¬ã¹ãã¹ããšçµæã®åæã®ã¹ãã·ã£ãªã¹ããããŸãããäž»ãªå¹æã¯ãéçºè ãã³ãŒãã®é床ã«è²¬ä»»ãæã€ãšãã«éæãããŸãã ããã©ãŒãã³ã¹ã¯ãããªããå®éã«åã£ãŠè¿œå ã§ãããã®ã§ã¯ãããŸããã åé¡ãçºçããå Žæãäºæž¬ããããšã¯å°é£ã§ãããœãŒã¹ã³ãŒãã®ãã¹ãŠã®è¡ãçãååãªæéã¯ãããŸããã äžè¬çãªåé¡ã¯ããã¹ãã誀ã£ãŠãééã£ãéã®ããŒã¿ããŸãã¯ééã£ãè² è·ãšæ§æã§å®è¡ãããããšã§ãã ããšãã°ããã¹ãäžã«ã©ã€ãã©ãªãæŽæ°ãããã顧客ãéžæããŠæŽæ°ãã-åé¡ããªãããšãèæ ®ããŠãã ããã
ç§ã®èšæ¶ã«ã¯ãããã©ãŒãã³ã¹ã®åé¡ãåé¿ããããšãããããžã§ã¯ãããããŸãããããããã¯å°èŠæš¡ãªãã¢ãããžã§ã¯ãã§ããããã¢ããªã±ãŒã·ã§ã³ã®åäœãé ããšãã顧客ããã®èŠæ ã§ããã«æ»ã£ãŠããŸããã
å€ãã®å Žåãããã©ãŒãã³ã¹ã®äœäžãã¢ããªã±ãŒã·ã§ã³å šäœã®äœäžã¯ã1ã€ã®ã°ããŒãã«ãšã©ãŒã ãã§ãªãã2ã€ãŸãã¯3ã€ã®åé¡ã®çµã¿åãããåå ã§ããããããããäžèŠãããšè åšã§ã¯ãããŸããã ãããŠææªã®ããšã¯ãéçºè ãèªåã®ã³ãŒãã§çããåé¡ãç¥ããªãå¯èœæ§ãããããšã§ãã æè¡ãµããŒããšã³ãžãã¢ãåé¡ã解決ã§ããå Žåã圌ãã¯ããããå ±ãããããã«ã³ãŒãã®äœè ãæ¢ãããšã¯ãã£ãã«ãããŸããã
èŠæ ãšããã°ã ã¯ã©ã€ã¢ã³ããinããŠããå Žåãåé¡ãæ¢ãå ŽæãèŠã€ããããã®ç°¡åãªã¢ã«ãŽãªãºã ããããŸãã 顧客ã®ä»£è¡šè ãšããã®æ¹æ³ãå°ããå¿ èŠããããŸãã ãã¹ãŠããã£ãããšæ©èœããåé¡ã䞻芳çãªæèŠã§ããããã«æãããå Žåã¯ããããæ©èœããæéãæå®ããŸãã ãã¡ããããã®ãããªèŠä»¶ã¯ãäºåã«ïŒéçºäžããŸãã¯éå§ããåã«ïŒåéããããšããå§ãããŸãã èŠä»¶ãã³ã³ããŒãã³ãã«å解ããŸããããšãã°ããŠãŒã¶ãŒã5ç§ä»¥å ã«ããŒãžãéãããã«ãããå Žåãäºç®ããã©ãŠã¶ãŒã«å²ãåœãŠãŸãïŒ1ç§ããµãŒããŒåŽã«3.5ç§ããããã¯ãŒã¯ã«0.5ç§ãªã©ïŒã å€ãã®å Žåãå èš³ã¯ã·ã¹ãã èªäœã®ã³ã³ããŒãã³ãã«ãŸã§åãã§ãããã¡ãªã¿ã«ã©ã³ã¿ã€ã ã¯ãã°ã«èšé²ãããéçºè ã¯ãããã¡ã€ã©ãŒãéãããšã§ãã³ãŒããåãå ¥ãå¯èœãªãã¬ãŒã ã¯ãŒã¯ã«é©åãããã©ããã確èªã§ããŸãã
ã ããåé¡ããããŸãã ã©ããèŠãŠãã©ããã足ã䌞ã³ãŠããã®ãïŒ
- CPUè² è·ãšGCãã°ã®å
容ã確èªããŸãã ã·ã¹ãã ãããŒããããåæã«è² è·ãGCã«ãã£ãŠåŒãèµ·ããããå Žåãã¡ã¢ãªãå°ãªãïŒ-Xmxãå¢ããå¿
èŠããããŸãïŒããã誰ããé£ã¹ãããŠããŸããã
- ããèªäœã§ã¯ã50ã100ïŒ
ã®ã¯ãŒã¯ããŒããæ¢ã«ãå¿çæéãæãæ³åã絶ããå¯èœæ§ãããããšã瀺åããŠããŸãã
- é害ã¯ãµãŒãããŒãã£ã®ã¢ããªã±ãŒã·ã§ã³ã«ããããšãèµ·ãããŸãã ç¡å®³ãªã¢ããããŒãã¯ããèŽãç©ãšããŠããã¬ãŒãã®ããã¯ãããããããšãã§ããŸãã æšæºçãªäŸã¯ãRedHat Linuxã®ã¹ããŒãªãŒã§ããééçãªå·šå€§ããŒãžã¡ã«ããºã ãããã©ãŒãã³ã¹ã®åé¡ãåŒãèµ·ãããŸãã ããã¯Red Hat Linuxã®ãæ©èœãã§ãããã®çç±ã¯ãJavaã¢ããªã±ãŒã·ã§ã³ãšããŒã¿ããŒã¹ã®äž¡æ¹ããçªç¶ãé
ããå§ããããã§ãã Red Hat Linux 6+ïŒCentOS 6+ïŒã圱é¿ãåããŸãã 詳现ã¯ãããã¯ãªãã¯ããŠãã ããã THPã¢ãŒããç¡å¹ã«ããå¿
èŠããããŸãã ããŒããŠã§ã¢ãšããã°ã©ã ã®ãã®ãããªèª¿æŽãæåã§å®è¡ãããå Žåã人çèŠå ã¯é€å€ããããçµæãšããŠ-ãã¬ãŒãã
- ã以åã¯æ©èœããŠããŸãããããäœãå€æŽããããããšããå€å
žçãªè³ªåãããŸãã ã¯ã©ã€ã¢ã³ãåŽã§äœãããããã·ã¹ãã ã³ã³ããŒãã³ãã®æŽæ°ããã°ã©ã ãããŒã«ãããã©ãããå°ããŸãã ããŒã«ãããå Žå-æ€çŽ¢ãã¯ãã«ãããæ確ã«ãªããŸãã æ確ã§ãªãå Žåãã¡ã¢ãªã¯ç©ºããŠããã®ã§ããããã¡ã€ã©ã§ã©ã®ã¢ã¯ãã£ããã£ããªãœãŒã¹ãæ¶è²»ããŠãããã調ã¹ãŸãã ããã§ã¯ã誰ããç¬èªã®ã³ãŒãã§ç¬èªã®ã¹ããŒãªãŒãæã£ãŠããŸãã
次ã«ãå®éã®æ¡ä»¶ã«è¿ããã¯ã©ã€ã¢ã³ãã«è¿ãããã©ãŒãã³ã¹ã®åé¡ãèŠãŠã¿ãŸãããã å€ãã®å Žåãã¢ããªã±ãŒã·ã§ã³ã¯å®çšŒåç°å¢ã§éåžžã«äºæããªãåäœãããŸããããã¹ãã§ã¯ãã¹ãŠãå®ç§ã§ããã ããã«ã¯èª¬æããããŸãã ç¶æ³ãã¯ã©ã€ã¢ã³ãã®ã¿ã«ãã£ãŠåçŸãããå Žåãããã¯ãœãŒã¹ããŒã¿ã®åé¡ã瀺ããŠããå¯èœæ§ããããŸãã ããšãã°ãã¢ããªã±ãŒã·ã§ã³ã¯1'000'000ã¯ã©ã€ã¢ã³ãã§æäœãå®äºããå¿ èŠãããããšãããã£ãŠããŸãã ç§ãã¡ã¯1'000'000ã®ã©ã³ãã ãªååãšå§ãçæãããã¹ãã¯æåãããã«ããŒã ã§ã¯ã©ã€ã¢ã³ããæ€çŽ¢ããŸãã ç§ãã¡ã¯æ¬çªã«æ®ããŸã-ãŠãŒã¶ãŒã¯inããŸãã åé¡ã®ããæ€çŽ¢ããã詳现ã«èª¿ã¹ãŸã-æ°åã®Ivanov Ivanov IvanovichãããããšãããããŸããã ã¹ãã¬ã¹ãã¹ãã§ããã»ã©å€ãã®ç¹°ãè¿ããèæ ®ãããªãå ŽåãèŠã€ãã£ãè¡ããã¹ãã§ããã«è¡šç€ºãããæäœäžã«æ€çŽ¢ã1åããã«åäœããã®ãäžæè°ã§ã¯ãããŸããã
ãã¹ãçšã®æ£ããããŒã¿ã»ãããçæããããšã¯ç§åŠã§ãã æå³ã®ãããããšãã°100 GBã®ããŒã¿ãäœæããã ãã§ãªããããŒã¿éã®çžäºäœçšãèæ ®ããå¿ èŠããããŸããããã¯ã皌åäžã®ãã®ãšã§ããã ãé¡äŒŒããŠããå¿ èŠããããŸãã
- çæ³çãªã±ãŒã¹ã¯ãã¯ã©ã€ã¢ã³ãããŒã¹ãã³ãã®ååšã§ãã çŽæ¥äœ¿çšããããšããäºåã«æå·åããŠäœ¿çšããããšãã§ããŸãã ããã«ãæå·åã§ã¯ããªããžã§ã¯ãéã®æ¢åã®é¢ä¿ãšãªã³ã¯ãèæ
®ããåæã«ããŒã¿ã®ã»ãã¥ãªãã£ã確ä¿ããå¿
èŠããããŸãã ããšãã°ããã¹ãŠã®å€ãMD5ã«çœ®ãæããã ãã§ã¯ååã§ã¯ãããŸããã MD5ã§ã®Googleæ€çŽ¢ã§ãããå
ã®ãå€ãèŠã€ããããšãã§ããŸãã äžæ¹ã§ã¯åãããŒã¿ãåãããã·ã¥ã«ããã·ã¥ãããããã«HMACã䜿çšããæ¹ãããæ£ç¢ºã§ããã埩å·åã¯äžå¯èœã§ãã
- ãã³ãããªãããšãèµ·ãããŸãã ãã®å Žåãå°æ¥ã®ã·ã¹ãã ã®ãã©ã¡ãŒã¿ãŒã調æ»ããããããã®ãã©ã¡ãŒã¿ãŒã«åºã¥ããŠãã¹ãããŒã¿ãçæããã¹ã¯ãªãããäœæãããŸãã ãã®å Žåãå®éã«ã¯ååžãåäžãªå Žåã¯ãã£ãã«ãªããããåäžãªååžã¯é¿ããå¿
èŠããããŸãã
ãšã³ã¿ãŒãã©ã€ãºåãã®Javaããã©ãŒãã³ã¹ã«ã€ããŠä»ã«èšããããšã¯ãããŸããïŒ é¡§å®¢ã®æ©èœä»¥å€ã®èŠä»¶ãåéããŸããäœæ¥ã·ããªãªã®å èš³ãç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã¢ãžã¥ãŒã«ãšã®ãŠãŒã¶ãŒã€ã³ã¿ã©ã¯ã·ã§ã³ã®é »åºŠããŠãŒã¶ãŒæ°ãäºæ³æéã åŸã®æ®µéã§ããã©ãŒãã³ã¹ã®åé¡ãä¿®æ£ããã®ã¯éåžžã«è²»çšããããå¯èœæ§ããããã³ãŒã«ã»ã³ã¿ãŒã®ãªãã¬ãŒã¿ãŒãåŸ æ©ããŠããéã«äœåãªæéãããããšãæ·±å»ãªæ倱ã«ã€ãªãããŸãã
å°é家ã®ã³ã¡ã³ãã«ã€ããŠã質åãããå ŽåããŸãã¯Javaããã©ãŒãã³ã¹ã®åé¡ã«ã€ããŠã®ã