¤³¤ó¤Ë¤Á¤Ï¡¢ISUCON ¤È¤¤¤¦¥¤¥Ù¥ó¥È¤Î¥ì¥®¥å¥ì¡¼¥·¥ç¥ó¤ò¹Í¤¨¤¿¤ê´Ä¶¤Î½àÈ÷¤ò¤ä¤Ã¤¿¤ê¥³¡¼¥É½ñ¤¤¤¿¤ê¤·¤Æ¤¿ tagomoris ¤Ç¤¹¡£ÉáÃʤϥ饤¥Ö¥É¥¢³«È¯ËÜÉô¤Î¥¤¥ó¥Õ¥é¥µ¡¼¥Ó¥¹Éô¤È¤¤¤¦¤È¤³¤í¤ÇƯ¤¤¤Æ¤Þ¤¹¡£
ÀèÆüISUCON¤Ï¹¬¤¤¤Ë¤âÂ繥ɾ¤Î¤¦¤Á¤Ë½ªÎ»¤·¤¿¤Î¤Ç¤¹¤¬¡¢¤Ø¤È¤Ø¤È¤Ë¤Ê¤Ã¤ÆÈè¤ìÀڤ俾õÂ֤ǵ¢Â𤷡¢¿²¤Æµ¯¤¤Æ¤ß¤ë¤È¡¢¸ø³«¤·¤Æ¤ª¤¤¤¿¥½¡¼¥¹¥³¡¼¥É¤ò¤µ¤Ã¤½¤¯¼«Ê¬¤Î¼ê¸µ¤ÇÆ°¤«¤·¤Æ¤¤¤ë¿Í¤¬¤¤¤Þ¤·¤¿¡£ÀâÌÀ¤È¤«²¿¤Ë¤â¤Ê¤«¤Ã¤¿¤Î¤Ë¤è¤¯¤½¤³¤Þ¤Ç¡£¤É¤¦¤¤¤¦¤³¤È¤Ê¤Î¤È»×¤ï¤º¤Ë¤Ï¤¤¤é¤ì¤Þ¤»¤ó¡£
#isucon ¤Ë»²²Ã¤·¤Æ¤¤Þ¤·¤¿¡õisucon¥Ä¡¼¥ë¤ò»î¤·¤Æ¤ß¤Þ¤·¤¿ - As a Futurist...
¤Þ¤¿ÍâÆü¤Ë¤ÏTwitter¤Ç¤â³¡¹¤ÈÆ°¤«¤·¤Æ¤ß¤¿Êó¹ð¤¬¸«¤é¤ì¡¢¥¨¥ó¥¸¥Ë¥¢¤Î¤ß¤Ê¤µ¤ó¤Î¥Ð¥¤¥¿¥ê¥Æ¥£¤Ë¤Ï´¶Éþ¤¹¤ë¤Ð¤«¤ê¤Ç¤¹¡£
¤¶¤¤¤ê¤ç¤¦
¤Ç¡¢¤»¤Ã¤«¤¯¤À¤«¤éËÜÈÖ¤ÈƱ¤¸¥Ç¡¼¥¿¤ÇƱ¤¸¤è¤¦¤Ë»î¤»¤ë¤è¤¦¤Ë¤·¤¿¤¤¤è¤Í¡¢¤È¤¤¤¦¤³¤È¤Ç¡¢¥½¡¼¥¹¥³¡¼¥É°ì¼°¤Ë²Ã¤¨¤Æ½é´ü¥Ç¡¼¥¿¤âÍÑ°Õ¤·¤Þ¤·¤¿¡ª
- ¥½¡¼¥¹¥³¡¼¥É°ì¼° (¥Ù¥ó¥Á¥Þ¡¼¥¯Âоݥ¢¥×¥ê¥±¡¼¥·¥ç¥ó¡¢¤ª¤è¤Ó¥Ù¥ó¥Á¥Þ¡¼¥¯¥Ä¡¼¥ë°ì¼°)
- https://github.com/tagomoris/isucon
- (ISUCONËÜÈÖ»þ¤Î¾õÂ֤Υ¿¥°) https://github.com/tagomoris/isucon/tree/ISUConRelease
- ½é´ü¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë
- ¡Ö¤³¤Á¤é¡×(gzip°µ½Ì¡¢Ìó40MB)
¥½¡¼¥¹¥³¡¼¥É°ì¼°¤Ë¤Ä¤¤¤Æ¤Ç¤¹¤¬¡¢ISUCONËÜÈÖ¤«¤é¾¯¤·¤À¤±Êѹ¹¤ò²Ã¤¨¤Æ¤¢¤ê¡¢´ðËÜŪ¤Ë¤Ï1Âæ¤ÎPC¤Ç¥Ù¥ó¥ÁÂоݤ«¤é¥Ù¥ó¥Á¥Þ¡¼¥¯¤Þ¤Ç´°·ë¤¹¤ëÀßÄꡦ¥³¡¼¥É¤¬ºÇ½é¤«¤éÆþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤È¤ê¤¢¤¨¤º¤ª»î¤·¤¤¤¿¤À¤¯¤Ë¤Ï¤³¤Î¾õÂÖ¤«¤é¤¬Â¿Ê¬¤ä¤ê¤ä¤¹¤¤¤È»×¤¤¤Þ¤¹¡£¤Þ¤¿¥Ù¥ó¥Á¥Þ¡¼¥¯¥Ä¡¼¥ë¤Ë¿¾¯¤Î¥Ç¥Ð¥Ã¥°¤¬¹Ô¤ï¤ì¤Æ¤¤¤Þ¤¹¡£
ISUCONËÜÈÖ¤ÈƱ¤¸¤è¤¦¤Ë¿¿ô¥µ¡¼¥Ð¹½À®¡¦Â¿¿ô¥Á¡¼¥à»²²Ã¤ÇÆ°ºî¤µ¤»¤ë¤Ë¤Ï¥ê¥ê¡¼¥¹¥¿¥°¤Î¾õÂ֤Ǥä¤ë¤Î¤¬¤¤¤¤¤È»×¤¤¤Þ¤¹¤¬¡¢¥µ¡¼¥Ð¹½À®¤ò¤É¤¦¤¹¤ë¤«¼¡Âè¤ÎÉôʬ¤â¤¢¤ê¡¢¤Ê¤«¤Ê¤«ÌÌÅݤǤ¹¡£»î¤·¤¿¤¤¿Í¤Ï´èÄ¥¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤É¤¦¤·¤Æ¤â¤È¤¤¤¦¾ì¹ç¤Ë¤Ï @tagomoris °¸¤Ë¤ªÊ¹¤¤¤¤¿¤À¤±¤ë¤ÈÅú¤¨¤é¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
½é´ü¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤ÏISUCONËÜÈ֤Τâ¤Î¤ÈƱ¤¸¤Ç¤¹¡£mysqldump¥Õ¥¡¥¤¥ë¤Ê¤Î¤Ç¡¢mysql¤Ë¤½¤Î¤Þ¤Þ¿©¤ï¤»¤Æ»ÈÍѤǤ¤Þ¤¹¡£¸Ä¿ÍŪ¤Ê¤ª´«¤á¤Ï¡¢¤Þ¤º¤³¤Î¥Õ¥¡¥¤¥ë¤ò»È¤ï¤Ê¤¤¾õÂ֤ǥ٥ó¥Á¥Þ¡¼¥¯¤òÁö¤é¤»¡¢¤½¤Î¸å¤Ë¤³¤Î¥Ç¡¼¥¿¤òÆþ¤ì¤Æ¤ß¤ë¤³¤È¤Ç¤¹¡£¥Ç¡¼¥¿¤ÎÁýÂ礬(¥×¥í¥°¥é¥à¤Î¹½Â¤¤Ë¤è¤Ã¤Æ¤Ï)Àǽ¤Ë¤É¤ì¤À¤±±Æ¶Á¤òÍ¿¤¨¤ë¤«¤¬¼Â´¶¤Ç¤¤Þ¤¹¡£
¤·¤¿¤´¤·¤é¤¨
ISUCON´Ä¶¤òºîÀ®¤¹¤ëPC¤Ë¤Ä¤¤¤Æ¤Ç¤¹¤¬¡¢°Ê²¼¤Î´Ä¶¤Î¤É¤ì¤«¤òÁÛÄꤷ¤Æ¤¤¤Þ¤¹¡£
- Linux·ÏOS¤Î¤É¤ì¤«
- ISUCON¤Ï CentOS 5.6 ¤Ç¤·¤¿¤¬¡¢CentOS 6 ¤äDebian·Ï¤Î¤â¤Î¤Ç¤âÌäÂê¤Ê¤¤¤È»×¤¤¤Þ¤¹
- Mac OSX
- 10.6 Snow Leopard ¤ò¼ê¸µ¤Ç¤Ï»ÈÍѤ·¤Æ¤¤¤Þ¤¹¤¬¡¢10.7 Lion ¤Ç¤â¿ʬÂç¾æÉפǤ¹
- Xcode ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤¬¤ª¤½¤é¤¯É¬ÍפǤ¹(Æþ¤Ã¤Æ¤Ê¤¤´Ä¶¤¬¼ê¸µ¤Ë¤Ê¤¤¤Î¤Ç³Îǧ¤Ç¤¤Ê¤¤¡Ä¡Ä)
BSD·Ï¤ÎOS¤äSolarisÅù¤Ç¤âµ¤¹ç¤¤¤òÆþ¤ì¤ì¤ÐÆ°¤¯¤è¤¦¤Êµ¤¤¬¤·¤Þ¤¹¤¬¡¢³Îǧ¤·¤Æ¤¤¤Þ¤»¤ó¡£´ðËÜŪ¤Ë°Ê²¼¤Î¤â¤Î¤¬Æ°¤¯¤³¤È¤¬ÂçÁ°Äó¤Ç¤¹¡£
- MySQL 5.5 (5.1¤Ç¤â¿ʬư¤¯)
- Apache 2.2 (̵¤¯¤Æ¤â¤É¤¦¤Ë¤«¤Ê¤ë)
- git
- perl 5.8 °Ê¹ß
- node.js 0.4.11 (0.4·Ï¤Î¿·¤·¤á¤Î¤â¤Î¤Ê¤éÂç¾æÉפ½¤¦¤À¤¬ v0.4.11 ¤ª¤¹¤¹¤á)
- supervisord
- easy_install ·Ðͳ¤ÇÆþ¤ì¤ë(¸å½Ò)
ÆÃ¤Ë node.js ¤Ç´Ä¶¤¬Áª¤Ð¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£node.js 0.4·Ï¤ÏWindows¤ËÂбþ¤·¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢Windows¤À¤±¤ÇISUCON´Ä¶¤òºî¤ë¤³¤È¤Ï»ÄÇ°¤Ê¤¬¤éÉÔ²Äǽ¤Ç¤¹¡£(0.5¤ò»È¤Ã¤Æ¤â¤·¤«¤·¤¿¤éÆ°¤¯¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢Á´¤¯»î¤·¤Æ¤¤¤Þ¤»¤ó¡£»î¤µ¤ì¤¿Êý¤¬¤¤¤Þ¤·¤¿¤é¶µ¤¨¤Æ¤¯¤À¤µ¤ë¤È´ò¤·¤¤¤Ç¤¹¡£)
½àÈ÷¤È¤·¤ÆApache¤ÈMySQL¤ò¤Ê¤ó¤È¤«Æþ¤ì¤Þ¤¹¡£Apache¤ÏOSX¤ÏºÇ½é¤«¤éÆþ¤Ã¤Æ¤¤¤Þ¤¹¤·¡¢MySQL 5.5¤ÏLinux¤Ç¤âOSX¤Ç¤â¸ø¼°¤Î¤â¤Î¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¼«Ê¬¤Î´Ä¶¤Ë¤¢¤ï¤»¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ²¼¤µ¤¤¡£¤³¤Î¤¢¤¿¤ê¤Ï¤¢¤Á¤³¤Á¤Ë°ÆÆ⤬¤¢¤ë¤Î¤Ç³ä°¦¤·¤Þ¤¹¡£
¤Þ¤¿perl¤âÂоݤȤʤë´Ä¶¤Ç¤Ï¤É¤ì¤Ç¤âºÇ½é¤«¤é»È¤¨¤ë¤Î¤Ç¾Êά¤·¤Þ¤¹¡£perl¤Î¥Ð¡¼¥¸¥ç¥ó¤òÊѤ¨¤ÆÍ·¤ó¤À¤ê¤·¤¿¤¤µ¤»ý¤Á¤Ï¤è¤¯¤ï¤«¤ê¤Þ¤¹¤¬ÀâÌÀ¤¬ÂçÊѤʤΤǡ¢¤ß¤Ê¤µ¤Þ¤Ç³Æ¼«´èÄ¥¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤â¤·¤¯¤Ï狼¤¬blog¥¨¥ó¥È¥ê¤ò½ñ¤¤¤Æ¤¯¤ì¤ë¤È»×¤¤¤Þ¤¹¡£
node.js¤Ï¤Á¤ç¤Ã¤È¥ì¥¢¤Ê¤Î¤Ç½ñ¤¤Þ¤¹¡£nvm ¤È¤¤¤¦node.js¼«ÂΤΥС¼¥¸¥ç¥ó¤ò´ÉÍý¤¹¤ë¥Ä¡¼¥ë·Ðͳ¤ÇÆþ¤ì¤ë¤Î¤¬´Êñ¤Ç¤¹¡£nave¤È¤¤¤¦Æ±¼ï¤ÎÌÜŪ¤Î¥Ä¡¼¥ë¤â¤¢¤ê¤Þ¤¹¤Î¤Ç¹¥¤ß¼¡Â褫¤Ê¤È¤â»×¤¤¤Þ¤¹¤¬¡¢¤È¤ê¤¢¤¨¤º¼«Ê¬¤Î¤È¤Ã¤Æ¤¤¤ëÊýË¡¤Ç¡£
¤³¤ÎREADME¤Ë½¾¤Ã¤Æ°Ê²¼¤Î¥³¥Þ¥ó¥É¤òᤥ¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£¤Ä¤¤¤Ç¤ËɬÍפʥ⥸¥å¡¼¥ë¤â¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤·¤Þ¤¤¤Þ¤·¤ç¤¦¡£
$ git clone git://github.com/creationix/nvm.git ~/.nvm $ . ~/.nvm/nvm.sh $ nvm install v0.4.11 $ nvm use v0.4.11 $ nvm alias default v0.4.11 $ npm install express jade mysql jsdom async
¤³¤ì¤Çnode¤ª¤è¤ÓnodeÍѥ⥸¥å¡¼¥ë¤Î¥Ñ¥¹¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¹¡£
- node¤Î¥Ñ¥¹: ~/.nvm/v0.4.11/bin/node
- ¥â¥¸¥å¡¼¥ë¤Î¥Ç¥£¥ì¥¯¥È¥ê: ~/node_modules/
°ã¤Ã¤¿¤Ê¤é nvm ¤ÎÆ°ºî¤¬ÊѤï¤Ã¤¿¤Î¤«¤â¤·¤ì¤Þ¤»¤ó¡£node.js¤Þ¤ï¤ê¤Ë¤Ï¤è¤¯¤¢¤ë¤³¤È¤Ê¤Î¤Ç¡¢Æ°Íɤ»¤ºÅ¬µ¹ÆɤßÂؤ¨¤Æ¤¯¤À¤µ¤¤¡£
¤Þ¤¿¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ä¥Ù¥ó¥Á¥Þ¡¼¥¯´ÉÍý¥Ä¡¼¥ë¤Ê¤É¤ò¥Ç¡¼¥â¥ó¤È¤·¤ÆÆ°ºî¤µ¤»¤ë¤¿¤á supervisord ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£
̵¤¯¤Æ¤â»î¤¹¤À¤±¤Ï»î¤»¤Þ¤¹¤¬¡¢¥¹¥³¥¢¤òµá¤á¤Æ¤¢¤ì¤³¤ì¤ä¤ë¾å¤Ç¤Ï¤¢¤Ã¤¿Êý¤¬ÊØÍø¤Ç¤¹¡£easy_install ¥³¥Þ¥ó¥É·Ðͳ¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤Î¤Ç¡¢¤½¤Î½àÈ÷¤ò¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
$ sudo easy_install supervisor
¤Ä¤¯¤ê¤«¤¿
¤Ê¤Ë¤Ï¤È¤â¤¢¤ì¡¢¥½¡¼¥¹¥³¡¼¥É¤ò¼èÆÀ¤·¤Þ¤¹¡£Å¬Åö¤Ê¥Ç¥£¥ì¥¯¥È¥ê¤òÁª¤ó¤Ç git clone ¤·¤Þ¤·¤ç¤¦¡£isucon¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤ËŸ³«¤µ¤ì¤Þ¤¹¡£
$ git clone git://github.com/tagomoris/isucon.git $ cd isucon
¤Þ¤ºWeb¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤éÆ°ºî¤µ¤»¤ë¤³¤È¤Ë¤·¤Þ¤·¤ç¤¦¡£¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¥æ¡¼¥¶¤òºîÀ®¤·¤¿¤ê¥¹¥¡¼¥Þ¤òÄêµÁ¤·¤¿¤ê¤·¤Þ¤¹¡£
$ mysql -u root < webapp/config/database/isucon.sql
Perl¤Ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òÆ°ºî¤µ¤»¤ë¤Ë¤Ï°Ê²¼¤Î¼ê½ç¤ÇOK¤Ç¤¹¡£( webapp/perl/README ¤Ë½ñ¤¤¤Æ¤¢¤ëÄ̤ê¤Ç¤¹¡£cpanm¤Ï¥¤¥ó¥¹¥È¡¼¥ëºÑ¤ß¤Ê¤é curl ¤ä chmod ¤ÏÉÔÍפǤ¹¡£)
$ cd webapp/perl $ curl -k -L http://cpanmin.us/ > ./cpanm $ chmod +x ./cpanm $ ./cpanm -Lextlib -n --installdeps . $ perl -Mlib=extlib/lib/perl5 extlib/bin/plackup -s Starman -E production --preload-app app.psgi
ºÇ¸å¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤È http://localhost:5000/ ¤ÇWeb¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¥¢¥¯¥»¥¹¤¬²Äǽ¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¹¡£¥Ö¥é¥¦¥¶¤Ç³«¤¤¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
ºÇ½é¤Î»þÅÀ¤Ç¤Ïµ»ö¤¬²¿¤â¤Ê¤¤¤Î¤Ç²¿¤âɽ¼¨¤µ¤ì¤Þ¤»¤ó¤¬¡¢ISUCON¥í¥´¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤Èµ»öÅê¹Æ²èÌ̤ˤʤꡢ¤½¤³¤«¤éµ»ö¤¬Åê¹Æ¤Ç¤¤Þ¤¹¡£¤Ò¤È¤Äµ»ö¤òÅê¹Æ¤¹¤ì¤Ð¤½¤ì¤ËÂФ·¤Æ¥³¥á¥ó¥È¤ò¤Ä¤±¤¿¤ê¤â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ê¡¢¥Ö¥é¥¦¥¶¾å¤Ë¤¢¤ì¤³¤ìɽ¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤Þ¤¹¡£
¤·¤Ð¤é¤¯¤³¤Îperl¤Î¥×¥í¥»¥¹¤Ïµ¯Æ°¤·¤¿¤Þ¤Þ¤Ë¤·¤Æ¤ª¤¤Þ¤·¤ç¤¦¡£ºî¶È¤ÏÊ̤Υ¿¡¼¥ß¥Ê¥ë¤ò³«¤¤¤Æ¤ä¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£
ºÇ¸å¤Ë¥ê¥Ð¡¼¥¹¥×¥í¥¥·¤È¤·¤ÆApache¤ÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡£(¤Ê¤¯¤Æ¤â¤È¤ê¤¢¤¨¤ºÆ°¤¯¤Î¤Ç¡¢¾Êά¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£)
´ðËÜŪ¤Ë¤Ïñ½ã¤Ç¡¢Apache¤¬Listen¤·¤Æ¤¤¤ë port 80 ¤ËÍ褿¥ê¥¯¥¨¥¹¥È¤ò¡¢¤¹¤Ù¤Ælocalhost:5000¤ËžÁ÷¤·¤Þ¤¹¡£
ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://127.0.0.1:5000/ ProxyPassReverse / http://127.0.0.1:5000/
mod_proxy (¤ª¤è¤ÓAP¥µ¡¼¥Ð¤òÊ£¿ôΩ¤Æ¤ë¾ì¹ç¤Ë¤Ï mod_proxy_balancer)¤ò͸ú¤Ë¤·¤¿Apache¤Ë¾åµ¤ÎÀßÄê¤ò¤·¤Þ¤¹¡£OSX¤Ê¤é /etc/apache2/other/isu.conf ¤Ê¤É¤È¤¤¤Ã¤¿¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¡¢¤½¤³¤Ë½ñ¤¤¤Æ¤ª¤±¤ÐÎɤ¤¤Ç¤·¤ç¤¦¡£Linux¤Î¾ì¹ç¤Ï /etc/httpd/conf.d/isu.conf ¤Ë½ñ¤¯¾ì¹ç¤ä /etc/apache2/site-enabled/default ¤ËÄɵ¤¹¤ë¤ÈÎɤ¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
½ñ¤¤¤¿¤éApache¤ËÀßÄê¤òÆɤ߹þ¤Þ¤»¤Þ¤¹¡£
$ sudo apachectl restart
¤³¤ì¤Ç http://localhost/ ¤Ç¤µ¤Ã¤¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¸«¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤Ê¤ê¤Þ¤·¤¿¤è¤Í¡©
¥Ù¥ó¥Á¥Þ¡¼¥¯¤Î½àÈ÷¤Ë¤â¤¤¤¯¤Ä¤«¤Î¼ê½ç¤¬É¬ÍפǤ¹¡£¤Þ¤º http_load ¤ò¥Ó¥ë¥É¤·¤Þ¤¹¡£
$ cd tools $ tar xzf http_load/http_load-12mar2006.tar.gz $ cd http_load-12mar2006 $ patch -p1 < ../http_load/http_load.patch $ make
¤³¤Î¤È¤¡¢¶²ÉݤÎkazeburo¥Ñ¥Ã¥Á¤òpatch¥³¥Þ¥ó¥É¤ÇÅö¤Æ¤Æ¤¤¤Þ¤¹¡£Åö¤Æ¤Ê¤¯¤Æ¤âÆ°ºî¤Ï¤·¤Þ¤¹¤¬¡¢¤è¤ê¥ê¥¢¥ë¤ÊISUCON´Ä¶¤Î¤¿¤á¤Ë¤Ï¤¼¤Ò¤È¤âÅö¤Æ¤ë¤Ù¤¤Ç¤·¤ç¤¦¡£
³¤±¤Æperl¤Î¥¹¥¯¥ê¥×¥ÈÍѤΥ⥸¥å¡¼¥ë¤Î½àÈ÷¡£
$ cd ../ $ ../webapp/perl/cpanm -Lextlib -n JSON Furl
¤â¤·¥ê¥Ð¡¼¥¹¥×¥í¥¥·¤òΩ¤Æ¤Ê¤¤¾ì¹ç¤Ï¡¢¥Ù¥ó¥Á¥Þ¡¼¥¯¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤ÎÊÔ½¸¤¬É¬ÍפǤ¹¡£tools/config.json ¤ò¼¡¤Î¤è¤¦¤Ë½ñ¤´¹¤¨¤Þ¤·¤ç¤¦¡£(¥ê¥Ð¡¼¥¹¥×¥í¥¥·¤ÎApache¤òΩ¤Æ¤¿¾ì¹ç¤Ï¤³¤ÎÊѹ¹¤ÏÉÔÍפǤ¹¡£)
--- config.json 2011-08-28 21:51:02.000000000 +0900 +++ config.json.2 2011-08-29 19:08:15.000000000 +0900 @@ -10,6 +10,6 @@ "team01" ], "teams": { - "team01": {"id":"team01", "name":"oreore", "pass":"pass", "bench":"bench01", "target":"127.0.0.1:80"} + "team01": {"id":"team01", "name":"oreore", "pass":"pass", "bench":"bench01", "target":"127.0.0.1:5000"} } }
target ¤Î»ØÄê¤Î¤È¤³¤í¤Ç¥Ý¡¼¥ÈÈÖ¹æ¤òÊѹ¹¤·¤Æ¤¤¤Þ¤¹¤Í¡£¤³¤³¤À¤±¤ÇÂç¾æÉפǤ¹¡£
¤³¤³¤Þ¤Ç¤ä¤ì¤Ð¡¢¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ù¡¼¥¹¤Ç¤Î¥Ù¥ó¥Á¥Þ¡¼¥¯¤ÏÆ°ºî¤·¤Þ¤¹(¤½¤Î¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤òISUCON¸å¤ËÄɲä·¤Þ¤·¤¿)¡£°Ê²¼¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤·¤ç¤¦¡ª
$ NODE_PATH=lib node bench.js team01 standalone
¼Â¹Ô¤¹¤ë¤È1ʬ´Ö¡¢¤¹¤´¤¤Àª¤¤¤Ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¥ê¥¯¥¨¥¹¥È¤¬Èô¤Ó¤Þ¤¹¡£1ʬ·Ð²á¸å¡¢¥Ù¥ó¥Á¥Þ¡¼¥¯¤ª¤è¤ÓWeb¥¢¥×¥ê¥±¡¼¥·¥ç¥óÆ°ºî¥Á¥§¥Ã¥¯¤Î·ë²Ì¤¬¼¡¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤ì¤ÐOK¤Ç¤¹¡£(¤³¤ì¤Ïtagomoris¤ÎMacBookAir¤Ç¼Â¹Ô¤·¤¿·ë²Ì¡£)
tools tagomoris$ NODE_PATH=lib node bench.js team01 standalone { teamid: 'team01', resulttime: Mon, 29 Aug 2011 10:02:48 GMT, test: true, score: 7102, bench: { fetches: 7102, 'max parallel': 10, bytes: 245187000, seconds: 60.0002, 'mean bytes/connection': 34523.6, 'msecs/connect': { mean: 0.378283, max: 36.007, min: 0.081 }, 'msecs/first-response': { mean: 12.754, max: 1254.57, min: 0.906 }, response: { success: 7102, error: 0 }, responseCode: { '200': 7102 } }, checker: { checker: { summary: 'success' }, poster: { summary: 'success' } } }
¤³¤³¤Ë½Ð¤Æ¤¤¤ë "test:true" ¤¬Æ°ºî¥Á¥§¥Ã¥¯¤Ë¥Ñ¥¹¤·¤¿¤È¤¤¤¦¤³¤È¡¢¤½¤·¤Æ "score: 7102" ¤¬¥Ù¥ó¥Á¥Þ¡¼¥¯¤Î·ë²Ì¤Î¥¹¥³¥¢¤Ç¤¹¡£ÅöÆü¤Ï¤ß¤ó¤Ê¤Ç¤³¤Î¿ôÃͤò¶¥¤Ã¤Æ¤¤¤¿¤ï¤±¤Ç¤¹¤Í¡£¤³¤ì¤Ç¤¢¤Ê¤¿¤âISUCON»²²Ã¼Ô¡ª
¤Ê¤ª¤³¤³¤Ëɽ¼¨¤µ¤ì¤¿¥Ç¡¼¥¿(¤ª¤è¤Ó¤³¤ì¤«¤é¸å¤Ë½ñ¤¯ÊýË¡¤Ç¼Â¹Ô¤µ¤ì¤¿¥Ù¥ó¥Á¥Þ¡¼¥¯¤Î¥Ç¡¼¥¿)¤Ï¤¹¤Ù¤Æ tools/data ²¼¤ËÊݸ¤µ¤ì¡¢¸å¤«¤é³Îǧ¤Ç¤¤Þ¤¹¡£
¤â¤ê¤Ä¤±
¼Â¼ÁŪ¤Ë¤Ï¤³¤³¤Þ¤Ç¤ÇÆ°¤¯¤Î¤Ç¤¹¤¬¡¢¤³¤Î¤Þ¤Þ¤Ç¤Ï¤Á¤ç¤Ã¤È¸«¤¿Ìܤ¬»ÄÇ°¤Ç¤¹¤·¡¢¥³¡¼¥É¤äÀßÄê¤ËÊѹ¹¤ò²Ã¤¨¤¿¾ì¹ç¤Ë¤â¤¤¤í¤¤¤í¤ÈÌÌÅݤǤ¹¡£¤Ê¤Î¤Ç¡¢¤Þ¤º³Æ¼ï¥Ä¡¼¥ë¤¬¾ï»þµ¯Æ°¤·¤¿¾õÂ֤ˤʤë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¤³¤ì¤¬´°Î»¤¹¤ë¤È¡¢ISUCON¤Î¤è¤¦¤Ë21¥Á¡¼¥à½àÈ÷¤·¤¿¾ì¹ç¤Ë¤Ï¤³¤ó¤Ê²èÌ̤¬¸«¤é¤ì¤ë¤ï¤±¤Ç¤¹¤Í¡ª
¤³¤Î¤¿¤á¤Ë supervisord ¤ò»ÈÍѤ·¤Þ¤¹¡£Â¾¤Ë¤â daemontools ¤Ê¤ÉƱ¼ï¤Î¥Ä¡¼¥ë¤¬¤¢¤ê¤Þ¤¹¤¬¡¢supervisord¤Î¥·¥ó¥×¥ë¤µ¤Ë¤Ò¤«¤ì¤Æº£²ó¤Ï¤³¤ì¤ò»È¤¤¤Þ¤·¤¿¡£
°Ê²¼¤Îºî¶È¤ò»Ï¤á¤ëÁ°¤Ë¡¢Á°¤ÎÊý¤Ç perl ¥³¥Þ¥ó¥É¤òᤤ¤Æµ¯Æ°¤·¤Ã¤Ñ¤Ê¤·¤Ë¤·¤Æ¤¤¤¿¥×¥í¥»¥¹¤Ï ctrl-C ¤·¤ÆÄä»ß¤µ¤»¤Æ¤ª¤¤Þ¤·¤ç¤¦¡£
¥¹¥³¥¢¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢¤½¤Î¤¿¤á¤Î¥¹¥¡¼¥Þ¤òMySQL¤ËƳÆþ¤·¤Þ¤¹¡£°Ê²¼¤Î¥³¥Þ¥ó¥É¤Ç°ìȯ¤Ç¤¹¡£
$ mysql -u root < tools/etc/master.sql
¤Ç¡¢¤ª¤Ò¤È¤êÍÍÍѤÎsupervisord.confÁ´ÉôÆþ¤ê¤òºî¤ê¤Þ¤·¤¿¤Î¤Ç¡¢¤³¤ì¤ò»È¤¦¤Î¤¬³Ú¤Ç¤¹¡£¤¬¡¢¤½¤ÎÁ°¤Ë³Æ¼ï¥Ñ¥¹ÍѤÎÀßÄê¥Õ¥¡¥¤¥ë¤ò½¤Àµ¤·¤Þ¤¹¡£
$ cd isucon $ cat standalone/env.sh #!/bin/bash USERNAME=tagomoris USER_HOME=/Users/tagomoris NODE_VERSION=v0.4.11 export PATH=$PATH:$USER_HOME/.nvm/$NODE_VERSION/bin export NODE_PATH=$NODE_PATH:$USER_HOME/node_modules/
¤³¤³¤Ç USERNAME ¤ª¤è¤Ó USER_HOME ¤Ïnvm¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ê¤É¤ò¤·¤¿¥æ¡¼¥¶Ì¾¤ª¤è¤Ó¤½¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤òÆþ¤ì¤Æ¤ª¤¤Þ¤¹¡£¤³¤Î¤¢¤¿¤ê¤ÏÉáÄÌ $HOME ¤ò»È¤¨¤Ð¤¤¤¤¤Î¤Ç¤¹¤¬ supervisord ¤ò»È¤¦¾ì¹ç¤Ï root ¤«¤é¸Æ¤Ð¤ì¤ë¾ì¹ç¤Ê¤É¤â¤¢¤ë¤Î¤Ç¡¢¤³¤Î¤è¤¦¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹¡£
¤Þ¤¿ NODE_VERSION ¤ä PATH ¤ä NODE_PATH ¤Ë¤Ï nvm ´ØÏ¢¤Î¥Ñ¥¹Åù¤ò¥»¥Ã¥È¤·¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï¥¤¥ó¥¹¥È¡¼¥ë¸å¤Ë³Îǧ¤·¤¿¤´¼«Ê¬¤Î´Ä¶¤Ë¹ç¤ï¤»¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ì¤¬½ª¤ï¤Ã¤¿¤é¡¢¼¡¤Ë standalone/supervisord.conf ¤ò /etc/ °Ê²¼¤Ë¥³¥Ô¡¼¤·¡¢¼«Ê¬¤Î´Ä¶¤Ë¤¢¤ï¤»¤Æ½ñ¤´¹¤¨¤Þ¤¹¡£
$ sudo cp standalone/supervisord.conf /etc/ $ sudo vi /etc/supervisord.conf
¥í¥°¥Õ¥¡¥¤¥ë¤Î¾ì½ê¤äºÙ¤«¤¤¥Ñ¥é¥á¡¼¥¿¤Ê¤É¤¤¤í¤¤¤í¤¢¤ê¤Þ¤¹¤¬¡¢¤È¤ê¤¢¤¨¤ºÆ°ºî¤µ¤»¤ë¤¿¤á¤Ë½ñ¤´¹¤¨¤ë¤Î¤Ï°Ê²¼¤Î7¥ö½ê¤ËËä¤Þ¤Ã¤Æ¤¤¤ë¡¢isucon¥ê¥Ý¥¸¥È¥ê¤Î¾ì½ê¡¢¤ª¤è¤Ó¥æ¡¼¥¶Ì¾¤À¤±¤Ç¤¹¡£
[program:master] command=/Users/tagomoris/Documents/isucon/tools/etc/master.sh process_name=isucon bench master user=tagomoris ... [program:agent] command=/Users/tagomoris/Documents/isucon/tools/etc/agent.sh process_name=isucon bench agent user=tagomoris ... [program:isucon_perl] directory = /Users/tagomoris/Documents/isucon/webapp/perl command=perl -Mlib=/Users/tagomoris/Documents/isucon/webapp/perl/extlib/lib/perl5 /Users/tagomoris/Documents/isucon/webapp/perl/extlib/bin/plackup -s Starman -E production --preload-app --disable-keepalive --workers 10 /Users/tagomoris/Documents/isucon/webapp/perl/app.psgi user=tagomoris
¤³¤³¤Ë /Users/tagomoris/Documents/isucon ¤È¤¢¤ë¤Î¤¬¼«Ê¬¤¬OSX¾å¤Çisucon¤Î¥ê¥Ý¥¸¥È¥ê¤òÃÖ¤¤¤¿¾ì½ê¤Ç¤¹¤Í¡£¤³¤ì¤ò¤ß¤Ê¤µ¤ó¤ÎPC¾å¤Î¥Ñ¥¹¤Ë¤¢¤ï¤»¤ÆÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£ program:isucon_perl ¤Î command ¹Ô¤Ë¤Ï²¿¥ö½ê¤«¤ËËä¤Þ¤Ã¤Æ¤¤¤ë¤Î¤Ç½¤ÀµÏ³¤ì¤¬¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¤Þ¤¿ user ¤â²¿¥ö½ê¤«¤Ë¤¢¤ê¤Þ¤¹¤¬¡¢¤³¤ì¤Ï¤¢¤Ê¤¿¤Î¥æ¡¼¥¶Ì¾¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
Êѹ¹¤¬½ª¤ï¤Ã¤¿¤é sudo supervisord -n ¤È¤¹¤ë¤È¡¢¤½¤ÎüËöÆâ¤Ç supervisord ¤¬Î©¤Á¾å¤¬¤ê master.js ¤È agent.js ¤ª¤è¤Ó perl ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¤¹¤Ù¤Æµ¯Æ°¤·¤Þ¤¹¡£²¿¤«½¤Àµ¥ß¥¹¤Ê¤É¤¬¤¢¤ì¤Ð¤³¤Î¤È¤¤Ë¥¨¥é¡¼¤Ë¤Ê¤ë¤Î¤Ç¡¢Ã¼ËöÆâ¤Ëɽ¼¨¤µ¤ì¤ë supervisord ¤Î¥¨¥é¡¼¥í¥°¡¢¤¢¤ë¤¤¤Ï /tmp/isucon.perl.log ¤ä /tmp/isucon.master.log ¤Ê¤É¤È¤·¤ÆºîÀ®¤µ¤ì¤ë³Æ¥Ä¡¼¥ë¤Î¥í¥°¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
¤µ¤é¤Ã¤È½ñ¤¤¤Æ¤¤Þ¤·¤¿¤¬¡¢master/agent¤È¤Ï°Ê²¼¤Î¤è¤¦¤ÊÌò³ä¤Î¥×¥í¥°¥é¥à¤Ç¤¹¡£
- master
- ¥Ù¥ó¥Á¥Þ¡¼¥¯¤Î¥¹¥³¥¢¤ò³Æ¥Á¡¼¥à¤Ë¤Ä¤¤¤Æɽ¼¨¤·¤¿¤ê¡¢¥Ù¥ó¥Á¥Þ¡¼¥¯¤Îµ¯Æ°¤ò»Ø¼¨¤·¤¿¤ê¤¹¤ë¤¿¤á¤Î¥Ä¡¼¥ë
- µ¯Æ°¤·¤Æ¤¤¤ì¤Ð http://localhost:3080/ ¤Ç¥¢¥¯¥»¥¹¤Ç¤¤ë
- agent
- master¤«¤é¤Î¥Ù¥ó¥Á¥Þ¡¼¥¯µ¯Æ°¤Î»Ø¼¨¤ò¼õ¤±¼è¤Ã¤Æ bench.js ¤ò¼Â¹Ô¤·¤¿¤ê¡¢¥Ù¥ó¥Á¥Þ¡¼¥¯¤ÎÁö¹Ô¾õ¶·¤¬¤É¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤«¤òÊó¹ð¤·¤¿¤ê¤¹¤ë¤¿¤á¤Î¥Ä¡¼¥ë
- Æä˥٥ó¥Á¥Þ¡¼¥¯¤ò¤«¤±¤ë¦¤òÊ£¿ôÂæ¤Î¥µ¡¼¥Ð¤Ëʬ»¶¤·¤¿¤ê¤¹¤ë¾ì¹ç¤Ë¤³¤Î¤è¤¦¤Ê¤â¤Î¤¬É¬Í×
- ¿Í¤¬Ä¾Àܸ«¤é¤ì¤ë²èÌ̤Ϥʤ·
supervisord ¤òµ¯Æ°¤·¤ÆÌäÂê¤Ê¤¯³Æ¥×¥í¥»¥¹¤¬¾å¤¬¤ë¤è¤¦¤Ë¤Ê¤ì¤Ð¡¢¤¢¤È¤Ï¤â¤¦ sudo supervisord ¤À¤±¤Çµ¯Æ°¤·¤Æ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤Ë¤¤¤Ã¤Æ¤â¤é¤Ã¤Æ¤âÂç¾æÉפǤ¹¡£
supervisord ·Ðͳ¤Ç³Æ¥×¥í¥»¥¹¤¬Ìµ»ö¤Ëµ¯Æ°¤·¤Æ¤¤¤ì¤Ð¡¢°Ê²¼¤Î¤è¤¦¤Ë¡ÖµÏ¿¤Ê¤·¡ª¡×¤Ê²èÌ̤¬½Ð¤Æ¤¤Þ¤¹¤Í¡£¥Á¡¼¥à¤¬¤Ò¤È¤Ä¤Ê¤Î¤Ï¤Á¤ç¤Ã¤È¤µ¤Ó¤·¤¤¤Ç¤¹¤¬¡¢¤ª¤Ò¤È¤êÍÍÍѤʤΤǤ·¤ç¤¦¤¬¤¢¤ê¤Þ¤»¤ó¡£
"idle" ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¥Ù¥ó¥Á¥Þ¡¼¥¯¤òµ¯Æ°¤Ç¤¤Þ¤¹¤Î¤Ç¡¢½é´ü¥Ñ¥¹¥ï¡¼¥É "pass" ¤òÆþÎϤ·¤Æ "START" ¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¾õÂÖ¤¬ "running" ¤È¤Ê¤ê¤Þ¤¹¡£Ìµ»ö¥Ù¥ó¥Á¥Þ¡¼¥¯¤¬´°Áö¤·¤¿¤é¥Á¡¼¥à̾¤ÎÉôʬ¤¬ÀĤ¯¤Ê¤ë¤ÈƱ»þ¤Ë¥¹¥³¥¢¤¬É½¼¨¤µ¤ì¡¢¤µ¤¢¥Á¥å¡¼¥Ë¥ó¥°¤Î¤Ï¤¸¤Þ¤ê¤À¡ª
¤«¤¯¤·¤¢¤¸
¤³¤³¤Þ¤Ç¤Ç½é´ü¥Ç¡¼¥¿¤Î¤Ê¤¤ISUCON´Ä¶¤¬¤Ç¤¤Æ¡¢À®ÀӤοôÃͤâ½Ð¤Æ¤¤Þ¤·¤¿¡£6000¤È¤«¤¹¤´¤¤¥¹¥³¥¢¤Ç¤¹¤ÍISUCON¾å°Ì¤ËÆþ¤ì¤ë¤¸¤ã¤ó¡ª ¤È»×¤Ã¤¿¤¢¤Ê¤¿¡¢½é´ü¥Ç¡¼¥¿¤ÎƳÆþ¤ò¤ªËº¤ì¤Ç¤¹¤Í¡£
¥Ú¡¼¥¸ÀèƬ¤Î¥ê¥ó¥¯¤«¤é½é´ü¥Ç¡¼¥¿ isucon_db.sql.gz ¤ò¥À¥¦¥ó¥í¡¼¥É¤·¡¢Å¬Åö¤Ê¾ì½ê¤ËÃÖ¤¤¤Æ¤ª¤¤Þ¤¹¡£¼¡¤Î¤è¤¦¤Ê¥³¥Þ¥ó¥É¤Ç MySQL ¤ËÆɤ߹þ¤Þ¤»¤Þ¤·¤ç¤¦¡£
$ gzcat isucon_db.sql.gz | mysql -uroot
´°Î»¸å¤Ë¤½¤Î¤Þ¤Þ¤â¤¦¤¤¤Á¤É¥Ù¥ó¥Á¥Þ¡¼¥¯¤ò²ó¤·¤Æ¤ß¤ë¤È¡Ä¡Ä
¥¹¥³¥¢¤Ê¤ó¤È¤¿¤Ã¤¿¤Î58¡¦¡¦¡¦¡ª ²¶¤¿¤Á¤ÎISUCONºä¤Ï¤Þ¤À¤Ï¤¸¤Þ¤Ã¤¿¤Ð¤«¤ê¤À¡ª ¤È¤¤¤¦µ¤Ê¬¤Ë¤Ê¤ê¤Þ¤¹¤Í¡ª (¥µ¡¼¥Ð¤Ç¤ÎÆ°ºî¤È¤Ï¤¤¤¨)ISUCONÍ¥¾¡¥Á¡¼¥à¤¬1ʬ¤À¤È90,000¤Î¥¹¥³¥¢¤ò᤽Ф·¤Æ¤¤¤¿¤³¤È¤ò¹Í¤¨¤ë¤È¤É¤ì¤À¤±À褬Ť¤¤«¤¬¤ï¤«¤ê¤Þ¤¹¡£
¤Þ¤¿PC¤Ç¤Î¼Â¹Ô¤Ç¡¢¤«¤Ä¥Ù¥ó¥Á¥Þ¡¼¥¯Âоݤâ¥Ù¥ó¥Á¥Þ¡¼¥¯¸µ¤âƱ¤¸PC¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¡¢¥Ç¥Õ¥©¥ë¥È¤Î¾õÂ֤Ǥâ "FAILED" ¤È¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤½¤Îɽ¼¨¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤ß¤ë¤È¤³¤ó¤Ê¥À¥¤¥¢¥í¥°¤¬½Ð¤ë¤Î¤Ç³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
Íýͳ¤È¤·¤Æ¤ÏÉé²Ù¤ò¤«¤±¤¿¤È¤¤Ë¥µ¡¼¥Ð¤¬½Å²á¤®¤Æ¡¢É½¼¨ÆâÍƤΥÁ¥§¥Ã¥¯¤ò¹Ô¤¦¤¿¤á¤ÎHTTP¥ê¥¯¥¨¥¹¥È¤¬¤¼¤ó¤¼¤óÄ̤äƤʤ¤¤ó¤Ç¤¹¤Í¡£HTML¤ÎÆâÍƤò³Îǧ¤¹¤ë¤³¤È¤¬¤Ç¤¤º¡¢¥ì¥®¥å¥ì¡¼¥·¥ç¥ó¾å¤Î¥Á¥§¥Ã¥¯¤¬Ä̤é¤Ê¤¤¤¿¤á¡¢¤½¤Î¤Þ¤Þ FAILED ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
º¬ËÜŪ¤Ê¸¶°ø¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬½Å²á¤®¤ë¤³¤È¤Ç¤¹¤¬¡¢Æä˥ê¥Ð¡¼¥¹¥×¥í¥¥·¤ËApache¤òΩ¤Æ¤Æ¤¤¤Æ¡¢¤«¤Ä¥×¥í¥»¥¹¿ô¤¬¾¯¤Ê¤¤¤è¤¦¤Ê¾ì¹ç¤Ë¤³¤¦¤¤¤¦¤³¤È¤¬µ¯¤³¤ê¤Þ¤¹¡£¤ª»È¤¤¤Î´Ä¶¤Ç°Ê²¼¤Î¹àÌܤò¥Á¥§¥Ã¥¯¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
- Apache ¤Î¥×¥í¥»¥¹¿ô¤¬¾¯¤Ê¤¹¤®¤ë¿ô¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¤«
- Apache ¤ÎÀßÄê¤Ç keepalive ¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¤«
- »²¹Í: ¥Á¡¼¥ÈÂкö¤Èhttp_load¤Ë»Å³Ý¤±¤¿æ«¤ÎÏà #isucon
- Mac OSX ¤ÎApache2¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç͸ú¤Ê¤Î¤ÇÃí°Õ¡ª
- ¤½¤â¤½¤âÈóÎϤ¹¤®¤ë¥Þ¥·¥ó¤Ç¼Â¹Ô¤·¤Æ¤¤¤Ê¤¤¤«
¤É¤¦¤·¤Æ¤âFAILED¤¬¾Ã¤»¤Ê¤¤¾ì¹ç¡¢°Ê²¼¤ÎÂкö¤òÊ£¹ç¤¹¤ì¤Ð¤È¤ê¤¢¤¨¤ºÄ̤ë¤è¤¦¤Ë¤Ê¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
- ¥ê¥Ð¡¼¥¹¥×¥í¥¥·¤ÎApache¤ò»È¤¦¤Î¤ò¤ä¤á¤Æ¥Ù¥ó¥Á¥Þ¡¼¥¯¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËľÀܸþ¤±¤ë
- tools/config.json ¤ÎÊѹ¹¤ò¹Ô¤¦¤³¤È
- PerlÈÇ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¤ä¤á¤ÆNode.jsÈǤò»È¤¦
- ¥¢¥×¥ê¥±¡¼¥·¥ç¥óñÂΤǤιâÉé²ÙÂÑÀ¤ÏNode.jsÈǤÎÊý¤¬Îɤ¤¤Ç¤¹
- supervisord.conf ¤ÇPerlÈÇ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÀßÄꥻ¥¯¥·¥ç¥ó¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤·¡¢Node.jsÈǤΦ¤Î¥³¥á¥ó¥È¥¢¥¦¥È¤ò³°¤·¤Æ¤«¤é supervisord ¤òµ¯Æ°¤·¤Þ¤¹
- ³Æ¼ï¥Ñ¥¹¤Î½¤Àµ¤Ëµ¤¤ò¤Ä¤±¤Æ¤ä¤Ã¤Æ¤¢¤ì¤Ð¡¢¤½¤Î¤Þ¤Þµ¯Æ°¤¹¤ë¤Ï¤º¤Ç¤¹
¤µ¤Æ¡¢¼Â¤Ï¤³¤Î¡Ö¤ª¤Ò¤È¤êÍÍÍѡפÎÀßÄê¤Ï http_load ¤ÎÊÂÎóÅÙ¤ò¤ï¤¶¤È2¤ËÍî¤È¤·¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï½é´ü¾õÂ֤ǤΥ٥ó¥Á¥Þ¡¼¥¯¤¬Ä̤ê¤ä¤¹¤¯¤¹¤ë¤¿¤á¤Ç¤¹¤Í¡£¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤¬½½Ê¬¤Ë¹â¤¤´Ä¶¤Ç¤ÏÊÂÎóÅ٤Ϥâ¤Ã¤È¾å¤²¤¿Êý¤¬¥¹¥³¥¢¤Ï¾å¤¬¤ê¤Þ¤¹¡£
ISUCONËÜÀï¤Ç¤Ï http_load ¤ÎÊÂÎóÅÙ¤Ï 10 ¤È¤¤¤¦ÀßÄê¤Ë¸ÇÄꤷ¤Æ¤¢¤ê¤Þ¤·¤¿¡£¤¢¤Ê¤¿¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¹â¥¹¥³¥¢¤ò᤽Ф¹¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¿¤é¡¢¤³¤Î¿ôÃͤËÌᤷ¤Æ¤ß¤Æ¤â¤¤¤¤¤Ç¤·¤ç¤¦¡£tools/bench.js ¤Î9¹ÔÌܤòÊѹ¹¤·¤Æ¤ª»î¤·¤¯¤À¤µ¤¤¡£
¤Ç¤¤¢¤¬¤ê
¤³¤ì¤Ç´Ä¶¤Ï´°À®¤Ç¤¹¡£»×¤¦Â¸Ê¬¤Ë¤¢¤Ê¤¿¤ÎISUCON¤ò¤ª³Ú¤·¤ß¤¯¤À¤µ¤¤¡ª ¹âÆÀÅÀ¤ò¥²¥Ã¥È¤Ç¤¤¿¤éblog¤Ê¤É¤Ë½ñ¤¤¤Æ¤¤¤¿¤À¤±¤ë¤È²æ¡¹¤â¤È¤Æ¤â´ò¤·¤¤¤Ç¤¹¡£
¥é¥¤¥Ö¥É¥¢¤Ç¤ÏISUCON¤È³Ú¤·¤¯·ã¤·¤¯³ÊÆ®¤Ç¤¤ë¥¨¥ó¥¸¥Ë¥¢¤òÊ罸¤·¤Æ¤¤¤Þ¤¹¡ª