2021-11-01ãã1ã¶æéã®è¨äºä¸è¦§
gmo.connpass.com ä»æ¥ä¹ ãã¶ãã«ãã¯ã©ã¦ãç°å¢ã§è²ã£ãç§ããCPU stealãã¨ããææ¨ãç¥ã£ã話ãã£ã¦ã¿ã¤ãã«ã§LTããã¦ããããããå ¥ã£ã¦ãããã®åååºãã¦ã®ç»å£ã¯åãã¦ã ã£ãããªã¢ã¼ãã ã¨ãªã¢ã¯ã·ã§ã³ãåãããªãããä¸å®ã«ãªã£ã¦ããã®ããã¾ã â¦
ç®æ¬¡ ç®æ¬¡ æ¦è¦ tcpã½ã±ããããã°ã©ãã³ã°ã¨ã¯ ãµã¼ãå´ 3way-handshakeã¨ç¶æ é·ç§» backlogã¨ã¯ syn-queue ã©ããã£ãã溢ããã 溢ãããã©ããªãã accept-queue ã©ããã£ãã溢ããã (ã¡ã¢)Nginxã®ã¢ã¼ããã¯ã㣠溢ãããã©ããªãã tcp_abort_on_overâ¦
æé·é度ãå éããè¦å ã£ã¦ãªãã ããã£ã¦æ£æ©ããªããæã£ããä»è è©ä¾¡ãæ°ã«ããªãã§èªåã§ãä¸æ°ã«æé·ãããªãã£ã¦æãããã¨ãã§ããã®ã¯ä»¥ä¸ã®ãããªæããªæ°ãããã æ°ããç°å¢ã«è¡ã£ãæ 大ããã®ã¿ã¹ã¯ãããåã£ãæ é ¼ããä¸å¸ãå 輩ãååã®ç°â¦
ltraceãstraceãããptrace(2)ã®åå¨ãç¥ãã¾ããã surf.ml.seikei.ac.jp ptrace() ã·ã¹ãã ã³ã¼ã«ã¯ã親ããã»ã¹ããå¥ã®ããã»ã¹ã®å®è¡ã®ç£è¦/å¶å¾¡ã è¡ã£ãããã³ã¢ã¤ã¡ã¼ã¸ (core image) ãã¬ã¸ã¹ã¿ã®èª¿æ»/å¤æ´ã è¡ã£ããããæ段ãæä¾ããã ptraceâ¦
éåæI/Oã®ã³ã³ããã¹ãæ°ã¯/proc/sys/fs/aio-nrã§ç¢ºèªã§ã/proc/sys/fs/aio-max-nrã«éããã¨ãio_setup ã·ã¹ãã ã³ã¼ã«ã®æ»ãå¤ã« EAGAIN ãè¿ãããã $ cat /proc/sys/fs/aio-nr 0 $ cat /proc/sys/fs/aio-max-nr 65536 MySQLã§éãã§ããã以ä¸ã®ããâ¦
ryuichi1208.hateblo.jp ã£ã¦è¨äºãã¡ãã£ã¨åã«æ¸ããããã®ã¨ãã«ãã£ã¦ã転è·æ´»åã§ãã£ã¦ã¿ã¦è¯ãã£ãã¨æã£ããã¨ãåæãã¦ã¿ãè¨äºã転è·æ´»åèªä½ã¯2021/02 ~ 2021/05ãããã¾ã§ãã£ã¦ã¦é¸èã¾ã§é²ãã ã®ã¯4社ã§3社å å®ã®1社ä¸æ¡ç¨ã¨ããæãã ã£ããâ¦
dev.mysql.com table_io_waits_summary_by_table ãã¼ãã«ãè¦ãã°ããããããã§ãããã¼ãã«å®ç¾©ã¯ä»¥ä¸ã§COUNT_*ããã¼ãã«ãã¨ã«è¡¨ç¤ºãã¦æéãç½®ãã¦å®è¡ãããã¨ã§ç¢ºèªãããã¨ãã§ãã¾ãã mysql> desc performance_schema.table_io_waits_summary_by_â¦
éç¨ããä¸ã§ã¨ããããæã£ã¦ããã³ãã³ããã¾ã¨ãã¦ãããç¶ã足ãç¶ã足ãã§å å®ããã¦ããããã # ãã¼ãã«æ å ±ã®ç¢ºèª SHOW TABLE STATUS FROM <DBå>; # ãã¼ãã«ã®å®ç¾©æ å ±ã®ç¢ºèª SHOW CREATE TABLE <ãã¼ãã«å>; # InnoDBã¹ãã¼ã¿ã¹ã®ç¢ºèª SHOW ENGINE IN</dbå>â¦
Gracefull shutdownã£ã¦ã©ãããå®è£ ãªã®ï¼ ã°ã¬ã¼ã¹ãã«ã·ã£ãããã¦ã³ã®å®ç¾©ã以ä¸ã¨ãããªã åæ¢æ示å¾ã«ãæ°ããæ¥ç¶ãåä»ããªã æ®ã£ãå¦çä¸ã®æ¥ç¶ãå®äºããã®ãå¾ ã£ã¦ãããããã»ã¹ãå®å ¨ã«åæ¢ãã TCPã¬ã¤ã¤ã§ãããã¨ã¨ãããlisten socketãcâ¦
40並åã§ãªã¯ã¨ã¹ããã¦ããã®ã§ãphp-fpmå´ã®ã¢ã¯ãã£ããªããã»ã¹æ°ã40ã§ãã ããã§CPUãä¼ã¾ããããã»ã¹ãåããã¨ãã»ã¨ãã©åçã«40åå²ã§ããã»ã¹ãåãããã¨ã«ãªãã¯ãã§ãã â»CPUã¨ããã»ã¹ã®å²ãå½ã¦ã®ãã¸ãã¯ã«ãã誤差ã¯ãã¶ãããã¯ã ã¤ã¡â¦