äž»èŠãªããã©ãŒãã³ã¹ã€ã³ãžã±ãŒã¿ã䜿çšããããã«å¿ èŠãªãã®ã«ã€ããŠãPatternsïŒPracticesããŒã ã«ãããã¹ãããã³ããã©ãŒãã³ã¹åæã«é¢ãã翻蚳ã®å ¬éãçµäºããŠããŸãã ã«ã¹ãã«ã¹ããŒã®Igor Shcheglovitovã«ç¿»èš³ããŠããã ãããããšãããããŸãã ãã¹ãã®ãããã¯ã«é¢ããæ®ãã®èšäºã¯ã mstestingã¿ã°ã«ãããŸãã
äž»èŠæ¥çžŸè©äŸ¡ææšã®åæãµã€ã¯ã«ã®æåã®èšäºã§ã¯ ãã³ã³ããã¹ãã確ç«ããŸããããããã§ç¹å®ã®ããšã«æ³šç®ããŸãã 2çªç®ã¯ããŠãŒã¶ãŒãããžãã¹ã€ã³ãžã±ãŒã¿/ã¡ããªãã¯ãããã³ã¢ããªã±ãŒã·ã§ã³å ã®åæã«å¿ èŠãªã€ã³ãžã±ãŒã¿ã®åæã«æ³šç®ããŸããã ããã§ãæçµ-ã·ã¹ãã ãšãµãŒãã¹ïŒäŸåãµãŒãã¹ãå«ãïŒã¡ããªãã¯ã«ã€ããŠã
ã ãã
ã·ã¹ãã ã¡ããªãã¯...
ã·ã¹ãã ã¡ããªãã¯ã䜿çšãããšã䜿çšãããŠããã·ã¹ãã ãªãœãŒã¹ãšãªãœãŒã¹ã®ç«¶åãçºçããå¯èœæ§ã®ããå Žæãç¹å®ã§ããŸãã ãããã®ã¡ããªãã¯ã¯ãã¡ã¢ãªããããã¯ãŒã¯ãããã»ããµããã£ã¹ã¯äœ¿çšçãªã©ã®ãã·ã³ã¬ãã«ã®ãªãœãŒã¹ã远跡ããããšãç®çãšããŠããŸãã ãããã®ã¡ããªãã¯ã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ ¹åºã«ããå éšç«¶åã®ã¢ã€ãã¢ãæäŸã§ããŸãã
ãŸããã¡ããªãã¯ããŒã¿ã远跡ããŠããã©ãŒãã³ã¹ã®åŽé¢ãå€æããããšãã§ããŸããã·ã¹ãã ããã©ãŒãã³ã¹ãšã¢ããªã±ãŒã·ã§ã³è² è·ã®éã«é¢ä¿ããããã©ãããç解ããå¿ èŠããããŸãã è¿œå ã®ããŒããŠã§ã¢ãªãœãŒã¹ïŒä»®æ³ãŸãã¯å®ïŒãå¿ èŠã«ãªãå ŽåããããŸãã äžå®ã®è² è·ã§ãããã®ã¡ããªãã¯ã®å€ã®å¢å ãçºçããå Žåãããã¯å€éšèŠå -ããã¯ã°ã©ãŠã³ãã¿ã¹ã¯ãå®æå®è¡ã¿ã¹ã¯ããããã¯ãŒã¯ã¢ã¯ãã£ããã£ããŸãã¯ããã€ã¹I / Oã«ããå¯èœæ§ããããŸãã
åéæ¹æ³
Azure Diagnosticsã䜿çšããŠããããã°ãšãã©ãã«ã·ã¥ãŒãã£ã³ã°ãããã©ãŒãã³ã¹ã®æž¬å®ããªãœãŒã¹äœ¿çšéã®ç£èŠããã©ãã£ãã¯åæãå¿ èŠãªãªãœãŒã¹ã®ã¹ã±ãžã¥ãŒãªã³ã°ãããã³ç£æ»ã®ããã®èšºæããŒã¿ãåéã§ããŸãã 蚺æãåéããåŸãMicrosoft Azureã¹ãã¬ãŒãžã«è»¢éããŠããã«åŠçããããšãã§ããŸãã
蚺æããŒã¿ãåéããã³åæããå¥ã®æ¹æ³ã¯ã PerfViewã䜿çšããããšã§ãã ãã®ããŒã«ã䜿çšãããšã次ã®åŽé¢ãæ¢çŽ¢ã§ããŸãã
- CPU䜿çšç ã PerfViewã¯ããµã³ããªã³ã°ãã¬ãŒã¹ãã¯ãããžãŒã䜿çšããŠãçŸåšå®è¡äžã®ã³ãŒãã®ã¹ã¿ãã¯ãå®æçã«ïŒããªç§ééã§ïŒèŠæ±ããã¹ããªãŒã ã®å®å šãªã¹ã¿ãã¯ãã¬ãŒã¹ãè¿ããŸãã 次ã«ãPerfViewã¯ããŸããŸãªã¹ããªãŒã ã®ã¹ã¿ãã¯ãã¬ãŒã¹ãäžç·ã«éçŽããŸããã¹ã¿ãã¯ãã¥ãŒã¢ãŒãŠãŒãã£ãªãã£ã䜿çšãããšãã³ãŒãã®å®è¡å 容ïŒããã³ããã»ããµæéïŒã確èªã§ããæ£ããå®è¡ãããªãã³ãŒããåé€ãŸãã¯ä¿®æ£ã§ããŸãã
- 管çã¡ã¢ãª ã PerfViewã¯ã.netã¬ããŒãžã³ã¬ã¯ã¿ãŒã«ãã£ãŠå¶åŸ¡ããããããŒãžããŒãã¹ãããã·ã§ãããå®è¡ã§ããŸãã ãããã®ã¹ãããã·ã§ããã¯ãªããžã§ã¯ãã®ã°ã©ãã«å€æããããªããžã§ã¯ãã®å¯¿åœãåæã§ããŸãã
- 管çãããŠããªãã¡ã¢ãª ã PerfViewã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã¡ã¢ãªãããã¯ãå²ãåœãŠãŸãã¯è§£æŸãããšãã«ã€ãã³ãããã£ããã£ã§ããŸãã ãã®æ å ±ã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³ãã¢ã³ãããŒãžã¡ã¢ãªã§ã©ã®ããã«åäœãããã远跡ã§ããŸãã
- ã¿ã€ãã³ã°ãšéå¡ ã PerfViewã¯ãã¹ã¬ãããã¹ãªãŒãç¶æ ã«ãªã£ãŠç®èŠãããšãã®æ å ±ã远跡ããã³èŠèŠåã§ããŸãã ãã®æ å ±ã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³ã®ããŸããŸãªããã¯ãæ€çŽ¢ã§ããŸãã ãã®åæã¯ãããã»ããµã®è² è·ãäœããšãã«ããã©ãŒãã³ã¹ã®åé¡ãçºçããå Žåã«ç¹ã«åœ¹ç«ã¡ãŸãã
PerfViewã¯ããšããšããŒã«ã«ã§å®è¡ããããã«èšèšãããŠããŸããããçŸåšã¯Azureã¯ã©ãŠããµãŒãã¹ã®WebããŒã«ãšWorkerããŒã«ããããŒã¿ãåéããããã«äœ¿çšã§ããŸãã AzureRemotePerfView NuGetããã±ãŒãžã䜿çšããŠãPerfViewãããŒã«ãµãŒããŒã«ãªã¢ãŒãã§ã€ã³ã¹ããŒã«ããã³å®è¡ããåä¿¡ããããŒã¿ãããŒã«ã«ã§ããŠã³ããŒãããŠåæã§ããŸãã
Windows Azure蚺æãšPerfViewã¯ã䜿çšãããäºåŸãªãœãŒã¹ã®åæã«åœ¹ç«ã¡ãŸãã ãã ããDevOpsãªã©ã®ãã©ã¯ãã£ã¹ãé©çšããå Žåãã©ã€ãããã©ãŒãã³ã¹ããŒã¿ãç£èŠããŠãæœåšçãªããã©ãŒãã³ã¹ã®åé¡ãçºçåã«æ€åºããå¿ èŠããããŸãã APMããŒã«ã¯ãã®æ å ±ãæäŸã§ããŸãã ããšãã°ãAzureããŒã¿ã«ã®Webã¢ããªã±ãŒã·ã§ã³ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ããŒã«ã¯ãã¡ã¢ãªãããã»ããµãããã³ãããã¯ãŒã¯ã®äœ¿çšçã瀺ãããŸããŸãªã°ã©ãã衚瀺ã§ããŸãã
AzureããŒã¿ã«ã«ã¯ãäžè¬çãªã·ã¹ãã ã¡ããªãã¯ã瀺ãããã«ã¹ããã·ã¥ããŒããããããŸãã
åæ§ã«ã蚺æããã«ã§ã¯ããã䜿çšãããããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã®äºåæ§ææžã¿ã»ããã远跡ã§ããŸãã ããã§ã¯ãããšãã°ã«ãŠã³ã¿å€ãç¹å®ã®å€ãå€§å¹ ã«è¶ ããå Žåãªã©ããªãã¬ãŒã¿ãç¹å¥ãªéç¥ãåãåãç¹å¥ãªã«ãŒã«ãå®çŸ©ã§ããŸãã
Azure WebããŒã¿ã«ã¯ãæ倧7æ¥éã®ããã©ãŒãã³ã¹ããŒã¿ã衚瀺ã§ããŸãã é·æéã«ãããããŒã¿ã¢ã¯ã»ã¹ãå¿ èŠãªå Žåã¯ãããã©ãŒãã³ã¹ããŒã¿ãAzure Storageã«çŽæ¥ã¢ããããŒãããå¿ èŠããããŸãã
Webãµã€ãProcess Explorerã䜿çšãããšãWebãµã€ãã§å®è¡ãããŠããåã ã®ããã»ã¹ã®è©³çŽ°ã衚瀺ããããããŸããŸãªã·ã¹ãã ãªãœãŒã¹ã®äœ¿çšéã®çžé¢ã远跡ãããã§ããŸãã
New Relicãšä»ã®å€ãã®APMã«ã¯åæ§ã®æ©èœããããŸãã 以äžã¯ããã€ãã®äŸã§ãã
ã·ã¹ãã ãªãœãŒã¹ã®ç£èŠã¯ãã¡ã¢ãªäœ¿çšçïŒç©çããã³ç®¡çïŒããããã¯ãŒã¯åž¯åå¹ ãããã»ããµããã©ãŒãã³ã¹ãããã³ãã£ã¹ã¯å ¥åºåïŒI / OïŒæäœãã«ããŒããã«ããŽãªã«åé¡ãããŸãã 次ã®ã»ã¯ã·ã§ã³ã§ã¯ãæ€çŽ¢å¯Ÿè±¡ã«ã€ããŠèª¬æããŸãã
ç©çã¡ã¢ãªäœ¿çšé
Windowsäžã§å®è¡ããããã¹ãŠã®ããã»ã¹ã¯ãä»®æ³ã¡ã¢ãªã䜿çšããŸããä»®æ³ã¡ã¢ãªã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ãã£ãŠç©çã¡ã¢ãªã«æ圱ãããŸãã ããã»ã¹ã®ä»®æ³ã¡ã¢ãªã¯ãäºçŽæžã¿ãšå²ãåœãŠæžã¿ïŒã³ãããæžã¿ïŒã«åããããŸãã
- äºçŽã¡ã¢ãªã¯ãããŒãžãã¡ã€ã«ã«ä¿åãããŠããç©çã¡ã¢ãªãŸãã¯ããŒãžã¡ã¢ãªãšã¯é¢é£ä»ããããŠããŸããã ããã»ã¹çšã«äºçŽãããŠããã¡ã¢ãªã®éãåçŽã«èšè¿°ããããã»ã¹ã®ä»®æ³ã¢ãã¬ã¹èšè¿°åïŒVADïŒã«æžã蟌ãŸããŸãã ãã®ã¡ã¢ãªã¯ç©çã¹ãã¬ãŒãžã«é¢é£ä»ããããŠããªããããããã©ãŒãã³ã¹ã®ç£èŠäžã¯ç¡èŠã§ããŸãã
- å²ãåœãŠãããã¡ã¢ãªã¯ãç©çã¡ã¢ãªããã³/ãŸãã¯ããŒãžã³ã°ãã¡ã€ã«ããŒãžã¡ã¢ãªã®å²ãåœãŠã«é¢é£ä»ããããŠããŸãã å°çšã¡ã¢ãªã®äœ¿çšãç£èŠããå¿ èŠããããŸãã
å²ãåœãŠãããã¡ã¢ãªã®å²ãåœãŠãç£èŠããŠãå¿ èŠãªããžãã¹è² è·ããµããŒããããŠãŒã¶ãŒã¢ã¯ãã£ããã£ã®æ¥æ¿ãªããŒã¹ããåŠçããã®ã«ååãªã¡ã¢ãªãã¯ã©ãŠããµãŒãã¹ãŸãã¯ãµã€ãã®ãã¹ãã£ã³ã°ã«å²ãåœãŠãããŠãããã©ãããå€æã§ããŸãã 次ã®ããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã远跡ããå¿ èŠããããŸãã
- Memory \ Commit Limitã¯ãã·ã¹ãã ãå²ãåœãŠãããšãã§ããã¡ã¢ãªã®æ倧éã瀺ããŸãã éåžžãããã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ãã£ãŠæ±ºå®ãããåºå®å€ã§ãïŒ 64ãããããŒãžã§ã³ã®Windowsã«é©åãªããŒãžãã¡ã€ã«ãµã€ãºã決å®ããæ¹æ³ãåç § ïŒãããšãã°ã8 GBã®ã¡ã¢ãªãæèŒãããã·ã³ã§ã¯ããã®æ°å€ã¯çŽ11 GBã«ãªããŸãã
- Process \ Private Bytesã¯ãããã»ã¹ã«å²ãåœãŠãããã¡ã¢ãªã®éã瀺ããŸãã ãã¹ãŠã®ããã»ã¹ã®ãã¹ãŠã®ãã©ã€ããŒããã€ãã®åèšãäžèšã®ã¡ã¢ãªå¶éãè¶ ããå Žåãããã¯ã·ã¹ãã ãã¡ã¢ãªã䜿ãæãããã¢ããªã±ãŒã·ã§ã³ã倱æããããšãæå³ããŸãã
- Memory \ïŒ Committed Bytes in Useã¯ãMemory / Committed BytesãšMemory \ Commit Limitã®æ¯çã§ãã ãã®ã«ãŠã³ã¿ã®å€ã倧ããå Žåãã·ã¹ãã ã«å€§ããªã¡ã¢ãªè² è·ãããããšã瀺ããŠããŸãã
æ³šïŒ Windowsã«ã¯ãProcess \ Virtual Bytesã«ãŠã³ã¿ãŒããããŸãã ãã®ã«ãŠã³ã¿ã¯ãããã»ã¹ã䜿çšããä»®æ³ã¡ã¢ãªã®åèšéã瀺ããŸãããéåžžã«æ³šæããå¿ èŠããããŸãã å®éãäºçŽæžã¿ããã³å²ãåœãŠæžã¿ã®ããã»ã¹ã¡ã¢ãªã®éã瀺ããŠããŸãã ããšãã°ãw3wpããã»ã¹ã®éå§æã«Process / Virtual Bytesããã³.NET CLR Memory \ïŒtotal reserved bytesã«ãŠã³ã¿ãŒã調ã¹ããšããã®ã«ãŠã³ã¿ãŒã¯18 GBã衚瀺ã§ããŸãããåèšã¡ã¢ãªå®¹éã¯185 MBã§ãã
äºçŽã¡ã¢ãªã¯ããã€ãããã¯RAMã«ããæ¡åŒµã§ããããã»ã¹ã¯ãã®ã¡ã¢ãªãç©çã¡ã¢ãªã«å€æã§ããŸãã
OutOfMemoryãšã©ãŒã®äž»ãªåå ã¯2ã€ãããŸããããã»ã¹ãå²ãåœãŠãããä»®æ³ã¡ã¢ãªé åãè¶ ããŠãããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãããã»ã¹ã«è¿œå ã®ç©çã¡ã¢ãªãå²ãåœãŠãããšãã§ããŸããã 2çªç®ã®ã±ãŒã¹ãæãäžè¬çã§ãã
以äžã§èª¬æããããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã䜿çšããŠãã¡ã¢ãªè² è·ãæšå®ã§ããŸãã
- ã¡ã¢ãª\å©çšå¯èœãªMãã€ãã çæ³çã«ã¯ããã®ã«ãŠã³ã¿ã®å€ã¯ããã·ã³ã«ã€ã³ã¹ããŒã«ãããŠããç©çã¡ã¢ãªã®éã®10ïŒ ãè¶ ããå¿ èŠããããŸãã 䜿çšå¯èœãªã¡ã¢ãªã®éãå°ãªãããå Žåãã·ã¹ãã ãã¢ã¯ãã£ããªããã»ã¹ã«ããŒãžãã¡ã€ã«ã®äœ¿çšãéå§ããå¯èœæ§ããããŸãã ã·ã¹ãã ã«ååãªç©çã¡ã¢ãªããªãå Žåããã®çµæãå€§å¹ ãªé 延ãå®å šãªã·ã¹ãã ãã³ã°ãçºçããå¯èœæ§ããããŸãã
- 䜿çšäžã®ã¡ã¢ãª\ïŒ ã³ãããæžã¿ãã€ãã å²ãåœãŠãããã¡ã¢ãªã®åèšéãå¶éå€ã®90ïŒ ã«è¿ã¥ããšãå²ãåœãŠãããã¡ã¢ãªã®å¶éãå¢å ããŸããå€ã95ïŒ ã«éãããšãå¶éã®æ¡å€§ãåæ¢ããOutOfMemoryãšã©ãŒãçºçããå¯èœæ§ããããŸãã å²ãåœãŠãããã¡ã¢ãªã®éãå¶éã«éãããšããã«ãã·ã¹ãã ã¯ããã»ã¹ã«ã¡ã¢ãªãå²ãåœãŠãããšãã§ããªããªããŸãã ã»ãšãã©ã®ããã»ã¹ã¯ãã·ã¹ãã ã®ãã®åäœã«å¯Ÿå¿ãããå®è¡ãåæ¢ããŸãã ãããã£ãŠããã®ã«ãŠã³ã¿ãç£èŠããããšã¯éåžžã«éèŠã§ãã
- ã¡ã¢ãª\ããŒãž/ç§ ãã®ã«ãŠã³ã¿ã¯ãã·ã¹ãã ãããŒãžãã¡ã€ã«ã䜿çšããŠããéã瀺ããŸãã ç©çã¡ã¢ãªã«å¯Ÿããã¹ã¯ããã³ã°ã®å¹æãå€æã§ããŸãããããè¡ãã«ã¯ããã®ã«ãŠã³ã¿ãŒã®å€ã«Physical Disk \ Avg.Disk sec / Transferã«ãŠã³ã¿ãŒã®å€ãæããŸãã ãã®æäœã®çµæã¯0ã1ã§ãããããŒãžãã¡ã€ã«ãžã®ä»®æ³ããŒãžã®èªã¿åããšæžã蟌ã¿ã«è²»ãããããã£ã¹ã¯ã¢ã¯ã»ã¹æéã®å²åãç¹åŸŽä»ããŸãã 0.1ã®å€ã¯ãã·ã¹ãã ãã¹ã¯ãããã¡ã€ã«ãæäœããããã«ãã£ã¹ã¯ã«ã¢ã¯ã»ã¹ããåèšæéã®10ïŒ ä»¥äžãè²»ããããšãæå³ããŸãã ãã®å€ãå®æ°ã®å Žåãããã¯ç©çã¡ã¢ãªã®åé¡ã瀺ããŠããå¯èœæ§ããããŸãã
ãŸãã倧éã®ã¡ã¢ãªãæçåãåŒãèµ·ããå¯èœæ§ãããããšã«çæããå¿ èŠããããŸãïŒé£æ¥ãããã¯ã«ååãªç©ºãç©çã¡ã¢ãªããªãå ŽåïŒããããã£ãŠãååãªç©ºãã¡ã¢ãªãããããšã瀺ãã·ã¹ãã ã¯ãç¹å®ã®ããã»ã¹ã«ãã®ã¡ã¢ãªãå²ãåœãŠãããšãã§ããªãå ŽåããããŸãã
å€ãã®APMããŒã«ã¯ãã¡ã¢ãªãã©ã®ããã«æ©èœããããæ·±ãç解ããå¿ èŠãªããããã»ã¹ãã·ã¹ãã ã¡ã¢ãªã䜿çšããæ¹æ³ã«é¢ããæ å ±ãæäŸããŸãã 以äžã®ã°ã©ãã¯ãäžå®ã®è² è·ã®äžã§ã®ã¢ããªã±ãŒã·ã§ã³ã®ã¹ã«ãŒãããïŒå·Šè»žïŒãšå¿çæéïŒå³è»žïŒã瀺ããŠããŸãã çŽ6ååŸãããã©ãŒãã³ã¹ãçªç¶äœäžããæ°ååŸã«ã€ã³ãžã±ãŒã¿ãŒãçºçããå¿çæéãããžã£ã³ãããå§ããŸãã
ã¢ããªã±ãŒã·ã§ã³è² è·ãã¹ãçµæ
New Relicã䜿çšããŠèšé²ããããã¬ã¡ããªã«ã¯ãéå°ãªã¡ã¢ãªå²ãåœãŠã瀺ãããŠãããããã«ããæäœã倱æãããã®åŸå埩ãããŸãã ã¹ã¯ãããã¡ã€ã«ã«ããã䜿çšæžã¿ã¡ã¢ãªãå¢å ããŸãã ãã®åäœã¯ãã¡ã¢ãªãªãŒã¯ã®å žåçãªçç¶ã§ãã
éå°ãªã¡ã¢ãªå²ãåœãŠã瀺ããã¬ã¡ããª
泚ïŒèšäºã Visual Studio 2013ã䜿çšããAzure Webãµã€ãã§ã®ã¡ã¢ãªãªãŒã¯ã®èª¿æ»ãã«ã¯ãVisual StudioãšAzure蚺æã䜿çšããŠãAzureã®Webã¢ããªã±ãŒã·ã§ã³ã®ã¡ã¢ãªäœ¿çšéãç£èŠããæ¹æ³ãèšèŒãããŠããŸãã
ãããŒãžãã¡ã¢ãªã®äœ¿çš
.NETã¢ããªã±ãŒã·ã§ã³ã¯ãå ±éèšèªã©ã³ã¿ã€ã ïŒCLRïŒã«ãã£ãŠå¶åŸ¡ããããããŒãžã¡ã¢ãªã䜿çšããŸãã CLRã¯ããããŒãžã¡ã¢ãªãç©çã¡ã¢ãªã«æ圱ããŸãã ã¢ããªã±ãŒã·ã§ã³ã¯CLRã«ç®¡çã¡ã¢ãªãèŠæ±ããCLRã¯å¿ èŠãªã¡ã¢ãªãå²ãåœãŠãŠæªäœ¿çšã®ã¡ã¢ãªã解æŸããŸãã ããŒã¿æ§é ããããã¯åäœã§ç§»åããããšã«ãããCLRã¯ãã®ã¿ã€ãã®ã¡ã¢ãªã®ã¬ã€ã¢ãŠããæäŸããããã«ãã£ãŠæçåãæžãããŸãã
管ç察象ã¢ããªã±ãŒã·ã§ã³ã«ã¯ãããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã®è¿œå ã»ããããããŸãã ã¡ã¢ãªåé¡ã®èª¿æ»ã®èšäºã«ã¯ãããŒã«ãŠã³ã¿ãŒã®è©³çŽ°ãªèª¬æãå«ãŸããŠããŸãã æãéèŠãªããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã¯æ¬¡ã®ãšããã§ãã
- .NET CLRã¡ã¢ãªïŒã³ããããããç·ãã€ãæ°ã¯ããã£ã¹ã¯äžã®ç©çã¡ã¢ãªãšããŒãžã¹ããŒã¹ã«äŸåããã¡ã¢ãªãåŠçããŸãã ãã®ã«ãŠã³ã¿ãŒã¯ãå²ãåœãŠãããããã»ã¹ã¡ã¢ãªã®éã衚瀺ããProcess / Private Bytesã«ãŠã³ã¿ãŒã®å€ãšéåžžã«äŒŒãŠããå¿ èŠããããŸãã
- .NET CLR MemoryïŒTotal Reserved Bytesã¯ãããã»ã¹ã®äºçŽã¡ã¢ãªã®éã瀺ããŸãã Process \ Virtual Bytesã«ãŠã³ã¿ãŒã®å€ãšã»ãŒçãããProcess \ Private Bytesã®å€ãããå°ããå¿ èŠããããŸãã
- .NET CLR Memory \ Allocated Bytes / secã¯ã管çããŒãã®å€åæ§ã瀺ããŸãã ãã®ã«ãŠã³ã¿ãŒã®å€ã¯ãã¢ããªã±ãŒã·ã§ã³ããªããžã§ã¯ããäœæãããç Žæ£ãããã«ãã£ãŠãæ£ãŸãã¯è² ã«ãªããŸãã ãã®ã«ãŠã³ã¿ã¯ãåã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãµã€ã¯ã«ã®åŸã«æŽæ°ãããŸãã ãã®ã«ãŠã³ã¿ã®äžå®ã®æ£ã®å€ã¯ãã¡ã¢ãªãªãŒã¯ã瀺ããŠããå¯èœæ§ããããŸãã
- ãã¹ãŠã®ããŒãã®.NET CLRã¡ã¢ãªïŒãã€ãã¯ãããã»ã¹ã®ç®¡çããŒãã®åèšãµã€ãºã瀺ããŸãã
- .NET CLR Memory \ïŒ Time in GCæåŸã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãµã€ã¯ã«ã®å®è¡ã«è²»ããããæéã®å²åã ãã®ã«ãŠã³ã¿ãŒã®è¯ãææšã¯ã10ïŒ æªæºã®å€ã§ãã
WebãµãŒããŒã§ã®WebåŸ ã¡æé
ãããã¯ãŒã¯ããã©ãŒãã³ã¹ã¯ãã¯ã©ãŠãã¢ããªã±ãŒã·ã§ã³ã«ãšã£ãŠç¹ã«éèŠã§ãã ããã¯ãã¹ãŠã®æ å ±ãééããææ®è ã§ãã ãããã¯ãŒã¯ã®é 延ã¯ã¯ãšãªã®å®è¡æéã®å¢å ã«ã€ãªããããããããã¯ãŒã¯ã®åé¡ã¯ããã©ãŒãã³ã¹ã®äœäžã«ã€ãªããããŠãŒã¶ãŒã«äžå¿«æãäžããŸãã Windowsã¯çŸåšãåã ã®ã¢ããªã±ãŒã·ã§ã³èŠæ±ã®é 延ã枬å®ããããã®ããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒãæäŸããŠããŸããã ãã ããããŒã«ã«ã³ã³ãã¥ãŒã¿ãŒäžã®ãããã¯ãŒã¯ãã©ãã£ãã¯ãåæããããã®åªããããŒã«ã§ãããªãœãŒã¹ã¢ãã¿ãŒããããŸãïŒã¯ã©ãŠããµãŒãã¹ã®å±éäžã«ãªã¢ãŒããã¹ã¯ããããæ§æããWebãŸãã¯ã¯ãŒã«ãŒããŒã«ã®ãµãŒããŒã«ãã°ã€ã³ã§ããŸãïŒã ãªãœãŒã¹ã¢ãã¿ãŒã¯ã倱ããããã±ããã«é¢ããæ å ±ããŸãã¯ã¢ã¯ãã£ããªTCP / IPã»ãã·ã§ã³ã®åèšé 延ã«é¢ããæ å ±ãæäŸããŸãã ãã±ããæ倱ã«ãããæ¥ç¶ã®å質ãããããŸãã é 延ã¯ãTCP / IPãã±ãããã«ãŒããå®äºããã®ã«ãããæéã瀺ããŸãã å³ã¯ããªãœãŒã¹ã¢ãã¿ãŒã®[ãããã¯ãŒã¯]ã¿ãã瀺ããŠããŸãã
LANã¢ã¯ãã£ããã£ã瀺ããªãœãŒã¹ã¢ãã¿ãŒ
WebãµãŒããŒã§ã®ãããã¯ãŒã¯äœ¿çšç
Perfomance MonitorããWebãµãŒããŒã«çŽæ¥æ¥ç¶ããããšã§ïŒãªã¢ã«ã¿ã€ã æ å ±ãå¿ èŠãªå ŽåïŒãAzure Diagnosticsãæ§æããŠããŒã¿ãAzure Storageã«ä¿åããããšã«ããã次ã®ããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒãååŸã§ããŸãã
- Network Adapter \ Bytes Sent / secããã³Network Adapter \ Bytes Received / secã¯ããããã¯ãŒã¯ã¢ããã¿ãŒã«ããããŒã¿ã®éåä¿¡é床ã瀺ããŸã
- ãããã¯ãŒã¯ã¢ããã¿ãŒ\çŸåšã®åž¯åå¹ ã¯ããããã¯ãŒã¯ã¢ããã¿ãŒã®èš±å®¹åž¯åå¹ ïŒãã€ã/ç§ïŒãæšå®ããããã«äœ¿çšãããŸã
- éä¿¡ãã€ãã®ãããã¯ãŒã¯äœ¿çšçïŒ =ïŒïŒéä¿¡ãã€ã/ç§* 8ïŒ/çŸåšã®åž¯åå¹ ïŒ* 100
- åä¿¡ãã€ãã®ãããã¯ãŒã¯äœ¿çšçïŒ =ïŒïŒåä¿¡ãã€ã/ç§* 8ïŒ/çŸåšã®åž¯åå¹ ïŒ* 100
ãããã®å€ãçŽ100ïŒ ã§ããããšãå€æããå Žåãããã¯ãããã¯ãŒã¯ã®èŒ»èŒ³ã瀺ããŠããå¯èœæ§ããããŸãã ãã®å Žåãã¯ã©ãŠãã¢ããªã±ãŒã·ã§ã³ã®è€æ°ã®ã€ã³ã¹ã¿ã³ã¹ã«ãããã¯ãŒã¯ãã©ãã£ãã¯ãåæ£ããå¿ èŠãããå ŽåããããŸãã
AzureããŒã¿ã«ã¯ãã¯ã©ãŠããµãŒãã¹ã®ãã¹ãŠã®ã€ã³ã¹ã¿ã³ã¹ãšãããŒã«ã®ç¹å®ã®ã€ã³ã¹ã¿ã³ã¹ã®ãããã¯ãŒã¯äœ¿çšçã衚瀺ã§ããŸãã ããŒã¿ã«ã«ã¯ã1ç§ãããã«éåä¿¡ããããã€ãæ°ã«é¢ããæ å ±ãæäŸããNetwork Inããã³Network Outã«ãŠã³ã¿ãŒããããŸãã
Azure管çããŒã¿ã«ã§ãããã¯ãŒã¯ã®äœ¿çšç¶æ³ãç£èŠãã
ãããã¯ãŒã¯ã®åŸ ã¡æéãéåžžã«é·ããŠã䜿çšçãäœãå Žåããããã¯ãŒã¯ã¯ã»ãšãã©ããã«ããã¯ã«ãªããŸããã ã¢ããªã±ãŒã·ã§ã³ã€ã³ã¹ã¿ã³ã¹ã®CPU䜿çšçãé«ãå Žåã¯ãããå€ãã®é»åãå¿ èŠã§ãããè€æ°ã®ã€ã³ã¹ã¿ã³ã¹éã§è² è·ã䞊ååããå¿ èŠãããããšãæå³ããŸãã CPU䜿çšçãäœãå Žåãããã¯å€éšãµãŒãã¹ã®åœ±é¿ã«ããå¯èœæ§ããããŸãã ããšãã°ãAzure SQLããŒã¿ããŒã¹ã«éä¿¡ãããè€éãªã¯ãšãªã¯ãå®äºãããŸã§ã«æéããããå ŽåããããŸãã ãã®ç¶æ³ã§ã¯ãã€ã³ã¹ã¿ã³ã¹éã®ãããã¯ãŒã¯ãã©ãã£ãã¯ã®åæ£ã¯ãããŒã¿ããŒã¹ãµãŒããŒã®éè² è·ã«ããããã©ãŒãã³ã¹ã®åé¡ãæªåãããå¯èœæ§ããããé 延ã®å¢å ã«ã€ãªãããŸãã å€éšãµãŒãã¹ã®äœ¿çšã远跡ããæºåãããå¿ èŠããããŸãã
泚ïŒãããã¯ãŒã¯é 延ãšãã£ãã«å¹ ã®è©³çŽ°ã«ã€ããŠã¯ãWindows Sysinternalsã®PsPingããŒã«ã«æ £ããããšããå§ãããŸãã
ãããã¯ãŒã¯ãã©ãã£ãã¯é
é 延ã®ãã1ã€ã®äžè¬çãªåå ã¯ã倧éã®ãããã¯ãŒã¯ãã©ãã£ãã¯ã§ãã å€éšãµãŒãã¹ãžã®ãã©ãã£ãã¯éã調æ»ããå¿ èŠããããŸãã å€ãã®APMããŒã«ã䜿çšãããšãã¯ã©ãŠããµãŒãã¹ããã³Webã¢ããªã±ãŒã·ã§ã³ã«åãããããã©ãã£ãã¯ã远跡ã§ããŸãã ãã®å³ã¯ãWeb APIãµãŒãã¹ã®çä¿¡ããã³çºä¿¡ãããã¯ãŒã¯ãã©ãã£ãã¯ã瀺ãNew Relicããã®äŸã瀺ããŠããŸãã 倧éã®ç·ãã©ãã£ãã¯ïŒã200 Mb /ç§ïŒã«ããã顧客ã®åŸ ã¡æéãé·ããªããŸãã
Azure管çããŒã¿ã«ã«ã¯ãAzure SQLããŒã¿ããŒã¹ãAzure Storageãªã©ã®å€éšãµãŒãã¹ã®äœ¿çšçã衚瀺ããããã®ããŒã«ãå«ãŸããŠããŸãã
ãããã¯ãŒã¯ã®ãªãŒããŒããããšé¡§å®¢ã®å Žæ
ãããã¯ãŒã¯ã®åŸ ã¡æéãé·ããšããããã³ã«ã®ã€ã³ã¿ãŒã¯ãŒãã³ã°ããã±ããæ倱ãã«ãŒãã£ã³ã°ã®åœ±é¿ãªã©ã®ãªãŒããŒããããçºçããå¯èœæ§ããããŸãã åŸ æ©æéãšã¹ã«ãŒãããã¯ãã¯ã©ã€ã¢ã³ãã®å Žæãšã¯ã©ã€ã¢ã³ããé£æºãããµãŒãã¹ã«å€§ããäŸåããŸãã 顧客ãç°ãªãå°åã«ããå Žåã¯ãå°åããšã«ãµãŒãã¹ã€ã³ã¹ã¿ã³ã¹ã®åæ£ãæ€èšããåå°åã«å¿ èŠãªè² è·ãåŠçããã®ã«ååãªå®¹éãããããšã確èªããå¿ èŠããããŸãã
以äžã®ã°ã©ãã¯ããŠãŒã¶ãŒã®å°ççååžã垯åå¹ ãšé 延ã«ã©ã®ããã«åœ±é¿ãããã瀺ããŠããŸãã 3å以å ã«äžå®ã®ãªã¯ãšã¹ãã®ã¹ããªãŒã ããµãŒãã¹ã«éä¿¡ãããŸããã ãã®ã·ããªãªã¯2ã€ã®ãã¹ãã«äœ¿çšãããŸãããæåã®ãã¹ãã§ã¯ãã¯ã©ã€ã¢ã³ããšãµãŒããŒã¯1ã€ã®å°åã«ããã2çªç®ã®ãã¹ãã§ã¯ç°ãªãå°åã«ãããŸããã äž¡æ¹ã®ã°ã©ãã§ã巊軞ã¯1ç§ãããã®æäœæ°ã§ããã©ãŒãã³ã¹ã瀺ããå³è»žã¯ç§ã§å¿çæéã瀺ããŸãã
æåã®ã°ã©ãã§ã¯ãå¹³åã¹ã«ãŒãããã¯2çªç®ã®ã°ã©ããããæ°åé«ããå¿çæéã¯2çªç®ã®ã°ã©ãã®å¿çæéã®çŽ1/4ã§ãã
ãããã¯ãŒã¯ãã€ããŒããµã€ãº
èŠæ±ãšå¿çã®æ¬æã®ãµã€ãºã¯ãã¹ã«ãŒãããã«å€§ããªåœ±é¿ãäžããå¯èœæ§ããããŸãã XMLã¯ãšãªã¯ãJSON圢åŒã®åçã®ãã®ãããå€§å¹ ã«å€§ãããªãå¯èœæ§ããããŸãã ãã€ããªã·ãªã¢ã«åãããããŒã¿ã¯ããã³ã³ãã¯ãã§ãããæè»æ§ãäœãå ŽåããããŸãã 垯åå¹ ã®æ¶è²»ã«å ããŠã倧èŠæš¡ãªèŠæ±ã¯ãããŒã¿ã®è§£æãŸãã¯éã·ãªã¢ã«åã«è¿œå ã®CPUè² è·ããããããŸãã
次ã®ã°ã©ãã¯ãã¹ã«ãŒããããšå¿çæéã«å¯ŸããããŸããŸãªèŠæ±ãµã€ãºã®åœ±é¿ã瀺ããŠããŸãã åãšåãããã«ãäž¡æ¹ã®ãã£ãŒãã§åããã¹ããµãŒãã¹ã䜿çšãããŸããã 顧客ãšãµãŒãã¹ã¯åãå°åã«ãããŸãã
ããã§ãã¡ãã»ãŒãžãµã€ãºã10åã«å¢å ãããšãã¹ã«ãŒããããäœäžããå¿çæéãå¢å ããããšãããããŸãã ããã¯ããããã¯ãŒã¯ãã©ãã£ãã¯ã®å®èšŒãç®çãšãã人çºçãªãã¹ãã§ããããšã«æ³šæããŠãã ããã èŠæ±ã®åŠçã«å¿ èŠãªè¿œå ã®ããã»ã¹ã¯èæ ®ããããä»ã®ã¯ã©ã€ã¢ã³ããŸãã¯ãµãŒãã¹ã«ãã£ãŠçæããããµãŒãããŒãã£ã®ãããã¯ãŒã¯ãã©ãã£ãã¯ã®åœ±é¿ã¯ãããŸããã
ãããäžã®ãããã¹ã
ãããã¯ãŒã¯ã®é 延ã®ãã1ã€ã®äžè¬çãªåå ã¯ãããã£ãã£ãã¹ãã§ãã ãããã¹ããšã¯ãæ¥åãå®äºããããã«å¿ èŠãªãããã¯ãŒã¯ã»ãã·ã§ã³ã®é »åºŠã§ãã
ããããã¹ãããæ€åºããã«ã¯ããã¹ãŠã®æäœã«ãã¬ã¡ããªãåŒã³åºãã®é »åºŠã®èšé²ãããã³ã ãããã€åŒã³åºãããããå«ããå¿ èŠããããŸãã ãã¬ã¡ããªã«ã¯ãæäœã®å ¥åããã³åºåã§ã®ãããã¯ãŒã¯èŠæ±ã®ãµã€ãºãå«ããå¿ èŠããããŸãã åãã¯ã©ã€ã¢ã³ãããçæéã§éä¿¡ãããæ¯èŒçå°ããªãªã¯ãšã¹ããå€æ°ããå Žåããããã®ãªã¯ãšã¹ãã1ã€ä»¥äžã«çµåããŠã·ã¹ãã ãæé©åããå¿ èŠãããããšã瀺ããŠããå¯èœæ§ããããŸãã äŸãšããŠãå³ã¯ãã¹ãWeb APIãµãŒãã¹ã®ãã¬ã¡ããªãŒã瀺ããŠããŸãã APIåŒã³åºãããšã«ãAzure SQLã§1ã€ä»¥äžã®ã¯ãšãªãçºçããŸãã ç£èŠäžãå¹³åã¹ã«ãŒãããã¯1åããã13,900ãªã¯ãšã¹ãã§ããã ããŒã¿ããŒã¹ã®ãã¬ã¡ããªãå³ã«ç€ºãããŠããããã®æéäžã«ãµãŒãã¹ãããŒã¿ããŒã¹ã«å¯ŸããŠ250,000ãè¶ ããã¯ãšãªãè¡ã£ãããšã瀺ããŠããŸãã ãããã®æ°å€ã¯ãWeb APIã®åŒã³åºãããšã«ãããŒã¿ããŒã¹ãžã®åŒã³åºããå¹³å18åããããšã瀺ããŠããŸãã
ã¢ããªã±ãŒã·ã§ã³ã®ç §äŒæã«çºçããDBåŒã³åºã
CPUãšãµãŒããŒã®äœ¿çšç
CPU䜿çšçïŒäœ¿çšçïŒã¯ããã·ã³ã®äœæ¥éã®å°ºåºŠã§ãããCPUã®ãå¯çšæ§ãã¯ããã·ã³ãäœåãªè² è·ãåŠçããããã«å¿ èŠãªããã»ããµãŒã®äºå容éã®éã瀺ããŸãã APMã䜿çšãããšãWebãµãŒãã¹ãŸãã¯ã¯ã©ãŠãã¢ããªã±ãŒã·ã§ã³ãå®è¡ããŠããç¹å®ã®ãµãŒããŒã«é¢ãããã®æ å ±ãååŸã§ããŸãã ãã®å³ã¯ãNew Relicã®çµ±èšã瀺ããŠããŸãã
Azure WebããŒã¿ã«ã§ã¯ãåãµãŒãã¹ã€ã³ã¹ã¿ã³ã¹ã®CPUããŒã¿ã衚瀺ã§ããŸãã
AzureããŒã¿ã«ã®ãµãŒãã¹ã€ã³ã¹ã¿ã³ã¹ã®CPU䜿çšç
é«ãCPU䜿çšçã¯ãå€æ°ã®äŸå€ãåå ã§çºçããå ŽåããããäŸå€ã®çæã«ããããã»ããµãéè² è·ã«ãªããŸãã
é¢é£ããã»ã¯ã·ã§ã³ã§åè¿°ããã¢ãããŒãã䜿çšããŠãäŸå€ã®é »åºŠã远跡ã§ããŸãã éå°ãªããã»ããµäœ¿çšçã¯ã倧ããªãªããžã§ã¯ãã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãé »ç¹ã«çºçããã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠåŒãèµ·ããããå¯èœæ§ããããŸãã ããããŒãžã¡ã¢ãªã®äœ¿çšãã»ã¯ã·ã§ã³ã®èª¬æã«åŸã£ãŠCLRã¬ããŒãžã³ã¬ã¯ã·ã§ã³ã«ãŠã³ã¿ã調ã¹ãŠãããã»ããµè² è·å šäœã«å¯Ÿããã¬ããŒãžã³ã¬ã¯ã¿ïŒGCïŒã®åœ±é¿ãè©äŸ¡ããå¿ èŠããããŸãã ãŸããã·ã¹ãã ã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ããªã·ãŒãæ£ããæ§æãããŠããããšã確èªããå¿ èŠããããŸãïŒè©³çŽ°ã«ã€ããŠã¯ãã¬ããŒãžã³ã¬ã¯ã·ã§ã³ã®åºç€ãåç §ããŠãã ããïŒã
äœCPU䜿çšçãšé«ã¬ã€ãã³ã·ã¯ãããŸããŸãªããã¯ã«é¢é£ä»ããããŠããå¯èœæ§ããããŸããããã¯ãããã¯ã®äžé©åãªäœ¿çšãåæI / Oæäœã®å®äºã®åŸ æ©ãªã©ãã³ãŒãã®åé¡ã瀺ããŠããå¯èœæ§ããããŸãïŒè©³çŽ°ã«ã€ããŠã¯ãåæI / Oã®ã¢ã³ããã¿ãŒã³ãåç §ããŠãã ããïŒã
ããã»ããµããããã£ã¢ãã£ããã£ïŒããã»ã¹ãç¹å®ã®ããã»ããµã«ãã€ã³ãããïŒã«ãããããã»ããµãŸãã¯ããã»ããµã³ã¢ãããã«ããã¯ã«ãªãå¯èœæ§ããããŸãã ãã®ç¶æ³ã¯ãã¯ãŒã«ãŒããŒã«ãæã€Azureã®ã¯ã©ãŠãã¢ããªã±ãŒã·ã§ã³ã§çºçããå¯èœæ§ããããŸãã WebããŒã«ããã®èŠæ±ã¯ãããŒããã©ã³ãµãŒããã€ãã¹ããŠãåžžã«ç¹å®ã®ã¯ãŒã«ãŒããŒã«ã«éä¿¡ã§ããŸãã
ç¹å®ã®ãµãŒããŒã®CPU䜿çšç
ããã»ããµã¯ããŠãŒã¶ãŒã¢ãŒããšç¹æš©ã¢ãŒãã®2ã€ã®ã¢ãŒãã§åäœããŸãã ãŠãŒã¶ãŒã¢ãŒãã§ã¯ãããã»ããµã¯ã¢ããªã±ãŒã·ã§ã³ã®ããžãã¹ããžãã¯ãæ§æããåœä»€ãå®è¡ããŸãã ç¹æš©ã¢ãŒãã§ã¯ãããã»ããµã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ã«ãŒãã«ã¬ãã«ã®æäœïŒãã¡ã€ã«æäœãã¡ã¢ãªå²ãåœãŠãã¹ã¯ããã³ã°ãã¹ã¬ããå¶åŸ¡ãããã»ã¹éã®ã³ã³ããã¹ãåãæ¿ããªã©ïŒãå®è¡ããŸãã ããã»ããµã®è² è·ã远跡ããã«ã¯ã次ã®ããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒãç£èŠããå¿ èŠããããŸãã
- ããã»ããµãŒ\ïŒ ç¹æš©æéããã»ããµãŒãç¹æš©ã¢ãŒãã§è²»ããæéã ãã®ã«ãŠã³ã¿ãŒã®åžžã«é«ãå€ã¯ãã·ã¹ãã ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æ©èœãå®è¡ããã®ã«ããªãã®æéãè²»ããã倧éã®I / Oæäœãããã»ã¹ãŸãã¯ã¹ã¬ããã®çµ¶ãéãªããããã¯ãã¡ã¢ãªç®¡çäžã®é床ã®ã¹ã¯ããã³ã°ãŸãã¯ãªãŒããŒãããïŒã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãªã©ïŒã«ãã£ãŠåŒãèµ·ããããå¯èœæ§ãããããšã瀺ããŸãã
- ããã»ããµ\ïŒ ãŠãŒã¶ãŒæéãã·ã¹ãã é¢æ°ã§ã¯ãªããããã»ããµãã¢ããªã±ãŒã·ã§ã³ã³ãŒãã®å®è¡ã«è²»ããæéã
- ããã»ããµ\ïŒ Processor Timeããã»ããµã®åèšè² è·ïŒãŠãŒã¶ãŒã¢ãŒãããã³ç¹æš©ã¢ãŒãïŒã éåžžãããã»ããµã®è² è·ã¯é«ãå€ãšäœãå€ã®éã§å€åããŸãããåžžã«é«ãã¬ãã«ïŒ80ïŒ ãè¶ ããïŒã¯ãããã»ããµãããã«ããã¯ã«ãªã£ãŠããå¯èœæ§ãããããšãæå³ããŸãã ããšãã°ã ããžãŒããã³ããšã³ãã¢ã³ããã¿ãŒã³ã¯ãæåã«1ã€ã®WebããŒã«ã«è² è·ãéäžããç¶æ³ã瀺ãããã¥ãŒã䜿çšããŠããŒã¿åŠçãåã ã®äœæ¥ããŒã«ã«è»¢éããéã®å¿çæéãæ¹åããæ¹æ³ã瀺ããŸãã
CPUãéäžçã«äœ¿çšããããã»ã¹
ã¹ãã¬ã¹ãã¹ãäžã«ããã¹ãç°å¢ã§ããã»ã¹è² è·ãé«ããªãå¯èœæ§ã®ããåå ã調æ»ã§ããŸãã ãã®ãããªã¢ãããŒãã¯ãå€éšèŠå ã®åœ±é¿ãæé€ããã®ã«åœ¹ç«ã€ã¯ãã§ãã å€ãã®APMããŒã«ã¯ãã¹ã¬ãããããã¡ã€ãªã³ã°ããµããŒãããŠãããããã»ããµãåŠçã®ã¹ã¿ãã¯ãå®è¡ããæ¹æ³ãåæããŸãã å³ã¯ãNew Relicã§ã®ãããã¡ã€ãªã³ã°ã®äŸã瀺ããŠããŸãã
New Relicã®ãããã¡ã€ãªã³ã°
äžå®æéãããã¡ã€ãªã³ã°ããåŸãNew Relicã§ã¯ãã®æ å ±ãåæããCPUæéãæãå€ãæ¶è²»ããæäœã調æ»ã§ããŸãã åä¿¡ããæ å ±ã¯ãã³ãŒãæé©åã®ããã®ä¿¡å·ã§ããå ŽåããããŸãã
ãã®ææ³ã¯éåžžã«åŒ·åãªããŒã«ã§ãããå®éã®ãŠãŒã¶ãŒã®ããã©ãŒãã³ã¹ã«å€§ããªåœ±é¿ãäžããå¯èœæ§ããããŸãã ãããã£ãŠãå®éã®ç°å¢ã§ãã®ããã»ã¹ãå®è¡ããå Žåã¯ãããŒã¿ãåéããåŸããã«ãããã¡ã€ã©ãŒããªãã«ããå¿ èŠããããŸãã
ãã£ã¹ã¯äœ¿çšé
I / Oã¬ãŒããé«ãã®ã¯ãéåžžãããžãã¹ã€ã³ããªãžã§ã³ã¹ãç»ååŠçãªã©ã®ã¿ã¹ã¯ãåå ã§ãã ããã«ãå€ãã®ã¹ãã¬ãŒãžãµãŒãã¹ïŒAzure SQL DBãAzure StorageãAzure DocumentDBãªã©ïŒã¯ãã£ã¹ã¯ãªãœãŒã¹ãç©æ¥µçã«äœ¿çšããŸãã ãµãŒãã¹ãå®è¡ããä»®æ³ãã·ã³ãäœæããŠããå Žåããã£ã¹ã¯ã¢ã¯ã»ã¹ã®ç£èŠãå¿ èŠã«ãªãå ŽåããããŸãã ããã¯ãé©åãªãã£ã¹ã¯æ§æãéžæããŠããã©ãŒãã³ã¹ãåäžãããããã§ãã
ã¡ã¢ãªãéäžçã«äœ¿çšããã¢ããªã±ãŒã·ã§ã³ã¯ã倧éã®ãã£ã¹ã¯ã¢ã¯ãã£ããã£ãããªã¬ãŒããããšããããŸãã ã¡ã¢ãªã䜿ãããããšããµã€ãºã倧ãããªããçµæãšããŠããã©ãŒãã³ã¹ãäœäžããå¯èœæ§ããããŸãã ãã®å Žåãããã€ãã®ã€ã³ã¹ã¿ã³ã¹ã«è² è·ãååæ£ããããã«ããŒã«ãæ°Žå¹³ã«ã¹ã±ãŒãªã³ã°ããå¿ èŠããããããããŸãããããã®åã«ã¢ããªã±ãŒã·ã§ã³ã§æ£ããã¡ã¢ãªäœ¿çšéãåæããå¿ èŠããããŸãïŒçç±ã¯éåžžã®ãªãŒã¯ã§ãïŒã
Azureã§ã¯ãä»®æ³ãã£ã¹ã¯ïŒä»®æ³ãã·ã³ã§äœ¿çšïŒã¯Azure Storageã§äœæãããŸãã çŸåšãAzureã¹ãã¬ãŒãžã«ã¯ãæšæºãšãã¬ãã¢ã ã®2çš®é¡ããããŸãã ä»®æ³ãã£ã¹ã¯ã®ããã©ãŒãã³ã¹ã¯ã1ç§ãããã®I / Oæäœæ°ãš1ç§ãããã®MBåäœã®ã¹ã«ãŒãããã§æž¬å®ãããŸãã IOPSïŒè±èªããã®å ¥å/åºåæäœã®æ°ã1ç§ãããã®å ¥å/åºåæäœïŒã¯ãããŸããŸãªã¿ã€ãã®ã¹ãã¬ãŒãžã®ããã©ãŒãã³ã¹ã®æšæºçãªææšã§ãã æšæºã¹ãã¬ãŒãžã䜿çšãããšã1ç§ãããæ倧500ã®I / OæäœãåŠçã§ããæ倧ããã©ãŒãã³ã¹ã¯60 Mbpsã§ãã ãã¬ãã¢ã ã¹ãã¬ãŒãžã¯SSDã«åºã¥ããŠãããæ倧5,000 I / Oã®é床ã§åäœã§ãã200 Mb / sã®ã¹ã«ãŒããããæäŸããŸãã
ä»®æ³ãã·ã³æ§æã§RAIDãã£ã¹ã¯ã䜿çšãããšã¹ã«ãŒããããåäžããŸããããã®å ŽåãI / OèŠæ±ã¯ä»®æ³ãã·ã³èªäœã®ã¬ãã«ã§å¶åŸ¡ãããŸãã 詳现ã«ã€ããŠã¯ãä»®æ³ãã·ã³ã®ãµã€ãºãåç §ããŠãã ããã
: IOPS I/O-. , , , IOPS . , , IOPS. I/O .
() SQLIO Disk Subsystem Benchmark Tool . , , :
I/O
, , , 500 . , RAID-, 4- ( Azure Storage) .
I/O striped-
1400 IOPS. Premium-, 80000 IOPS .
, () Azure. , IOPS Premium- (5000 IOPS) ( RAID) . , () I/O IOPS . . Premium Storage: High-Performance Storage for Azure Virtual Machine Workloads.
Azure I/O . APM- . , New Relic. I/O-, , . , , 100%, IOPS 1500. RAID` 4- ( ):
, ( Physical Disc):
- Avg. Disk sec/Read Avg. Disk sec/Write. ( ) . , . (payload) 64 15 . - I/O , , .
- Disk Transfers/sec. . , , , IOPS. I/O- . , . . , , 100 10 , 50 20 . (, ). .
- Disk Bytes/Sec, Disk Read Bytes/sec Disk Writes Bytes/sec. , . 1 MB 256 4 , . , 15 , I/O , Avg. Disk Bytes/Read Avg. Disk Bytes/Write
- Avg. Disk Queue Length, Avg. Disk Read Queue Length, and Avg. Disk Write Queue Length. I/O , ( ). :
- Avg. Disk Queue Length = (Disk Transfers/sec) * ( Disk sec/Transfer)
, .. . - % Idle Time. . . , . 1 , %idle time 0. , , , ( ).
Azure , , . , .
, , (backend pressure). , , , . . , .
?
Azure Azure (Storage, SQL DB, Service Bus ..). APM.
. . , , . , .
?
, -, SLA. . - Azure. , , .. .
Azure Storage
Azure Storage. , -. C (end-to-end) Azure Storage , .
Azure Azure Storage, -. , .
Azure
Azure Storage
. Azure Storage . (Premium ). , . , , .
Azure. , . .
, Azure
Azure SQL
, Azure SQL Database, , - . Azure .
Azure
Azure SQL Database Microsoft. Microsoft SLA, 99.9%. , ( ) .
, , , (, ). APM, . New Relic . , -.
New Relic
, . . , (, , ). Azure.
Azure SQL Database DTU
AZURE SQL database Database Throughput Units, DTU. DTU , , I/O . SQL Azure, . DTUs ( 5 DTU 1750 Premium/P11). DTU, , . , DTU , Azure. , .
DTU Azure
Azure SQL
, , , , . . CPU, Data I/O, Log I/O, , , , . , ( ).
Dynamic SQL , , . sys.dm_db_resource_stats, , ( , 80%).
(COUNT(end_time) - SUM(CASE WHEN avg_cpu_percent > 80 THEN 1 ELSE 0 END) * 1.0) / COUNT(end_time) AS 'CPU Fit Percent' ,(COUNT(end_time) - SUM(CASE WHEN avg_log_write_percent > 80 THEN 1 ELSE 0 END) * 1.0) / COUNT(end_time) AS 'Log Write Fit Percent' ,(COUNT(end_time) - SUM(CASE WHEN avg_data_io_percent > 80 THEN 1 ELSE 0 END) * 1.0) / COUNT(end_time) AS 'Physical Data Read Fit Percent' FROM sys.dm_db_resource_stats```
3ã€ã®èŠæ±ãããã¡ããªãã¯ã®ããããã«å¯Ÿãããã®èŠæ±ã99.9ïŒ æªæºã®å€ãè¿ãå ŽåãããŒã¿ããŒã¹ããã©ãŒãã³ã¹ã®ããé«ãã¬ãã«ãžã®ç§»è¡ãæ€èšããããããŒã¿ããŒã¹ã®è² è·ãæžããããã«æé©åããå¿ èŠããããŸãã
ãã®æ å ±ã¯ãAzureããŒã¿ã«ã§ãå ¥æã§ããŸãã
AzureããŒã¿ã«ã®Azure SQLçµ±èš
ã¯ãšãªããã©ãŒãã³ã¹
å¹çã®æªãããŒã¿ããŒã¹ã¯ãšãªã¯ãåŸ ã¡æéãšã¹ã«ãŒãããã«å€§ããªåœ±é¿ãäžããå¯èœæ§ããããéå°ãªãªãœãŒã¹æ¶è²»ãåŒãèµ·ããå¯èœæ§ããããŸãã ã¯ãšãªããã©ãŒãã³ã¹ããŒãžã«ã¯ãåçè¡šçŸããã¯ãšãªæ å ±ãæœåºããAzure SQLããŒã¿ã«ã§ãã®ããŒã¿ãèŠèŠåã§ããŸãã
Azure SQL Portalã®ã¯ãšãªããã©ãŒãã³ã¹
å®è£ èšç»ãèŠãŠãæãé£ããèŠæ±ãæãäžããããšãã§ããŸãã ãã®ããŒã¿ã¯ãã¯ãšãªã®é·ââæéå®è¡ã®çç±ãå€æããããããæé©åããã®ã«åœ¹ç«ã¡ãŸãã
Azure SQL Portalã¯ãšãªå®è¡ãã©ã³
å€æ°ã®ããŒã¿ããŒã¹ã¯ãšãª
ã¢ããªã±ãŒã·ã§ã³ãšããŒã¿ããŒã¹éã®å€§éã®ãã©ãã£ãã¯ã¯ããã£ãã·ã¥ã®äžè¶³ã瀺ããŠããå¯èœæ§ããããŸãã æœåºãããããŒã¿ãåæããå¿ èŠããããŸããããšãã°ãã¢ããªã±ãŒã·ã§ã³ã絶ããåãããŒã¿ãèŠæ±ããã³æŽæ°ããå Žåãã¢ããªã±ãŒã·ã§ã³ãŸãã¯å ±æåæ£ãã£ãã·ã¥ã«ããŒã«ã«ã«ãã£ãã·ã¥ããŸãã Azure SQLããŒã¿ã«ã®[ã¯ãšãªããã©ãŒãã³ã¹]ããŒãžã¯ãå®è¡ã°ã©ãã®åœ¢åŒã§æçšãªæ å ±ãšãåã¯ãšãªã®å®è¡æ°ïŒå®è¡ã«ãŠã³ãïŒãæäŸããŸãã
Azure SQL Portalã¯ãšãªé »åºŠã®ç£èŠ
éåžžã«é »ç¹ã«å®è¡ãããïŒå®è¡ã«ãŠã³ããé«ãïŒã¯ãšãªã¯ãå¿ ãããåãããŒã¿ãè¿ããšã¯éããŸããïŒäžéšã®ã¯ãšãªã¯ç¹å¥ãªãªããã£ãã€ã¶ãŒã«ãã£ãŠãã©ã¡ãŒã¿ãŒåãããŸãïŒãããã£ãã·ã¥ã®åè£ã決å®ããããã®éå§ç¹ãšããŠäœ¿çšã§ããŸãã
Azure SQLã®ãããããã¯
æé©ã§ãªããã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ããããããã¯ãçºçããå ŽåããããŸãã ãããããã¯ãçºçããå Žåã¯ããã©ã³ã¶ã¯ã·ã§ã³ãããŒã«ããã¯ïŒããŒã«ããã¯ïŒããŠãåŸã§åå®è¡ããå¿ èŠããããŸãã é »ç¹ã«ãããããã¯ãçºçãããšãããã©ãŒãã³ã¹ãå€§å¹ ã«äœäžããå¯èœæ§ããããŸãã Azure SQLããŒã¿ã«ã§ãããããã¯ã远跡ãããããããã¯ãçºçããããå®è¡æã«ã¢ããªã±ãŒã·ã§ã³ãã¬ãŒã¹ãåæããŠåå ãç¹å®ã§ããŸãã
ãµãŒãã¹ãã¹ã®åŸ ã¡æé
ãµãŒãã¹ãã¹ïŒãªãã¹ã³ãã¹ã以äžSBïŒã«ã¢ã¯ã»ã¹ããéã®é«ã¬ãã«ã®ã¬ã€ãã³ã·ã¯ãããã©ãŒãã³ã¹ã®äœäžã«ã€ãªããå¯èœæ§ããããŸãã ãããã¯ãŒã¯ã®çç±ïŒã¯ã©ã€ã¢ã³ãããã®SBåå空éã®ãªã¢ãŒãæ§ã«é¢é£ãããã±ããæ倱ãªã©ïŒãSBå ã®ç«¶åïŒãããã¯ããã¥ãŒããµãã¹ã¯ãªãã·ã§ã³ãã€ãã³ããããã¢ã¯ã»ã¹ãšã©ãŒãªã©ãããŸããŸãªçç±ã«ããçºçããå¯èœæ§ããããŸãããã¥ãŒããããã¯ãããã³ã€ãã³ãããçšã®SBããã ããMicrosoft Azã«ãŠã³ã¿ãŒã®ã³ã¬ã¯ã·ã§ã³ãã¢ããªã±ãŒã·ã§ã³ã³ãŒãã«è¿œå ããããšã«ãããããã©ãŒãã³ã¹ã«é¢ãã詳现ãªæ å ±ïŒéåä¿¡æäœã®åŸ æ©æéãæ¥ç¶ãšã©ãŒãªã©ïŒãååŸã§ããŸãã ure Service Busã¯ã©ã€ã¢ã³ãåŽããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒïŒhttps://www.nuget.org/packages/WindowsAzure.ServiceBus.PerformanceCountersïŒ
ãµãŒãã¹ãã¹æ¥ç¶ã®æåŠãšèª¿æŽ
ãã¥ãŒããããã¯ãããã³SBãµãã¹ã¯ãªãã·ã§ã³ã«ã¯ã垯åå¹ ãå¶éã§ããã¯ã©ãŒã¿ããããŸãã ããšãã°ãæ倧ãã¥ãŒãŸãã¯ãããã¯ãµã€ãºãåææ¥ç¶æ°ããã³åæèŠæ±æ°ãå«ãŸããŸãã ãããã®ã¯ã©ãŒã¿ãè¶ ãããšãSBã¯ãã以äžã®èŠæ±ãæåŠãå§ããŸãã 詳现ã«ã€ããŠã¯ã azure.microsoft.com / documentation / articles / service-bus-quotasãã芧ãã ããã ããŒã¿ã«ããŒã¿ã«Azureã®SBã®ãã¥ãŒãšãããã¯ãééãããã©ãã£ãã¯ã®éãå¶åŸ¡ã§ããŸãã
ã€ãã³ãããã®ããªã¥ãŒã ã¯ã¹ã«ãŒãããåäœã§æ±ºå®ãããäœææã«èšå®ãããŸãã 1ã€ã®ã¹ã«ãŒããããŠãããã¯ãçä¿¡ãã©ãã£ãã¯ïŒå ¥åïŒã§1 MB /ç§ãçºä¿¡ãã©ãã£ãã¯ïŒåºåïŒã§2 MB /ç§ã®é床ã«çžåœããŸãã ã¢ããªã±ãŒã·ã§ã³ãã¹ã«ãŒããããŠãããã®èšå®æ°ãè¶ ãããšãããŒã¿ã®éåä¿¡é床ãäœäžããŸãã ãã¥ãŒããã³ãããã¯ãšåæ§ã«ãAzureããŒã¿ã«ã§ã€ãã³ãããã®é床ãå¶åŸ¡ã§ããŸãã çä¿¡ãã©ãã£ãã¯ãšçºä¿¡ãã©ãã£ãã¯ã®ã¯ã©ãŒã¿ã¯å¥ã ã«é©çšãããããšã«æ³šæããŠãã ããã
ãµãŒãã¹ãã¹ã§ã®å€±æãããªã¯ãšã¹ããšãã€ãºã³ã¡ãã»ãŒãž
ã¡ãã»ãŒãžåŠçãšã©ãŒã®é »åºŠãšãèš±å¯ãããåŠçæ°ãè¶ ããæ害ã¡ãã»ãŒãžã®åèšéãç£èŠããŸãã ã¢ããªã±ãŒã·ã§ã³ã®èšèšã«ãã£ãŠã¯ã誀ã£ãã¡ãã»ãŒãžã1ã€ã§ãã·ã¹ãã å šäœã®é床ãäœäžããå ŽåããããŸãã 倱æãããªã¯ãšã¹ããšãã€ãºã³ã¡ãã»ãŒãžãåæããŸãã
Event Hub Quotaã®äŸå€
ã¯ã©ãŠãã¢ããªã±ãŒã·ã§ã³ã¯ãAzure Event Hubãã¹ãã¬ãŒãžãšããŠäœ¿çšããŠãã¯ã©ã€ã¢ã³ãããåä¿¡ãã倧éã®ããŒã¿ïŒéåæã€ãã³ãã®åœ¢åŒïŒãéçŽã§ããŸãã ã€ãã³ãããã¯ãäœã¬ã€ãã³ã·ãšé«å¯çšæ§ãåããçä¿¡ã€ãã³ãã®é«éãç¶æããããã«åŠçããããã«ã€ãã³ããéä¿¡ããä»ã®ãµãŒãã¹ãšçµã¿åãããŠäœ¿çšââãããŸãã
ã€ãã³ãããã®å®¹éã¯ãè³Œå ¥æã«èšå®ããã垯åå¹ ãŠãããã®æ°ã«ãã£ãŠå¶åŸ¡ãããŸãã 1ã€ã®ãŠãããããµããŒããããã®ïŒ
* å ¥å ïŒ1ç§ãããæ倧1MBã®ããŒã¿ããŸãã¯1ç§ããã1000ã€ãã³ãã
* åºå ïŒ1ç§ãããæ倧2MBã
çä¿¡ãã©ãã£ãã¯ã¯ãå©çšå¯èœãªåž¯åå¹ ã®åäœã®æ°ã«ãã£ãŠèŠå¶ãããŸãã è¶ éããå Žåããã¯ã©ãŒã¿è¶ éãäŸå€ãã¹ããŒãããŸãã çºä¿¡ãã©ãã£ãã¯ãè¶ ããå ŽåãäŸå€ã¯çºçããŸããããé床ã¯ã¹ã«ãŒããããŠãããã®å®¹éã«ãã£ãŠå¶éãããŸãïŒåºæ¬ããŒãžã§ã³ã§ã¯1ç§ããã2 MBïŒã
AzureããŒã¿ã«ã®ããã·ã¥ããŒãã衚瀺ããŠãã€ãã³ãããã®åäœãå¶åŸ¡ã§ããŸãã
Azure Portalã§ã®ã€ãã³ãããã®ç£èŠ
ãããªã±ãŒã·ã§ã³ã®æ°ã«é¢é£ããäŸå€ã衚瀺ãããå ŽåããŸãã¯éä¿¡ãã©ãã£ãã¯ã®äºæ³ãããã€ã³ãžã±ãŒã¿ãŒã衚瀺ãããªãå Žåã¯ã[ã¹ã±ãŒã«]ããŒãžã®AzureããŒã¿ã«ã§ãããžã§ã¯ãã«èšå®ãããŠããã¹ã«ãŒããããŠãããã®æ°ã確èªããŸãã
Event Hubã®åž¯åå¹ å²ãåœãŠ
Event HubãªãŒã¹ã®ãšã©ãŒ
ã¢ããªã±ãŒã·ã§ã³ã¯__EventProcessorHost_ãªããžã§ã¯ãã䜿çšããŠãã€ãã³ãã®ã³ã³ã·ã¥ãŒããŒã«ã¯ãŒã¯ããŒããåæ£ã§ããŸãã __EventProcessorHost_ãªããžã§ã¯ãã¯ãã€ãã³ãã³ã³ã»ã³ãã¬ãŒã¿ãŒã®åã»ã¯ã·ã§ã³ã«Azure Storage BLOBããã¯ãäœæãããããã®BLOBã䜿çšããŠããŒãã£ã·ã§ã³ã管çããŸãïŒã€ãã³ãã®åä¿¡ãšéä¿¡ïŒã _EventProcessorHost_ã®åã€ã³ã¹ã¿ã³ã¹ã«ã¯2ã€ã®é¢æ°ããããŸãã
1.ããã¯ã®æ¡åŒµïŒããã¯ã¯çŸåšã€ã³ã¹ã¿ã³ã¹ã«ãã£ãŠææãããŠãããå¿ èŠã«å¿ããŠå®æçã«æ¡åŒµãããŸã
2.ããã¯ã®äœæïŒåã€ã³ã¹ã¿ã³ã¹ã¯ãæ¢åã®ãã¹ãŠã®ããã¯ã®æå¹æéãç¶ç¶çã«ãã§ãã¯ããããã¯ãããå Žåã¯ãããã¯ãããŸã
ã¡ãã»ãŒãžã®ååŠçãšãããã¯BLOBã®çºçé »åºŠãç£èŠããå¿ èŠããããŸãã
äŸåãµãŒãã¹ã®äœ¿çš
ã¹ãã¬ãŒãžãSQLããŒã¿ããŒã¹ãããã³ãµãŒãã¹ãã¹ã«å ããŠãå€æ°ã®AzureãµãŒãã¹ãããããã®æ°ã¯åžžã«å¢å ããŠããŸãã ãã¹ãŠã®ãµãŒãã¹ãã«ããŒããããšã¯ã§ããŸãããã䜿çšããåãµãŒãã¹ãæäŸããäž»èŠãªåŽé¢ãå¶åŸ¡ããæºåãããå¿ èŠããããŸãã äŸãšããŠãAzure Redis Cacheã䜿çšããŠå ±æãã£ãã·ã¥ãå®è£ ããå Žåã次ã®åé¡ãåæããããšã§ãã®æå¹æ§ãå€æã§ããŸãã
*æ¯ç§ãã£ãã·ã¥ã«å ¥ããããããŒã¿ãšå ¥ããããªãããŒã¿ã®éã¯ïŒ
ãã®æ å ±ã¯ãAzureããŒã¿ã«ã§å ¥æã§ããŸãã
Azure Portalã§ã®Azure Redisãã£ãã·ã¥ã®ç£èŠ
ã·ã¹ãã ãå®å šãªåäœç¶æ ã«éãããã£ãã·ã¥ä¿æ°ãäœããªã£ãåŸããã£ãã·ã¥æŠç¥ã調æŽããå¿ èŠãããå ŽåããããŸãã
åæ£ãã£ãã·ã¥ã«æ¥ç¶ããã¯ã©ã€ã¢ã³ãã®æ°ã¯ïŒ
AzureããŒã¿ã«ã䜿çšããŠãæ¥ç¶ãããŠããã¯ã©ã€ã¢ã³ãã®æ°ãå¶åŸ¡ã§ããŸãã
åææ¥ç¶ã®å¶éã¯10000ã§ãããã®å¶éã«éãããšã以éã®æ¥ç¶è©Šè¡ã¯çµäºããŸãã ã¢ããªã±ãŒã·ã§ã³ãåžžã«ãã®å¶éã«éããå Žåã¯ããŠãŒã¶ãŒéã§ãã£ãã·ã¥ãåæ£ããããšãæ€èšããå¿ èŠããããŸãã
ãã£ãã·ã¥ã¯ã©ã¹ã¿ãŒã§æ¯ç§äœåã®æäœïŒåä¿¡ããã³æžã蟌ã¿ïŒãçºçããŸããïŒ
AzureããŒã¿ã«ã§Gets and Setsã«ãŠã³ã¿ãŒã衚瀺ã§ããŸãã
ãã£ãã·ã¥ã¯ã©ã¹ã¿ãŒã«ä¿åãããããŒã¿ã®é
AzureããŒã¿ã«ã®Used Memoryã«ãŠã³ã¿ãŒã«ã¯ããã£ãã·ã¥ã®ãµã€ãºã衚瀺ãããŸãã èš±å¯ããããã£ãã·ã¥ãµã€ãºã®åèšã¯ãäœææã«èšå®ãããŸãã
ãã£ãã·ã¥é 延ã¬ãã«ãšã¯äœã§ããïŒ
AzureããŒã¿ã«ã§ãã£ãã·ã¥èªã¿åãããã³ãã£ãã·ã¥æžã蟌ã¿ã«ãŠã³ãã远跡ãããã£ãã·ã¥ã®èªã¿åãããã³æžã蟌ã¿é床ïŒKB /ç§ã§æž¬å®ïŒã決å®ã§ããŸãã
ãã£ãã·ã¥ãµãŒããŒã¯ã©ããããå¿ããã§ããïŒ
AzureããŒã¿ã«ã®ãµãŒããŒè² è·ã«ãŠã³ã¿ãŒãç£èŠããŸãã ãã®ã«ãŠã³ã¿ãŒã¯ãRââedis CacheãµãŒããŒããªã¯ãšã¹ãã®åŠçã§ããžãŒã§ããæéã®å²åã瀺ããŸãã ãã®ã«ãŠã³ã¿ãŒã100ïŒ ã«éããå Žåãããã¯Redis CacheãµãŒããŒã®ããã»ããµãŒæéãæ倧å€ã«éãããµãŒããŒãé«éã§å®è¡ã§ããªãããšãæå³ããŸãã ãµãŒããŒã§å®å®ããé«è² è·ãçºçããå Žåãããããããã€ãã®ãªã¯ãšã¹ããã¿ã€ã ã¢ãŠãã«ãªããŸãã ãã®å Žåããã£ãã·ã¥ãªãœãŒã¹ãå¢ããããè€æ°ã®ãã£ãã·ã¥ã«ããŒã¿ãåå²ããããšãæ€èšããå¿ èŠããããŸãã
èŠçŽãã
- ãã¬ã¡ããªã䜿çšããŠããã©ãŒãã³ã¹ããŒã¿ãååŸããŸãã
- äºæ¥éå¶ã å€éšAPIãžã®ãã¹ãŠã®åŒã³åºããå¶åŸ¡ããŸãã éèŠãªäºæ¥éå¶ã«ã¯ç¹ã«æ³šæãæãå¿ èŠããããŸãã
- ãã©ãŠã¶ã®ã¡ããªãã¯ã æ°èŠãŠãŒã¶ãŒãšãªããŒã¿ãŒã®æ å ±ãããã³ãã©ãŠã¶ãŒã®çš®é¡ã«é¢ããæ å ±ãååãã
- çä¿¡ããã³çºä¿¡ãããã¯ãŒã¯ãã©ãã£ãã¯ãç£èŠãã
- ã¡ã¢ãªäœ¿çšéãšããããããžãã¹ã¯ãŒã¯ããŒãã«ã©ã®ããã«é¢é£ããããç£èŠãã
- CPU䜿çšçãšã¹ã¬ãã䜿çšç
- ãã¥ãŒã®é·ããšãã¥ãŒã®ã¿ã€ã ã¢ãŠã
- å€éšãµãŒãã¹ã é 延ãšåž¯åå¹ ãããã³ãšã©ãŒã
- ãã¬ã¡ããªã䜿çšããŠã¢ã©ãŒããäœæããããžãã¹äŸå€ãšSLAéåãç£èŠããŸã
- ãã¬ã¡ããªã®ç£èŠãšåéã¯ãããã©ãŒãã³ã¹ã®åé¡ãç¹å®ããããã ãã«äœ¿çšããªãã§ãã ããïŒäºåŸå¯Ÿå¿çã¢ãããŒãïŒã çŸåšã®ãµãŒããŒå®¹éãå°æ¥ã®ããžãã¹è² è·ã®å¢å ãšã©ã®ããã«çžé¢ãããããŸãã¯äºæããªããŠãŒã¶ãŒã®è¡åãã·ã¹ãã ã®æ£åžžãªæ©èœã«ã©ã®ããã«åœ±é¿ãããã瀺ãããšãã§ããããããã®æ å ±ãç©æ¥µçã«äœ¿çšããŠãã ãã
- ããã©ãŒãã³ã¹åæã¯ã芳å¯ã枬å®ãæ€èšŒãå«ãåšæçãªç 究ããã»ã¹ã§ãã ãã¹ãŠã®ã¢ãããŒãã§ãã©ã¹ã®çµæãåŸãããããã§ã¯ãããŸããã ããã¯äºç®ãå¿ èŠã§ãã ããã¯ãã·ã¹ãã ã®ã©ã€ããµã€ã¯ã«å šäœã§ç¶ç¶ããç¶ç¶çãªããã»ã¹ã§ãã
- äœã¬ãã«ã®è©³çŽ°ã«ãã ãããªãã§ãã ããã ç¹å®ã®ã¿ã¹ã¯ã®ã³ã³ããã¹ãã§ãšã³ãžãã¢ãªã³ã°ã¹ãã«ãè©äŸ¡ããŸãã åããã©ãŒãã³ã¹ã«ãŠã³ã¿ãŒã詳现ã«ç解ããå¿ èŠã¯ãããŸããã 代ããã«ããŠãŒã¶ãŒããŠãŒã¶ãŒã®ããžãã¹ã¢ã¯ãã£ããã£ã«ã©ã®ããã«é¢ä¿ãããã«çŠç¹ãåœãŠãåŸè ããŠãŒã¶ãŒã«äžãã圱é¿ãåæããå¿ èŠããããŸãã
- ã·ã¹ãã ã®æ¥ã ã®éçšã«å€§ããªåœ±é¿ãäžããå¯èœæ§ãããããããã¬ã¡ããªãŒã®ãªã³/ãªãã®åãæ¿ãïŒããã³ãã®è©³çŽ°ã¬ãã«ã®å€æŽïŒãæ€èšããŠãã ããã ããšãã°ããããã¡ã€ãªã³ã°ã¯åžžã«æ©èœããå¿ èŠã¯ãããŸãããããªãã¬ãŒã¿ãŒãããã©ãŒãã³ã¹ã®åé¡ãç¹å®ããããšããå Žåã«ã¯ãããã¡ã€ãªã³ã°ãå«ããå¿ èŠããããŸãã å¯èœã§ããã°ãã¢ããªã±ãŒã·ã§ã³ã®èšå®ã䜿çšããŠããã¬ã¡ããªãŒãéžæçã«æå¹ã«ããŸãã
- å€éšAPMã§ã¯ãªããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããŒã«ã䜿çšããããšããå§ãããŸãã
ãæž èŽããããšãããããŸããïŒ
èšäºã®äžéšïŒ
äž»èŠæ¥çžŸè©äŸ¡ææšåæ-ããŒã1
äž»èŠæ¥çžŸè©äŸ¡ææšåæ-ããŒã2ãã«ã¹ã¿ã ãããžãã¹ãããã³ã¢ããªã±ãŒã·ã§ã³ã¡ããªãã¯ã®åæã«ã€ããŠ
äž»èŠæ¥çžŸè©äŸ¡ææšåæ-ããŒã3ãã·ã¹ãã ãšãµãŒãã¹ã«é¢ããæåŸã®ã¡ããªãã¯ã