Open k-nasa opened 4 years ago
COUNT | 1XX | 2XX | 3XX | 4XX | 5XX | METHOD | URI | MIN | MAX | SUM | AVG | P1 | P50 | P99 | STDDEV | MIN(BODY) | MAX(BODY) | SUM(BODY) | AVG(BODY) |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | 1 | 0 | 0 | 0 | GET | /initialize | 0.320 | 0.320 | 0.320 | 0.320 | 0.320 | 0.320 | 0.320 | 0.000 | 6.000 | 6.000 | 6.000 | 6.000 |
181 | 0 | 181 | 0 | 0 | 0 | GET | /political_parties/* | 0.004 | 0.116 | 12.816 | 0.071 | 0.004 | 0.072 | 0.064 | 0.021 | 1360.000 | 1486.000 | 258260.000 | 1426.851 |
557 | 0 | 557 | 0 | 0 | 0 | GET | / | 0.012 | 0.132 | 38.280 | 0.069 | 0.096 | 0.096 | 0.072 | 0.020 | 7222.000 | 7275.000 | 4047792.000 | 7267.131 |
9357 | 0 | 9357 | 0 | 0 | 0 | POST | /vote | 0.004 | 2.440 | 162.664 | 0.017 | 0.008 | 0.004 | 0.048 | 0.061 | 5256.000 | 5280.000 | 49296804.000 | 5268.441 |
1026 | 0 | 1026 | 0 | 0 | 0 | GET | /candidates/\d+ | 0.000 | 0.036 | 4.652 | 0.005 | 0.008 | 0.000 | 0.000 | 0.005 | 1145.000 | 1158.000 | 1180779.000 | 1150.857 |
1760 | 0 | 1760 | 0 | 0 | 0 | GET | /css/bootstrap.min.css | 0.000 | 0.012 | 1.236 | 0.001 | 0.000 | 0.000 | 0.004 | 0.002 | 32526.000 | 122540.000 | 204972004.000 | 116461.366 |
# 26.9s user time, 220ms system time, 27.61M rss, 78.58M vsz
# Current date: Mon Sep 7 06:10:19 2020
# Hostname: ip-172-31-34-75
# Files: /var/log/mysql/slow.log
# Overall: 269.68k total, 14 unique, 4.21k QPS, 2.80x concurrency ________
# Time range: 2020-09-07T06:08:32 to 2020-09-07T06:09:36
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 179s 2us 3s 664us 2ms 8ms 76us
# Lock time 4s 0 8ms 13us 36us 63us 0
# Rows sent 302.11k 0 30 1.15 0.99 5.30 0
# Rows examine 45.71M 0 62.22k 177.71 0.99 2.92k 0
# Query size 14.90M 17 405 57.95 143.84 51.45 31.70
# Profile
# Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============== ====== ====== ===== =============
# 1 0x9CD152A4DDC9722C 107.4901 60.0% 57876 0.0019 0.05 INSERT votes
# 2 0xD4A6C92C15F35370 47.2044 26.3% 790 0.0598 0.01 SELECT candidates votes
# 3 0x99AA0165670CE848 9.5945 5.4% 86138 0.0001 0.00 ADMIN PREPARE
# 4 0x89D97A6B14A31CDD 2.7544 1.5% 1 2.7544 0.00 DELETE votes
# 5 0x2AA03DA038C300EE 2.6869 1.5% 8707 0.0003 0.00 SELECT candidates
# 6 0x72D4F3D4A71732AB 2.6181 1.5% 8707 0.0003 0.00 SELECT users
# MISC 0xMISC 6.8721 3.8% 107457 0.0001 0.0 <8 ITEMS>
# Query 1: 1.18k QPS, 2.19x concurrency, ID 0x9CD152A4DDC9722C at byte 28440376
# Scores: V/M = 0.05
# Time range: 2020-09-07T06:08:32 to 2020-09-07T06:09:21
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 21 57876
# Exec time 59 107s 477us 1s 2ms 3ms 10ms 2ms
# Lock time 56 2s 10us 6ms 34us 60us 87us 21us
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 49 7.33M 79 405 132.86 234.30 61.82 118.34
# String:
# Databases ishocon2
# Hosts localhost
# Users ishocon
# Query_time distribution
# 1us
# 10us
# 100us #################
# 1ms ################################################################
# 10ms #
# 100ms
# 1s #
# 10s+
# Tables
# SHOW TABLE STATUS FROM `ishocon2` LIKE 'votes'\G
# SHOW CREATE TABLE `ishocon2`.`votes`\G
INSERT INTO votes (user_id, candidate_id, keyword) VALUES (277352, 21, '顔が好み')\G
# Query 2: 12.74 QPS, 0.76x concurrency, ID 0xD4A6C92C15F35370 at byte 70707407
# Scores: V/M = 0.01
# Time range: 2020-09-07T06:08:34 to 2020-09-07T06:09:36
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 790
# Exec time 26 47s 430us 145ms 60ms 91ms 18ms 59ms
# Lock time 5 188ms 69us 8ms 238us 657us 587us 108us
# Rows sent 7 23.14k 30 30 30 30 0 30
# Rows examine 95 43.58M 496 56.64k 56.49k 54.03k 2.69k 54.03k
# Query size 1 191.33k 248 248 248 248 0 248
# String:
# Databases ishocon2
# Hosts localhost
# Users ishocon
# Query_time distribution
# 1us
# 10us
# 100us #
# 1ms #
# 10ms ################################################################
# 100ms ##
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `ishocon2` LIKE 'candidates'\G
# SHOW CREATE TABLE `ishocon2`.`candidates`\G
# SHOW TABLE STATUS FROM `ishocon2` LIKE 'votes'\G
# SHOW CREATE TABLE `ishocon2`.`votes`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT c.id, c.name, c.political_party, c.sex, IFNULL(v.count, 0)
FROM candidates AS c
LEFT OUTER JOIN
(SELECT candidate_id, COUNT(*) AS count
FROM votes
GROUP BY candidate_id) AS v
ON c.id = v.candidate_id
ORDER BY v.count DESC\G
# Query 3: 1.35k QPS, 0.15x concurrency, ID 0x99AA0165670CE848 at byte 69829558
# Scores: V/M = 0.00
# Time range: 2020-09-07T06:08:32 to 2020-09-07T06:09:36
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 31 86138
# Exec time 5 10s 32us 12ms 111us 273us 156us 69us
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 16 2.46M 30 30 30 30 0 30
# String:
# Databases ishocon2
# Hosts localhost
# Users ishocon
# Query_time distribution
# 1us
# 10us ################################################################
# 100us ##########################
# 1ms #
# 10ms #
# 100ms
# 1s
# 10s+
administrator command: Prepare\G
# Query 4: 0 QPS, 0x concurrency, ID 0x89D97A6B14A31CDD at byte 0 ________
# Scores: V/M = 0.00
# Time range: all events occurred at 2020-09-07T06:08:32
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 3s 3s 3s 3s 3s 0 3s
# Lock time 0 5ms 5ms 5ms 5ms 5ms 0 5ms
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 62.22k 62.22k 62.22k 62.22k 62.22k 0 62.22k
# Query size 0 17 17 17 17 17 0 17
# String:
# Databases ishocon2
# Hosts localhost
# Users ishocon
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `ishocon2` LIKE 'votes'\G
# SHOW CREATE TABLE `ishocon2`.`votes`\G
DELETE FROM votes\G
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
select * from votes\G
# Query 5: 177.69 QPS, 0.05x concurrency, ID 0x2AA03DA038C300EE at byte 55271644
# Scores: V/M = 0.00
# Time range: 2020-09-07T06:08:32 to 2020-09-07T06:09:21
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 3 8707
# Exec time 1 3s 84us 6ms 308us 1ms 371us 119us
# Lock time 9 332ms 20us 2ms 38us 73us 59us 28us
# Rows sent 84 255.09k 30 30 30 30 0 30
# Rows examine 0 255.09k 30 30 30 30 0 30
# Query size 1 204.07k 24 24 24 24 0 24
# String:
# Databases ishocon2
# Hosts localhost
# Users ishocon
# Query_time distribution
# 1us
# 10us ##################
# 100us ################################################################
# 1ms #######
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `ishocon2` LIKE 'candidates'\G
# SHOW CREATE TABLE `ishocon2`.`candidates`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM candidates\G
# Query 6: 177.69 QPS, 0.05x concurrency, ID 0x72D4F3D4A71732AB at byte 12408547
# Scores: V/M = 0.00
# Time range: 2020-09-07T06:08:32 to 2020-09-07T06:09:21
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 3 8707
# Exec time 1 3s 97us 10ms 300us 690us 268us 236us
# Lock time 10 355ms 20us 2ms 40us 80us 50us 30us
# Rows sent 0 1.22k 0 1 0.14 0.99 0.35 0
# Rows examine 0 6.10k 0 1 0.72 0.99 0.45 0.99
# Query size 5 862.81k 89 122 101.47 107.34 7.45 97.36
# String:
# Databases ishocon2
# Hosts localhost
# Users ishocon
# Query_time distribution
# 1us
# 10us #
# 100us ################################################################
# 1ms #
# 10ms #
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `ishocon2` LIKE 'users'\G
# SHOW CREATE TABLE `ishocon2`.`users`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM users WHERE name = 'hoge' AND address = '徳島県' AND mynumber = '164558387'\G
bench
mysqldのCPU使用率が支配的。メモリに余裕は今んとこありあり
alp
slow log