ã¯ããã«
ã¾ããã¯ããã«çããã¸è¨ã£ã¦ãããããã¨ãããã¾ãã
ãã®ããã¥ã¡ã³ãã®ç®çã¯çãããããæ°ã«ããã¦ä¸å¿ä¸ä¹±ã«ã³ã¼ããæ¸ãã¾ãã£ã¦æ°æ©è½è¿½å ãæ¹åããã¦ã½ããã¦ã§ã¢ãéçºãã¦ãã£ã¦ã»ããã¨ããããã§ã¯ãªãã¨ãããã¨ã§ãã ãã¡ããããããªã£ã¦ãããã°å¬ããã§ããæ°åãå ¥ã£ãããããã°ã©ã ãæ¥ã«æ¸ããããã«ãªãããã§ã¯ãªãã®ã§ãã®ãããªç®çã¯ä¸åããã¾ãããã¾ãããã®æç« ã«ã¯ã¤ã³ãã©ã¨ã³ã¸ãã¢ãã³ã¼ããèªã¿æ¸ãã§ããªãã¦è¯ãã¨ããæå³ã¯ãªããã¸ã·ã§ãã³ã°ãã¼ã¯çã«SREã¨ããåèªãå©ç¨ãã¦ããã¾ãã®ã§ä½ãè¨ããªãã§ãã ããã
SREã¯ãããããã³ã¼ããæ¸ããªãã¦ãããã¨ã³ã¸ãã¢ã§ã¯ãªã
SREã¨ã¯ãITãµã¼ãã¹ã®ä¿¡é ¼æ§ãé«ããããã«ãITã¨ã³ã¸ãã¢ï¼éçºè ï¼ãä¿¡é ¼æ§åä¸ã®ããã«è¡ãè¨è¨ãã¢ããã¼ããã¾ãã¯ããããè¡ããã¼ã ãå½¹å²ãæãã¾ãã
Google ã§ã¯ãSREãã¼ã ã®50ï½60%ã¯ãGoogle ã®ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ãã§ãæ®ãã®40ï½50%ã¯ãæ£è¦ã®ã¨ã³ã¸ãã¢ãäºåè»ãã ããä»ã®ã¡ã³ãã¼ã«ã¯æã£ã¦ããªãã¹ãã«ãæã£ã¦ããã¨ã³ã¸ãã¢(ã¤ã³ãã©æè¡ã«ç¹åãã人æ)ããé¸å®ãã¦ãã¾ãã
ããã¦ããã®ãã¼ã ã¯èªååã»çååããããã«ç©æ¥µçã«ããã°ã©ã ãæ¸ããSREããSystem Administratorãã§ã¯ãªãæ大ã®ç¹å¾´ã¯ãã·ã¹ãã ã®æ¡å¤§ã«ä¼´ããä¿å®éç¨å·¥æ°ãæ£æ¯ä¾ãã¦å¢å¤§ãããã¨ã®ãªãããã«ãèªåãã¡ã§ããã°ã©ã ãæ¸ãã¦ç©æ¥µçã«èªååã»çååãè¡ãã¾ãã
ãä»æ´ããããªãã¨ãè¨ãã¤ããã¯ãªããSREã§å¤§äºãªã¨ããã¯ããã§ã¯ãªãã大åãªã®ã¯å½¹å²ãå½¹è·ã¨ãã¦ã®SREã§ã¯ãªãSREã®ãã©ã¯ãã£ã¹ã§ããã¨æãããSREã®æ¢æ±ãã§ãããã¯ï¼è¨åããã¦ããã®ã§ç°è«ãããæ¹ã¯èªãã§ããè°è«ãã¾ãããã
ã¤ã³ãã©ã¨ã³ã¸ãã¢ããSREã«ãªãã¨ãããã¨
SREãâ ãã¤ã³ãã©ã¨ã³ã¸ãã¢
ã¨ããèªèã¯çããã«ãããã¨ã¯æãã¾ãããããããéçºåãçç¡ã§ã³ã¼ãã®èªã¿æ¸ããé¸æè¢ã«ãªããã°åé¡ãèµ·ããæã«æåãææ¡ãç¶ãããã°ãã¡ããªã¯ã¹ã§ã¨ãã¨ã確ããã¦ããã¾ããä½ãèµ·ãã¦ããäºå®ãã¼ã¹ã§å®å
¨ã«å¤ããã®æ¨è«ã ãã§ææ¡ããã¨ããã®ã¯é£ããããããã¯ä¸å®å
¨ã§ãã
ã³ã¼ããèªããªããã°åé¡ã解決ããã®ã¯ãã¤ãæ¬å½ã®å¶ç¶ããè¨ç»çãªå¶ç¶ãããããã¯ããããè¶ è¶ããçç·´è ã®ç´æã«ãããã®ãå¤ãã§ãããã¡ãããç´æã¯ç´ æ´ãããã§ãããªããªããçç·´è ã®ç´æã¯åé¡ãèµ·ããæã«ç´æã§å ¨ã¦ã®åé¡ãè¦ã¤ãã¦è§£æ±ºãã¦ããããã§ãããããã¯ãé«åº¦ã§æ¬äººã«ããè¨èªåä¸è½ã§æ¬å½ã«è¶ è½åè ã¿ããã§ããç§ã¯ãã®ãããªè½åãã¾ã æã¡åããã¦ããªãã§ããããåé¡ã¯èµ·ãã¦ãã¦è§£æ±ºã¯è¿«ããã¦ã¾ããç´æã身ã«ã¤ãããããªæéã¯ãããæ®ããã¦ãã¾ãããææ¥ã®æã«ã¯ãã®åé¡ã解決ãã¦ç´åããªããã°ãªãªã¼ã¹ã«éã«åããªãã解決ãæéçãªç®å¦ã¯ç«ã¦ãªããã°ãªãã¾ãããããã解決æ¹æ³ãã©ãã ãã§è§£æ±ºããããåãããªãã¨ãªãã°ããã¸ã§ã¯ãã«é¢ããã¡ã³ãã¼ã¯ä¸å®ã«ãªãã¨æãã¾ãã
èªç¤¾éçºã®ã½ããã¦ã§ã¢ã§ãèªç¤¾ã®ã¨ã³ã¸ãã¢ãæ¸ããã³ã¼ãããã°ãã®ã¨ã³ã¸ãã¢ãæå±ããçµç¹ã¸ã®ä¾é ¼ãããã°è¯ãã§ããããã§ããSREã¯èªç¤¾ã®ã½ããã¦ã§ã¢ã ãã§ã¯ãªãOSSã¨åãåã£ã¦ãããã¨ãå¤ãä¸å ·åãæ°è»½ã«ç¸è«ã§ããªãå ´åãå¤ãã§ããç§ã«èµ·ãã£ãä¸å ·åãè¨å®å¤ã«ãããã®ãªã®ãï¼ å®è£ ã«ãããã®ãªã®ãï¼ ãåãåããã§ããªããã°OSSã®Issue ãåºããã¨ãã§ãã¾ãããã¡ãªã¿ã«ãæåãµãã¼ãã§ã¯ããã®éãã§ã¯ãªãã¨æãã¾ã(æåãµãã¼ãããããªãé ¼ã)ã
ã½ããã¦ã§ã¢ãèªãããã¨ã§ãåé¡ãèµ·ããæã«ã³ã¼ããèªã¿å°½ããã¦ãè² è·è©¦é¨ãæ¬çªã§æåãææ¡ãç¶ãããã°ãã¡ããªã¯ã¹ã§ã¨ãã¨ã確ããã¦ããã°ã·ã¹ãã ã«å¯¾ãã解å度ãä¸ããã¾ããããã°ã©ã ãã¡ããã¨èªãã¦åå ã®ç¹å®ãä¿®æ£ãã³ã¼ãã¬ãã«ã§ã§ããããã«ãªãã¨ããé¸æè¢ã¯ç¢ºå®æ§ãé«ãã¾ãããã®ãããã½ããã¦ã§ã¢ã®éçºçµé¨ããªãã¨ã³ã¸ãã¢ã®ããã«OJTã«éçºçµé¨ã追å ãã¦ãããã£ãç´ å°ãæåã«ä½ã£ã¦ãããããã¨æã£ã¦ãã¾ãã
ã·ã¹ãã ã¸ã®è§£å度ãããã¦ã¨ã³ã¸ãã¢ã¨ãã¦ã®ã¬ãã«ãä¸ãã
åé¡ãèµ·ãã£ãããã°ãã¡ããªã¯ã¹ããæ å ±ãåéãã¦æ¨è«ãã¦å¯¾å¿ãã¦ãããã¨ãå½ããåã®ããã«éè¦ã§ãããããããéç¨ããã¦ãããããã§ã¯è§£æ±ºããªãåé¡ã«ã¶ã¤ãããã¨ãããããã®ããã以ä¸ã®ãããªç¿æ £ãæ¯éã身ã«ã¤ãã¦ã»ããã¨æã£ã¦ãã¾ããåé ç®ã«ã¤ãã¦ã¯ãã®ããã°ã§ã¯æ·±ãè¨è¼ãã¾ããããã²ãæ·±å ããã¦ã¿ã¦ãã ããã
1.ã³ã¼ãããã£ããèªã
- ã³ã¼ããèªããªããã°é害ãã¢ã©ã¼ãã®åå ãæçµçã«ç¥ã®æãã«ãªãã
- OSSã®åããä¸æè°ã ã£ãããå¤ããåä½ãæ¨æ¸¬ããããã³ã¼ããèªãã æ¹ã確å®
- æ¡ä»¶ã§ã³ã¼ããå ¬éããã¦ãããªãããããã³ã¼ããèªãã ã»ãã確å®
- ç¥æ§ã§ã¯ãªãéãèªãã ãã¨ã®ç¡ãã³ã¼ãã¯åãããªãã
- 天æã§ã¯ãªãéãèªãã ãã¨ã®ç¡ãã³ã¼ãã¯æ¸ããªãã
2.Strace ã§ã·ã¹ãã ã³ã¼ã«ã追ã
- Linux ã«ã¯ããããã»ã¹ãå¼ã³åºãã¦ãã system call ã確èªã§ããã³ãã³ãããã使ããã¨ããããã¨éå®ããã®ã§ä½¿ããããã«ãªãã¾ããã
- ä¾)ãã¼ããã·ã§ã³ã¨ã©ã¼ãçºçãããã©ããæªãã®ããã°ã«åºã¦ãã¦ãªãï¼ãããªã¨ãã«ã¯
Strace
ã ï¼ï¼ï¼ - æçµçã«ã¯Linux ããã°ã©ãã³ã°ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨æ è¡ã«è¡ãã¾ãããï¼
- ããã§ããã¡ãªãèµ·åããï¼ãããã¬ã¼(gdbã¨delve)ï¼
- CPUãã¡ã¢ãªã®ããã«ããã¯ã調æ»ããããã«ãããã¡ã¤ãªã³ã°ãã¼ã«(pprof ãªã©) ãå©ç¨ãã
3. ãããã¯ã¼ã¯ãã©ãã«æã¯TCPãã±ããã追ã
- ãã±ããã¯åéï¼ãã±ããã¯åãä»ãã¾ããï¼
- RSTãè¿ããã¦ããã¨ããå¿çèªä½ããã¦ããªããªã©ã®åãåããå¿ è¦
- ãã°ãã¡ããªã¯ã¹ã ãã§ã¯ã©ããã¦ã追ããããªãå ´åããã
4.æè¡ããã¥ã¡ã³ããæ¸ã
- æ¤è¨çµæã¯ãã¡ãããæ¤è¨éç¨ãæèãè¨é²ã«æ®ããã¨ã大äº
- è²ã ãªããæ¹ãããå ´åã«ã¯ããããã5ã¤ã®æ¹æ³ãã®ãããªæ¸ãæ¹
- æ§é å質ãä¿ã¤(æ§æãé©åããåèªãã¹ã¯ãªãããå£èª¿ã¯ããã£ã¦ããããææ³ã¯æ£ããããtextlintãããã¦ããããæ§æãã³ãã¬ã¼ãã«æ²¿ã£ã¦ããã)
- æ©è½å質ãä¿ã¤(ãµã¼ãã¹ããã¸ãã¹ã®ç¶ç¶ã«ä¾¡å¤ãçºæ®ã§ãã¦ãããï¼)
5. OSSã®ãã°ããã£ããå ±åãã
- OSS ã®ããã¥ã¡ã³ãã§ãè¯ãã®ã§ããªã¼ã©ã¤ãããããªã
- éçºåãå¿ è¦ã«ãªãã®ã§èº«ã«ã¤ã
- ãã¤ããä¸ç·ã«åãã¦ããããããããªã誰ããè¦ã¦ããããããªã
ãããã«
ã¨ãããããªç¤¾å ãã¨ã ãçèªããã¦ãããããããåå¿ãè¯ãã£ãã®ã§åç·¨éãã¦ããã°ã«ãã¦ããã¾ããã ãã¡ãããéçºåã大äºã§ããããããéãã¦åçååãç解ãã¦èªèµ°ããªãã課é¡è§£æ±ºãç¶ãã人ã®æ¹ããã£ã¨ä¾¡å¤ã®ãããã¨ã ã¨ã¯æã£ã¦ããã¾ãã çããSREã¸ã®ä¿®è¡ãããã¯éé¬ãã¦ãå ¥ç¤¾ãå¾ ã£ã¦ã¾ãï¼
å»å¹´ããåããããªãã¨è¨ã£ã¦ãã¦ã¾ããããã