iops確èªããããã®1Liner
ããã«ã¡ãã
å°ãã¿ã·ãªã¼ãºã§ããããã«ã¡ãã
ãªããããµã¨IOPSï¼I/O / secï¼ã¿ãããªããã¨ã£ã¦ããã¾ããï¼
DBãµã¼ããªããã§ãã¼ã¯æã«ä»ã©ã®ãããIOPSãã°ãã¦ãã®ããã¨ããSSDããã使ã£ãã¨ãã«IOPSæ¯ã©ã®ç¨åº¦æ§è½ã§ãã®ãï¼
ãªãã¦ã®ã¯ã¡ãã£ã¨æ°ã«ãªãã¾ãããï¼ãï¼
iostat -xã§ããããã§ãããIOPSã ãã¿ãããªã¼ã£ã¦ã¨ãããããã¨æãã¾ãã
ã¨ãããã¨ã§ãsysfsã§è¦ã¦ã¿ã¾ãããã
sysfs
sysfsã¯ããã¤ã¹æ
å ±ã®çµ±è¨ãè¦ãããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãªãã¾ãã
/sys ããå§ã¾ããã®ãããã§ãä¾ãã°ãsdaããã¤ã¹ã®ãã£ã¹ã¯çµ±è¨æ
å ±ã¯ /sys/block/sda/stat ã«ãªãã¾ãã
$ cat /sys/block/sda/stat 31004518 150610 2963821867 430429576 2056983249 38852701 66601383404 432745311 0 1127520672 863503041
/sys/block/sda/statã®åé ç®ã®æå³
åé ç®ã®æå³ã¯ãããªæãã¿ããã
Name units description 22 ---- ----- ----------- 23 read I/Os requests èªã¿è¾¼ã¿ã® I/O å¦çæ° 24 read merges requests I/Oãã¥ã¼ãå«ããèªã¿è¾¼ã¿ã® I/O å¦çæ° 25 read sectors sectors èªã¾ããã»ã¯ã¿ã®æ° 26 read ticks milliseconds èªã¿è¾¼ã¿ãªã¯ã¨ã¹ãã®å¾ ã¡æé 27 write I/Os requests æ¸ãè¾¼ã¿ã® I/O å¦çæ° 28 write merges requests I/Oãã¥ã¼ãå«ããæ¸ãè¾¼ã¿ã® I/O å¦çæ° 29 write sectors sectors æ¸ãããã»ã¯ã¿ã®æ° 30 write ticks milliseconds æ¸ãè¾¼ã¿ãªã¯ã¨ã¹ãã®å¾ ã¡æé 31 in_flight requests ããã¤ã¹ãã©ã¤ãã«å¯¾ãã¦çºè¡ããã¦ãããå¦çããã¦ããªããªã¯ã¨ã¹ãæ° 32 io_ticks milliseconds ããã¤ã¹ãã©ã¤ãã«ã¸ã®ãªã¯ã¨ã¹ãããã¥ã¼ã«å ¥ã£ã¦ãããã¼ã¿ã«æé 33 time_in_queue milliseconds å ¨ãªã¯ã¨ã¹ãã®ãã¼ã¿ã«å¾ ã¡æé
ãããã1ç§ãã¨ã«ãªã¢ã«ã¿ã¤ã ãªæ
å ±ãã¿ãããªãread I/Osããwrite I/Osãã¿ãã°ããããã
1liner
ãããªæãã§ã ãã¦ã¿ã¾ããã
$ while [ 1 ];do set -- `cat /sys/block/sda/stat | awk '{ print $1,$5}'`; echo `expr $1 - $R` `expr $2 - $W` ; R=$1 ; W=$2 ;sleep 1 ;done 3 251 0 38 1 36 0 36 0 39 0 40 1 34 1 38 0 58 1 75 0 45
ãããé©å½ãª1linerã§ãã¡ããã¨ã§ã¦ãããã§ãã
ããã§ãã¤ã§ãIOPSã¿ãã¾ãããIOPSå
ã§ãã
ã§ã
iostat ã§ãããã§ããã©ãï½
ä½ãã®å¦çã«çµã¿è¾¼ãã ããç£è¦ç³»ã§ä½¿ã£ããããã¨ãã®ããã®ä¸ä¾ã«ãã¦ãããããã
- ä½è : æ± ç°å®åº,大岩å°å®,島æ¬è£å¿,竹é¨æ¶é,å¹³æ¾é å·³,é«æ©æµ©å
- åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã¸ã£ãã³
- çºå£²æ¥: 2011/07/26
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 4人 ã¯ãªãã¯: 50å
- ãã®ååãå«ãããã° (4件) ãè¦ã