èªç¤¾ã®ããã°ãµã¼ããè½ã¨ããè岡ã§ãã
ãµã¼ããè½ã¨ããç¿æ¥ã¯ç¤¾å¡ã®è¦ç·ãåºãããããªæè¦ãããã¾ããããæè¿ã§ã¯ãã¯ã¤ã«ããã¨ããè¨èèªä½ã社å
ã§æµ¸éãã¦ããæãããã¾ãã
ã¤ã¾ããã»ã¨ã¼ãã¯å·ããã¨ããäºã§ãã
ããã¯ä¸ç´ç¤¾ä¼äººã®ãåé¡ãå¯ããããã¨ããé«çæè¡ãæããæ¥ã§ãåãããã®ä½¿ãæã«ãªãã¨
"åé¡ããã£ããã©ããæãåºããªã"ã¾ã§ã³ã³ããã¼ã«ããäºãå¯è½ã«ãªãã¾ãã
ãã ãè¡è
ã®åãããæãåºããªããªã£ã¦ãã¾ããããªæ°ãããã®ã§ãå½æ¥ã«èµ·ããäºã¨å¯¾å¿(ãã¦ãããæ¹ãããã¨ã)ãè¨é²ãã¦ä»å¾ã«ã¤ãã¦èãããã¨æãã¾ãã
èµ·ãããã¨
å½ç¤¾æè¡ããã°ãµã¼ãã¸HTTPã¢ã¯ã»ã¹ãéä¸ããé«è² è·ã§æ¥ç¶ãã¥ããç¶æ
ã«ãªã£ã
å½æã®æ§å
H_Shinonomeãããå½æã®Twitterã§ã®æ§åãã¾ã¨ãã¦ä¸ããã¾ããã
æç³»å
4æ11æ¥ 15:20é
æè¡ããã°ãæ¸ãçµãã¦Twitterã¸ããã°ãæ¸ããæ¨ãåç¥
ããã°æ¸ãã¾ãã / AWSãã¯ã¤ã«ãã«ä½¿ã£ã¦ã¿ã « ãµã¼ãã¼ã¯ã¼ã¯ã¹ ã¨ã³ã¸ãã¢ããã° blog.serverworks.co.jp/tech/2012/04/1â¦
â ãªã¼ãã¼ãã (@iara) 4æ 11, 2012
åæ¥ 15:28
äºæ³å¤ã®ã¢ã¯ã»ã¹å¢
ããã°ãµã¼ããç£è¦ãã¦ãããµã¼ãããhttpç£è¦å¤±æ(ã¿ã¤ã ã¢ã¦ã)ã®è¦å
åæéã®LoadAverageã¯61ãè¨é²ãWordpressããã¬ã¹ãã³ã¹ãè¶
絶é
ããªã
åæ¥ 15:40é
m1.smallã®éçãæãã¦m1.mediumã¸ã¹ã±ã¼ã«ã¢ãã(32bitã®ãã)
è¥å¹²ã®æ¹åã¯è¦ããããæéãçµéãããã¨ã«æ¬¡ç¬¬ã«ã¬ã¹ãã³ã¹ãé
ããªã
åæ¥ 16:00é
å¤åºã®äºå®ããã£ãã®ã§è岡ã¯ä¼ç¤¾ãé¢è±
ãã®å¾ã18:00é ã¾ã§LoadAverageã10ä»è¿ãããã¡ãã
åæ¥ 19:00é
ã¢ã¯ã»ã¹ãè½ã¡çãã¦LoadAverageã1以ä¸ã«ãªãã
ãã¼ã¸ãæ£å¸¸ã«è¡¨ç¤ºãããã®ã§å¾©æ§å®£è¨ã
åå
- è岡ã®å½±é¿åãä¼ç¤¾å´ãçãè¦ç©ãã£ã¦ãã
- èªåã®å½±é¿åãèªåãçãè¦ç©ãã£ã¦ãã
- æ³å®ãè¶ ããã¢ã¯ã»ã¹æ°ã«æºåãåºæ¥ã¦ããªãã£ã
- Wordpressãåã³ããã«ã¦ã§ã¢ã®ãã¥ã¼ãã³ã°ãçãã£ã
対å¿
åãã¢ã¯ã¢ã¯ãããã¿ãã³ãå¸ã£ã¦ããéã«è²ã
ã¨å¯¾å¿ãã¦ããã¾ããã
å½ç¤¾ã®ã¨ã³ã¸ãã¢ã¯æãæ©ãã§ãã
1. ã¹ã±ã¼ã«ã¢ãã
ããã°ãµã¼ãã¯m1.small(32bit)ã§ç¨¼åãã¦ãã¾ããããå¿çããªããªã£ã¦ããã«m1.medium(32bit)ã«ã¹ã±ã¼ã«ã¢ãããã¾ããã
ãããããããæéã®åé¡ã
ããã«è² è·ãé«ã¾ãã¬ã¹ãã³ã¹ã«æéããããç¶æ
ã«æ»ã£ã¦ãã¾ãã¾ããã
2. MySQL
MySQLã¯query_cacheãæå¹ã«ãã¾ããã
ããããã¢ã¯ã»ã¹ãå¤ãæé帯ã«è¨å®å¤æ´ãåæ ããããã®ã¯æãã®ã§å°ãè½ã¡çããæé帯ã«è¨å®ãå¤æ´ãã¾ããã
å¤æ´ããé¨åã¯ä»¥ä¸ã
$ diff -u /etc/my.cnf /etc/my.cnf.bk --- /etc/my.cnf +++ /etc/my.cnf.bk -[mysqld] -query_cache_limit=1M -query_cache_min_res_unit=4k -query_cache_size=24M -query_cache_type=1
ã§ãããããªã«å¹æã¯ãªãã£ãã¿ããã§ãã
3. PHP
PHPã¯apcãæå¹ã«ãã¾ããã
$ diff -u php.ini php.ini.bk --- php.ini +++ php.ini.bk -[apc] -extension=apc.so
4. Apache
mod_cacheãæå¹ã«ãã¾ããã
å¤æ´ããã¾ããªãç»åããã£ãã·ã¥ããäºã§è¡¨ç¤ºãé«éåãã¦ãã¾ãã
5. Wordpress
ãã£ãã·ã¥çã®ãã©ã°ã¤ã³ãå°å
¥ããã¦ããªãã£ãã®ã§ä»¥ä¸ã®ãã©ã°ã¤ã³ãå°å
¥ãã¾ããã
ä¸è¨ã®å¯¾å¿ã§ã¬ã¹ãã³ã¹ãããªãæ¹åãããããã§ãã
æ®å¿µãªäºã«ä»¥åã®ç°å¢ã§ã®ã¬ã¹ãã³ã¹ã¿ã¤ã ãè¨æ¸¬ãã¦ããªãã£ãã®ã§åçããã©ã¼ã¢ãã¿ã¼ã®æ°å¤ã¯è¦ãã¾ããã
ãã£ããã®æ°åã ã¨ãæ¹ååã¯ã¬ã¹ãã³ã¹ã1ç§ã2ç§ãæ¹åå¾ã¯1ç§æªæºã¨ããæãã§ãã
ã³ã³ãã¸ãã®æ§è½ç£è¦ã追å ããªãã¨ãããªãã§ããã
ä»å¾ã®å¯¾ç
ããããèªåãå
¨ã¦è¨å®ãããã®ããã«æ¸ãã¦ãã¾ãããåã¯å¤åºãã¦ããããã®ã¾ã¾ç´å¸°ãã¦å®¶ã§ã飯é£ã¹ã¦å¯ã¦ãããã¦ããã®ã§ä½ãæãåããã¦ãã¾ããã
ä¼ç¤¾ã®ã¿ããªã«åã®ãã«ãã£ã«ãã£ã«ãã£â¦ããã¿ã¼ã³ï¼ï¼ããè¦ããããªãã£ãã®ãã¡ãã£ã¨ã ãæãã¾ãã¾ãã
ç¾ç¶ã¯ä¸æçãªå¯¾å¦ãªã®ã§ãä»å¾ã¯MySQLãRDSã«ç§»è¡ããã¨ããç»åãã¡ã¤ã«ãS3ããã£ãã·ã¥ãµã¼ãã«æãããã¨ãã64bitåããã¨ããELBãå
¥ãã¦å®¹æã«ã¹ã±ã¼ã«ã¢ã¦ãåºæ¥ãæ§æã«ããã¨ããã·ã³ã¬ãã¼ã«ã§ç¨¼åãã¦ããã®ã§æ±äº¬(è¿ã)ã«å¼ã£è¶ãã¨ãããªãã¹ãè²»ç¨ããããã«é«è² è·ã«ãèããããæ§æãå¦æ³ãã¦æ¥½ããã§ãã¾ãã
ã¾ã¨ã
ä»åãã¢ã¯ã»ã¹ãéããäºã§ä¼ç¤¾ããè¤ãããããã¨æããããµã¼ããè½ã¡ã¦ãã¾ã£ãäºã§ä¼ç¤¾ã¨ãã¦ããã©ããªé¡ããã¦è¯ããåãããªãã®ãã¨ããç¶æ
ã§ããã
ãç¬ãã°è¯ãæãããã¨åã¾ã§åºããã£ãã®ã§ãããä¸å¸ããã®ãããªããã¯ãã§ã代ããã¯ãããã®ãã¨ããé»æ³¢ãåä¿¡ããã®ã§ã°ãã¨å ªãã¾ããã
ã¨ãã訳ã§ãåã¯åã°ãã¿æ
å½ã«ãªã£ã¦ãããããªã®ã§ãããããã©ãã©ããã¿ãåºãã¦ããã°ãµã¼ããæ²é³´ããããç¨ã¢ã¯ã»ã¹ãéãããã¨æã£ã¦ãã¾ãã
ã¤ã¾ãã¾ã£ããåçãã¦ãã¾ããã
ã¦ã½ã§ããã¡ãã£ã¨åçãã¦ãã¾ãã