(2008/6/14 13:30 追è¨)
ï¼ï¼ï¼ã注æäºé
ãï¼ï¼ï¼
ãã®è¨äºã®å
容ã¯å¤ãã誤ããããã¾ãã
ãã¡ãã®ææ°è¨äºããèªã¿ãã ããã
http://d.hatena.ne.jp/shiumachi/20080614/1213415948
(2008/6/9 7:00 追è¨)
kosakiããããatime å¨ãã®ãã¦ã³ããªãã·ã§ã³(noatime, nodiratime, relatime)ã«ã¤ãã¦è©³ãã解説ããã¦ãã¾ã(該当記事)ã
thanx!
(2008/6/9 21:00 追è¨)
id:dankogai ããfindã«ããæ¤è¨¼æ¹æ³ã®ä¸åãææãã¦ä¸ããã¾ãã(該当記事)ã
ã¾ããkosakiããããã®ä»¶ã«ã¤ãã¦è£è¶³ãã¦ããã¾ãã(該当記事)
thanx!
è¦ç´
ITPro æ²è¼ã®ãã¥ã¼ãã³ã°è¨äºã«æ¸ããã¦ããã
ãmount ãªãã·ã§ã³ã« noatime ãªãã·ã§ã³ãä»å ããã¨èªã¿è¾¼ã¿é度ãåã«ãªãã
ã¨ããæ
å ±ã«ã¤ãã¦æ¤è¨¼ãè¡ã£ãã¨ãããç§ã®ç°å¢(Core 2 Duo(2.2GHz),ã¡ã¢ãª2GB,Fedora8)ã§ã¯
æ§è½å·®ã確èªãããã¨ãã§ãã¾ããã§ããã
ã¾ããã¯ã¦ãã®ã³ã¡ã³ããå
ã« relatime ãªãã·ã§ã³ãä»å ãã¦æ¤è¨¼ãè¡ã£ãã¨ããããã¡ãã
æ§è½åä¸ã¯è¦ããã¾ããã§ããã
(2008/6/14 13:30 追è¨)
æ¤è¨¼æ¹æ³ãã®ãã®ãééã£ã¦ãããããä¸è¨ã®å
容ã¯èª¤ã£ã¦ãã¾ãã
こちらの記事ããèªã¿ãã ããã
èæ¯
å
æ¥ãITPro ã« Linux ã®ãã¥ã¼ãã³ã°ã«é¢ããè¨äºãæ²è¼ããã¦ãã¾ãã*1ã
ãããã¯ã¦ãªããã¯ãã¼ã¯ã®ã³ã¡ã³ã*2ãèªãã¨ãã©ãããè¨äºã¯ç¸å½å¤ãã¨ã®ãã¨ã
確ãã« ITPro ã®è©²å½ãã¼ã¸ã®ä¸é¨ã«ããã®è¨äºã2002å¹´4æå·ã®ãã®ã§ããã¨ãã注ææ¸ããããã¦ãã¾ãã
ã¾ããkosakiããã®ããã°ã§ããã®è¨äºã«å¯¾ãããã¾ãã«é
·ããã¨ããã³ã¡ã³ããããã¦ãã¾ãã*3ã
ã¨ã¯ããããã®è¨äºã®çå½ã確ãããã®ã«ã¯ã¦ããããã°ã®ã¡ãã£ã¨ããã³ã¡ã³ããéµåã¿ã«ããã®ã¯ãã¾ãã«å±éºã§ãã
ã¨ããããã§ã軽ãæ¤è¨¼ãè¡ã£ã¦ã¿ããã¨ã«ãã¾ããã
ãã®éãã©ãããããªãã¨ãã¯ã¦ã㧠id:kinaba ãã³ã¡ã³ããã¦ãã relatime ãªãã·ã§ã³ãæ¤è¨¼ãã¦ã¿ããã¨ã«ãã¾ããã
æ¤è¨¼æ¹æ³
ä»åç¨æããç°å¢ã¯ä»¥ä¸ã®éãã§ãã
ãã¼ãã¦ã§ã¢ | Thinkpad X61 |
CPU | Core 2 Duo T7500(2.20GHz) |
ã¡ã¢ãª | 2048MB |
OS | Fedora 8(x86) |
ã«ã¼ãã«ãã¼ã¸ã§ã³ | 2.6.24.5-85.fc8 |
ã©ã³ã¬ãã« | 5 |
ã©ã³ã¬ãã«ãè¨è¼ãã¦ããã®ã¯ãèµ·åæéã測å®ããããã§ãã
æ¤è¨¼ãã¿ã¼ã³ã¯ä»¥ä¸ã®éãã§ãã
ãã¿ã¼ã³çªå· | çç¥è¡¨è¨ | å 容 |
1 | ããã©ã«ã | /bootã¨ããã®ä»å ¨ã¦ã®ãã¼ãã£ã·ã§ã³(ã¨ãã£ã¦ã/ã®ã¿)ãå«ãè«çããªã¥ã¼ã ã®ãªãã·ã§ã³ã defaults ã¨ãã |
2 | noatime | /bootã¨ããã®ä»å ¨ã¦ã®ãã¼ãã£ã·ã§ã³(ã¨ãã£ã¦ã/ã®ã¿)ãå«ãè«çããªã¥ã¼ã ã®ãªãã·ã§ã³ã defaults,noatime ã¨ãã |
3 | relatime | /bootã¨ããã®ä»å ¨ã¦ã®ãã¼ãã£ã·ã§ã³(ã¨ãã£ã¦ã/ã®ã¿)ãå«ãè«çããªã¥ã¼ã ã®ãªãã·ã§ã³ã defaults,relatime ã¨ãã |
æ¤è¨¼æ¹æ³ã¯ä»¥ä¸ã®éãã§ãã
æ¤è¨¼çªå· | å 容 |
1 | é»æºæå ¥ãã¦ããGUIãã°ã¤ã³ç»é¢ã表示ãããã¾ã§ã®æéã測å®ããã |
2 | ã# time find /usr/ -name linuxããå®è¡ããfindã®å®è¡æéã測å®ããã |
(2008/6/14 13:00 追è¨)
ãã®æ¤è¨¼æ¹æ³ã«ã¯èª¤ããããããããã®æ¤è¨¼çµæãå©ç¨ããªããã
ãé¡ããããã¾ãã
æ¤è¨¼çµæ
èµ·åæé
èµ·åæéãå3åè¨æ¸¬ãã¾ããã
çµæã¯ä»¥ä¸ã®éãã§ãã
(測å®æéã®åä½ã¯å
¨ã¦ç§ã以ä¸åæ§)
åæ° | ããã©ã«ã | noatime | relatime |
1 | 76.0 | 75.0 | 74.0 |
2 | 75.0 | 73.0 | 74.0 |
3 | 75.0 | 74.0 | 75.0 |
å¹³å | 75.3 | 74.0 | 74.3 |
èµ·åæéæ¯è¼ | 100.0% | 98.2% | 98.7% |
findå®è¡æé
ã¾ããããã©ã«ãã§åä¸èµ·åæã«3å find ã³ãã³ããå®è¡ããçµæãè¨è¼ãã¾ãã
real, user, sysã«ã¤ãã¦ã§ãããã¨ãããã real ãå®éã«ããã£ãæéã ã¨
ç解ãã¦ãã ããã
user, sysã«ã¤ãã¦ã¯ man 2 times ãåç
§ãã¦ãã ããã
åæ° | real | user | sys |
1 | 80.533 | 1.031 | 2.370 |
2 | 0.741 | 0.345 | 0.396 |
3 | 0.719 | 0.325 | 0.394 |
ãã®ããã«ãåä¸èµ·åæã«è¤æ°åã³ãã³ããå®è¡ããã¨ã2åç®ä»¥éã®å®è¡æéã¯æ¥µç«¯ã«çããªãã¾ãã
ããã¯ãããããã£ãã·ã¥ãèªã¿è¾¼ãã§ãããã ã¨æããã¾ããã詳ããåä½ã¯ãããã¾ããã
(ç¥ã£ã¦ã人ããããæãã¦ã»ãã)
ã¨ããããä»åã¯ãã1èµ·åæ1åã®è¨æ¸¬ã3åå®æ½ãããã¨ããæ¹å¼ãã¨ããã¨ã«ãã¾ãã
ã§ã¯ã以ä¸çµæãè¨è¼ãã¾ãã
ããã©ã«ãæã®å®è¡æéã®çµæã¯ä»¥ä¸ã®éãã§ãã
åæ° | real | user | sys |
1 | 80.533 | 1.031 | 2.370 |
2 | 80.410 | 1.042 | 2.286 |
3 | 82.685 | 1.006 | 2.243 |
å¹³å | 81.209 | 1.026 | 2.300 |
noatimeãªãã·ã§ã³ä»å æã®å®è¡æéã®çµæã¯ä»¥ä¸ã®éãã§ãã
åæ° | real | user | sys |
1 | 80.684 | 1.007 | 2.373 |
2 | 81.239 | 0.952 | 2.363 |
3 | 80.836 | 0.991 | 2.296 |
å¹³å | 80.920 | 0.983 | 2.344 |
relatimeãªãã·ã§ã³ä»å æã®å®è¡æéã®çµæã¯ä»¥ä¸ã®éãã§ãã
åæ° | real | user | sys |
1 | 80.941 | 0.997 | 2.379 |
2 | 83.248 | 0.973 | 2.273 |
3 | 108.841 | 1.037 | 2.244 |
4 | 89.145 | 0.949 | 2.240 |
å¹³å | 90.544 | 0.989 | 2.284 |
ãã®æ¤è¨¼ã®ã¿4åã®è¨æ¸¬ãè¡ã£ã¦ãã¾ãããããã¯3åç®ã®å®è¡æéãç°å¸¸ã«é·ãã£ãããã§ãã
æå¾ã«ã3ãã¿ã¼ã³ã®å¹³åå®è¡æéã®æ¯è¼çµæãè¨è¼ãã¾ãã
ããã©ã«ã | noatime | relatime | |
å¹³åå®è¡æéæ¯è¼ | 100.0% | 99.6% | 111.5% |
èå¯
èµ·åæéã®æ¯è¼ã«ã¤ãã¦ã§ãããããã©ã«ã㨠noatime, relatimeãªãã·ã§ã³ä»å æã¨ã®éã«ã¯
ã»ã¨ãã©å·®ãããã¾ããã§ããã
ç´1ç§ãç´1%ã®èµ·åæéã®å·®ãã©ããã¦ãæ°ã«ãªã人以å¤ã«ã¯ããã®ãªãã·ã§ã³ã¯ç¡æå³ã ã¨
æè¨ãã¦ããã§ãããã
ã¾ããfind å®è¡æéã§ããããã¡ãã¯ããã©ã«ã㨠noatime ã®éã«ã¯ã»ã¨ãã©å®è¡æéã®å·®ããªãã
relatime ã¯ãããããã©ã«ãæãããå®è¡æéãé·ããªã£ã¦ãã¾ãã¾ããã
ãã®åå ã¯ä¸æã§ãããããããããããã¯ã°ã©ã¦ã³ãã§ä½ããã®å¥ã®ã¿ã¹ã¯ãå®è¡ããããªã©ã
ã·ã¹ãã ã®æ§è½ãè½ã¨ãè¦å ããã£ãã®ããããã¾ããã
ä»åã®æ¤è¨¼çµæããã¨ã«ãrelatime ãªãã·ã§ã³ãä»å ããã¨æ§è½ãè½ã¡ããã¨è¨ããã¨ã¯
ã§ãã¾ããããä»ã®çµæãè¦ãéã relatime ãªãã·ã§ã³ä»å æã® find å®è¡æéãããã©ã«ãæã®ããããã
極端ã«çããªãã¨ãããã¨ã¯ãããããªãã§ãããã
(2008/6/10 0:00 追è¨)
2.6.24ããã®æ°ãªãã·ã§ã³ default_relatime ãæ©è½ãã¦ããããããã¦ã³ããªãã·ã§ã³ã¤ããªãã¦ã relatime ã¤ãã§ãã¦ã³ããã¦ãã¾ãã
ãã£ã¦ãã®èå¯ã¯èª¤ã£ã¦ãã¾ãã
詳細ã¯こちらの記事ã§ã
çµè«
ä»åã®æ¤è¨¼çµæããã¯ãããã©ã«ã㨠noatime, relatimeãªãã·ã§ã³ä»å æã®ãã£ã¹ã¯èªã¿è¾¼ã¿æ§è½ã«
ææãªå·®ãããã¨ã¯èªãããã¾ããã§ããã
noatime ã relatime ã¯ããã©ã«ãã§è¨é²ãããã¯ãã®æ
å ±ãè¨é²ãããªããªãã®ã§ããã®ãã¨ãæ¬å½ã«
ã·ã¹ãã å
¨ä½ã«å½±é¿ãåã¼ããªãã¨ã¯èª°ã«ã証æãããã¨ãã§ãã¾ããã
ã§ãããããã¾ãå°éç¥èã®ãªãæ¹ãåã«æ§è½ãä¸ãããã¨ããçç±ã ãã§ãããããªãã·ã§ã³ã«æãåºãã®ã¯
æãã¬ã·ã¹ãã ã®ä¸å
·åãçããå¯è½æ§ãããã®ã§æ¢ããæ¹ãããã§ãããã
(å¤å大ä¸å¤«ã ã¨ã¯æãã¾ããã©ã)
ãããªãçå®ãæ±ãã¦
ä»åã®æ¤è¨¼ã¯æ¬å½ã«è»½ãè¡ã£ãã ãã§ãã®ã§ãééããªãè²ã
ã¨ç©´ãããã¾ãã
èå³ã®ããæ¹ã¯è¿½è©¦ããã¦ã¿ã¦ãã ããã
ãã®éã以ä¸ã®ç¹ãå¤æ´ãã¦è¿½è©¦ãã¦ããã ããã¨ããçå®ã«è¿ãæ
å ±ãå¾ãããã¨æãã¾ãã
- ç°å¢ãå¤ãã(CPU,ã¡ã¢ãª,OS,ã«ã¼ãã«ãã¼ã¸ã§ã³, etc...)
- è¨æ¸¬æ¹æ³ãå¤ãã(ç¹ã«ããå¤ãã®ãã¡ã¤ã«ãæ±ãæ¹æ³ã«ããã¨æç¨ãªæ å ±ãå¾ãããã¯ã)
- è¨æ¸¬åæ°ãå¤ãã(çµ±è¨ãå°ãã§ãããã£ã¦ã人ãªãã3åã¨ããæ°åã以ä¸ã«ç¡æå³ããããã§ããã)
è£è¶³ï¼noatime 㨠relatime
relatime ãªãã·ã§ã³ãæ¥æ¬èªã® mount ã® man ã«ã¯è¨è¼ããã¦ããã¾ããã
ã¨ãããã¨ã§ãªãªã¸ãã«ã® mount ã® man ãèªãã§è»½ã訳ãã¦ã¿ã¾ããã
(誤訳ãã¦ããææãã¦ãã ãã)
relatime
ä¿®æ£æå»ãå¤æ´æå»ã«å¯¾ãã inode ã¢ã¯ã»ã¹æå»ãæ´æ°ããã
ã¢ã¯ã»ã¹æå»ã¯ååã®ã¢ã¯ã»ã¹æå»ãç¾å¨ã®ä¿®æ£æå»ã¾ãã¯æ´æ°æå»ããæ©ãã£ãå ´åã®ã¿æ´æ°ãããã
(noatime ã¨ä¼¼ã¦ããããmutt ãªã©ã®æå¾ã«ãã¡ã¤ã«ãä¿®æ£ããã¦ãããã®ãã¡ã¤ã«ã
èªã¾ãããã©ãããç¥ãå¿ è¦ãããã¢ããªã±ã¼ã·ã§ã³ã®åããä¸æããªã)
ã¨ããããã§ãman ãèªãéã noatime ã使ããã㯠relatime ã使ã£ãæ¹ãããããã§ãã