Open saza-ku opened 8 months ago
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
| COUNT | METHOD | URI | MIN | MAX | SUM | AVG | P99 |
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
| 433 | GET | /api/livestream/search | 0.032 | 1.216 | 201.572 | 0.466 | 1.060 |
| 4344 | GET | /api/livestream/.+/livecomment | 0.004 | 0.120 | 97.172 | 0.022 | 0.064 |
| 4043 | POST | /api/livestream/.+/livecomment | 0.004 | 0.116 | 96.656 | 0.024 | 0.072 |
| 4378 | GET | /api/livestream/.+/reaction | 0.004 | 0.148 | 95.584 | 0.022 | 0.060 |
| 3973 | POST | /api/livestream/.+/reaction | 0.004 | 0.144 | 84.152 | 0.021 | 0.060 |
| 39129 | GET | /api/user/.+/icon | 0.000 | 0.056 | 60.876 | 0.002 | 0.008 |
| 539 | POST | /api/register | 0.004 | 0.408 | 60.860 | 0.113 | 0.360 |
| 481 | POST | /api/livestream/reservation | 0.028 | 0.140 | 30.384 | 0.063 | 0.124 |
| 576 | POST | /api/icon | 0.004 | 0.068 | 8.136 | 0.014 | 0.056 |
| 148 | GET | /api/livestream | 0.004 | 0.200 | 7.032 | 0.048 | 0.156 |
| 43 | GET | /api/user/.+/statistics | 0.028 | 0.208 | 5.984 | 0.139 | 0.208 |
| 226 | POST | /api/livestream/.+/moderate | 0.008 | 0.076 | 5.608 | 0.025 | 0.056 |
| 544 | POST | /api/login | 0.004 | 0.112 | 5.348 | 0.010 | 0.040 |
| 500 | GET | /api/tag | 0.000 | 0.072 | 5.304 | 0.011 | 0.044 |
| 451 | GET | /api/livestream/.+/report | 0.004 | 0.144 | 4.428 | 0.010 | 0.052 |
| 41 | GET | /api/user/.+/livestream | 0.020 | 0.208 | 4.120 | 0.100 | 0.208 |
| 377 | DELETE | /api/livestream/.+/exit | 0.008 | 0.068 | 3.776 | 0.010 | 0.052 |
| 32 | GET | /api/livestream/.+/statistics | 0.040 | 0.172 | 3.364 | 0.105 | 0.172 |
| 386 | POST | /api/livestream/.+/enter | 0.004 | 0.060 | 3.284 | 0.009 | 0.036 |
| 337 | GET | /api/livestream/.+/ngwords | 0.004 | 0.088 | 3.276 | 0.010 | 0.040 |
| 57 | POST | /api/livestream/.+/livecomment/.+/report | 0.004 | 0.052 | 1.504 | 0.026 | 0.052 |
| 42 | GET | /api/user/.+/theme | 0.004 | 0.084 | 0.492 | 0.012 | 0.084 |
| 8 | GET | /api/user/.+ | 0.004 | 0.016 | 0.048 | 0.006 | 0.016 |
| 1 | GET | /api/livestream/.+ | 0.008 | 0.008 | 0.008 | 0.008 | 0.008 |
| 1 | GET | /api/payment | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
Reading from STDIN ...
# No events processed.
http://localhost:19991/#menu_services;after=1700899447842;before=1700899524070
go tool pprof -http=0.0.0.0:1080 http://isucon1/pprof/11250804
+-------+--------+-----+-----+-----+-----+-----+-----+
| COUNT | METHOD | URI | MIN | MAX | SUM | AVG | P99 |
+-------+--------+-----+-----+-----+-----+-----+-----+
+-------+--------+-----+-----+-----+-----+-----+-----+
Count: 32308 Time=0.00s (59s) Lock=0.00s (0s) Rows=0.2 (5635), isudns[isudns]@isucon1
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=N and name='S' and domain_id=N
Count: 23357 Time=0.00s (40s) Lock=0.00s (0s) Rows=0.5 (11828), isudns[isudns]@isucon1
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=N and type='S' and name='S'
Count: 39531 Time=0.00s (4s) Lock=0.00s (0s) Rows=0.0 (0), isudns[isudns]@isucon1
select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='S'
Count: 537 Time=0.00s (2s) Lock=0.00s (0s) Rows=0.0 (0), isudns[isudns]@isucon1
delete from records where domain_id=N and name='S' and type='S'
Count: 1074 Time=0.00s (2s) Lock=0.00s (0s) Rows=0.5 (537), isudns[isudns]@isucon1
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=N and type='S' and name='S' and domain_id=N
Count: 94514 Time=0.00s (1s) Lock=0.00s (0s) Rows=0.0 (0), isudns[isudns]@isucon1
#
Count: 537 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), isudns[isudns]@isucon1
commit
Count: 537 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), isudns[isudns]@isucon1
insert into records (content,ttl,prio,type,domain_id,disabled,name,ordername,auth) values ('S',N,N,'S',N,N,'S',NULL,N)
Count: 537 Time=0.00s (0s) Lock=0.00s (0s) Rows=1.0 (537), isudns[isudns]@isucon1
select id,name,master,last_check,notified_serial,type,options,catalog,account from domains where name='S'
Count: 1074 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), isudns[isudns]@isucon1
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
Reading from STDIN ...
# 11.9s user time, 60ms system time, 36.75M rss, 51.06M vsz
# Current date: Sat Nov 25 08:05:42 2023
# Hostname: ip-192-168-0-12
# Files: STDIN
# Overall: 194.55k total, 20 unique, 2.34k QPS, 1.34x concurrency ________
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:30
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 111s 1us 13ms 571us 2ms 874us 89us
# Lock time 181ms 0 3ms 0 1us 18us 1us
# Rows sent 18.11k 0 1 0.10 0.99 0.29 0
# Rows examine 83.99M 0 1.77k 452.68 1.61k 688.71 0
# Query size 15.04M 5 217 81.08 151.03 48.71 112.70
# Profile
# Rank Query ID Response time Calls R/Call V/M Item
# ==== ============================= ============= ===== ====== ===== ====
# 1 0x42EF7D7D98FBCC9723BF896E... 59.9009 53.9% 32308 0.0019 0.00 SELECT records
# 2 0x3D83BC87F3B3A00D571FFC81... 40.2823 36.2% 23357 0.0017 0.00 SELECT records
# 3 0x22279D81D51006139E0C7640... 4.9865 4.5% 39531 0.0001 0.00 SELECT domains domainmetadata
# 4 0x859BBB7E9D760686137A9444... 2.2305 2.0% 537 0.0042 0.00 DELETE records
# MISC 0xMISC 3.7664 3.4% 98817 0.0000 0.0 <16 ITEMS>
# Query 1: 468.23 QPS, 0.87x concurrency, ID 0x42EF7D7D98FBCC9723BF896EBFC51D24 at byte 33128482
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:16
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 16 32308
# Exec time 53 60s 700us 13ms 2ms 3ms 650us 2ms
# Lock time 25 45ms 0 691us 1us 1us 5us 1us
# Rows sent 30 5.50k 0 1 0.17 0.99 0.38 0
# Rows examine 56 47.33M 1.25k 1.77k 1.50k 1.69k 151.26 1.46k
# Query size 29 4.37M 129 217 141.73 158.58 11.78 136.99
# String:
# Hosts isucon1
# Users isudns
# Query_time distribution
# 1us
# 10us
# 100us #
# 1ms ################################################################
# 10ms #
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'records'\G
# SHOW CREATE TABLE `records`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='qbcir36p0dq8tjcivtnd0q5fnksrq0.u.isucon.dev' and domain_id=4\G
# EXPLAIN failed: DBD::mysql::st execute failed: Table 'isupipe.records' doesn't exist [for Statement "EXPLAIN SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='qbcir36p0dq8tjcivtnd0q5fnksrq0.u.isucon.dev' and domain_id=4"] at /usr/bin/pt-query-digest line 7796.
# Query 2: 338.51 QPS, 0.58x concurrency, ID 0x3D83BC87F3B3A00D571FFC8104A6E50C at byte 45610263
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:16
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 12 23357
# Exec time 36 40s 660us 12ms 2ms 3ms 604us 2ms
# Lock time 18 33ms 0 1ms 1us 1us 7us 1us
# Rows sent 63 11.55k 0 1 0.51 0.99 0.50 0.99
# Rows examine 40 34.28M 1.25k 1.77k 1.50k 1.69k 151.06 1.46k
# Query size 20 3.02M 126 216 135.53 151.03 11.15 124.25
# String:
# Hosts isucon1
# Users isudns
# Query_time distribution
# 1us
# 10us
# 100us #
# 1ms ################################################################
# 10ms #
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'records'\G
# SHOW CREATE TABLE `records`\G
# EXPLAIN
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='SOA' and name='dokada2.u.isucon.dev'\G
# EXPLAIN failed: DBD::mysql::st execute failed: Table 'isupipe.records' doesn't exist [for Statement "EXPLAIN SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='SOA' and name='dokada2.u.isucon.dev'"] at /usr/bin/pt-query-digest line 7796.
# Query 3: 572.91 QPS, 0.07x concurrency, ID 0x22279D81D51006139E0C76405B54C261 at byte 42527691
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:16
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 20 39531
# Exec time 4 5s 71us 4ms 126us 167us 107us 108us
# Lock time 40 74ms 0 2ms 1us 1us 20us 1us
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 28 4.30M 114 114 114 114 0 114
# String:
# Hosts isucon1
# Users isudns
# Query_time distribution
# 1us
# 10us ###########
# 100us ################################################################
# 1ms #
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'domains'\G
# SHOW CREATE TABLE `domains`\G
# SHOW TABLE STATUS LIKE 'domainmetadata'\G
# SHOW CREATE TABLE `domainmetadata`\G
# EXPLAIN
select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='u.isucon.dev'\G
# EXPLAIN failed: DBD::mysql::st execute failed: Table 'isupipe.domains' doesn't exist [for Statement "EXPLAIN select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='u.isucon.dev'"] at /usr/bin/pt-query-digest line 7796.
# Query 4: 7.90 QPS, 0.03x concurrency, ID 0x859BBB7E9D760686137A944406874C4D at byte 51578538
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:08 to 2023-11-25T08:05:16
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 537
# Exec time 2 2s 2ms 13ms 4ms 7ms 1ms 4ms
# Lock time 14 27ms 0 3ms 49us 1us 302us 1us
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 811.79k 1.25k 1.77k 1.51k 1.69k 151.16 1.46k
# Query size 0 44.84k 78 93 85.50 88.31 3.37 84.10
# String:
# Hosts isucon1
# Users isudns
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms ################################################################
# 10ms #
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'records'\G
# SHOW CREATE TABLE `records`\G
delete from records where domain_id=4 and name='shohei650.u.isucon.dev' and type='A'\G
# Converted for EXPLAIN
# EXPLAIN
select * from records where domain_id=4 and name='shohei650.u.isucon.dev' and type='A'\G
http://localhost:19992/#menu_services;after=1700899447803;before=1700899527811
go tool pprof -http=0.0.0.0:1080 http://isucon2/pprof/11250804
+-------+--------+-----+-----+-----+-----+-----+-----+
| COUNT | METHOD | URI | MIN | MAX | SUM | AVG | P99 |
+-------+--------+-----+-----+-----+-----+-----+-----+
+-------+--------+-----+-----+-----+-----+-----+-----+
Count: 51752 Time=0.00s (41s) Lock=0.00s (0s) Rows=1.0 (51752), isucon[isucon]@isucon1
SELECT * FROM themes WHERE user_id = N
Count: 194447 Time=0.00s (18s) Lock=0.00s (0s) Rows=1.0 (194447), isucon[isucon]@isucon1
SELECT * FROM tags WHERE id = N
Count: 478 Time=0.02s (8s) Lock=0.00s (0s) Rows=0.0 (0), isucon[isucon]@isucon1
UPDATE reservation_slots SET slot = slot - N WHERE start_at >= N AND end_at <= N
Count: 479 Time=0.01s (7s) Lock=0.00s (0s) Rows=9.9 (4724), isucon[isucon]@isucon1
SELECT * FROM reservation_slots WHERE start_at >= N AND end_at <= N FOR UPDATE
Count: 42987 Time=0.00s (7s) Lock=0.00s (0s) Rows=4.5 (194463), isucon[isucon]@isucon1
SELECT * FROM livestream_tags WHERE livestream_id = N
Count: 51172 Time=0.00s (5s) Lock=0.00s (0s) Rows=1.0 (51172), isucon[isucon]@isucon1
SELECT * FROM users WHERE id = N
Count: 232 Time=0.02s (3s) Lock=0.00s (0s) Rows=4.6 (1071), isucon[isucon]@isucon1
SELECT * FROM livestreams WHERE user_id = N
Count: 27326 Time=0.00s (2s) Lock=0.00s (0s) Rows=1.0 (27326), isucon[isucon]@isucon1
SELECT * FROM livestreams WHERE id = N
Count: 3372 Time=0.00s (2s) Lock=0.00s (0s) Rows=1.3 (4342), isucon[isucon]@isucon1
SELECT * FROM themes WHERE user_id IN (N, N)
Count: 21895 Time=0.00s (2s) Lock=0.00s (0s) Rows=0.0 (0), isucon[isucon]@isucon1
COMMIT
Reading from STDIN ...
# 28.5s user time, 120ms system time, 37.88M rss, 52.33M vsz
# Current date: Sat Nov 25 08:06:00 2023
# Hostname: ip-192-168-0-13
# Files: STDIN
# Overall: 469.96k total, 66 unique, 4.35k QPS, 1.11x concurrency ________
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:55
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 120s 1us 77ms 254us 690us 1ms 76us
# Lock time 453ms 0 8ms 0 1us 17us 1us
# Rows sent 1.76M 0 7.79k 3.92 4.96 95.06 0.99
# Rows examine 87.79M 0 14.76k 195.88 1.26k 628.71 0.99
# Query size 18.01M 6 444 40.19 72.65 26.65 31.70
# Profile
# Rank Query ID Response time Calls R/Call V/M Item
# ==== ============================ ============= ====== ====== ===== ====
# 1 0x38BC86A45F31C6B1EE32467... 41.7799 34.9% 51752 0.0008 0.00 SELECT themes
# 2 0xFBC5564AE716EAE82F20BFB... 18.2259 15.2% 194447 0.0001 0.00 SELECT tags
# 3 0xA3401CA3ABCC04C3AB221DB... 8.6485 7.2% 478 0.0181 0.00 UPDATE reservation_slots
# 4 0x7F9C0C0BA9473953B723EE1... 7.0593 5.9% 479 0.0147 0.00 SELECT reservation_slots
# MISC 0xMISC 43.9888 36.7% 222806 0.0002 0.0 <62 ITEMS>
# Query 1: 739.31 QPS, 0.60x concurrency, ID 0x38BC86A45F31C6B1EE324671506C898A at byte 69165976
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:17
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 11 51752
# Exec time 34 42s 236us 16ms 807us 2ms 688us 596us
# Lock time 11 52ms 0 1ms 1us 1us 10us 1us
# Rows sent 2 50.54k 1 1 1 1 0 1
# Rows examine 71 62.45M 1000 1.50k 1.24k 1.46k 153.28 1.20k
# Query size 11 2.02M 38 41 40.88 40.45 0.61 40.45
# String:
# Hosts isucon1
# Users isucon
# Query_time distribution
# 1us
# 10us
# 100us ################################################################
# 1ms ############
# 10ms #
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'themes'\G
# SHOW CREATE TABLE `themes`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM themes WHERE user_id = 1104\G
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: themes
# partitions: NULL
# type: ALL
# possible_keys: NULL
# key: NULL
# key_len: NULL
# ref: NULL
# rows: 1536
# filtered: 10.00
# Extra: Using where
# Query 2: 2.82k QPS, 0.26x concurrency, ID 0xFBC5564AE716EAE82F20BFB45F6C37E7 at byte 98694147
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:08 to 2023-11-25T08:05:17
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 41 194447
# Exec time 15 18s 41us 17ms 93us 125us 172us 69us
# Lock time 43 198ms 0 2ms 1us 1us 13us 1us
# Rows sent 10 189.89k 1 1 1 1 0 1
# Rows examine 0 189.89k 1 1 1 1 0 1
# Query size 32 5.92M 31 33 31.94 31.70 0.45 31.70
# String:
# Hosts isucon1
# Users isucon
# Query_time distribution
# 1us
# 10us ################################################################
# 100us ####
# 1ms #
# 10ms #
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'tags'\G
# SHOW CREATE TABLE `tags`\G
# EXPLAIN
SELECT * FROM tags WHERE id = 54\G
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: tags
# partitions: NULL
# type: const
# possible_keys: PRIMARY
# key: PRIMARY
# key_len: 8
# ref: const
# rows: 1
# filtered: 100.00
# Extra: NULL
# Query 3: 6.93 QPS, 0.13x concurrency, ID 0xA3401CA3ABCC04C3AB221DB8AD5CBF26 at byte 107616582
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:16
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 478
# Exec time 7 9s 5ms 71ms 18ms 36ms 9ms 16ms
# Lock time 0 389us 0 9us 0 1us 0 1us
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 4 3.99M 8.55k 8.55k 8.55k 8.55k 0 8.55k
# Query size 0 45.75k 98 98 98 98 0 98
# String:
# Hosts isucon1
# Users isucon
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms ##################
# 10ms ################################################################
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'reservation_slots'\G
# SHOW CREATE TABLE `reservation_slots`\G
UPDATE reservation_slots SET slot = slot - 1 WHERE start_at >= 1704553200 AND end_at <= 1704574800\G
# Converted for EXPLAIN
# EXPLAIN
select slot = slot - 1 from reservation_slots where start_at >= 1704553200 AND end_at <= 1704574800\G
# Query 4: 6.94 QPS, 0.10x concurrency, ID 0x7F9C0C0BA9473953B723EE16C08655F1 at byte 17237670
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:04:07 to 2023-11-25T08:05:16
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 479
# Exec time 5 7s 5ms 44ms 15ms 28ms 7ms 13ms
# Lock time 0 482us 0 20us 1us 1us 1us 1us
# Rows sent 0 4.61k 1 21 9.86 18.53 5.78 9.83
# Rows examine 4 4.00M 8.55k 8.55k 8.55k 8.55k 0 8.55k
# Query size 0 44.91k 96 96 96 96 0 96
# String:
# Hosts isucon1
# Users isucon
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms ##########################
# 10ms ################################################################
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'reservation_slots'\G
# SHOW CREATE TABLE `reservation_slots`\G
# EXPLAIN
SELECT * FROM reservation_slots WHERE start_at >= 1701936000 AND end_at <= 1701968400 FOR UPDATE\G
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: reservation_slots
# partitions: NULL
# type: ALL
# possible_keys: NULL
# key: NULL
# key_len: NULL
# ref: NULL
# rows: 8593
# filtered: 11.11
# Extra: Using where
http://localhost:19993/#menu_services;after=1700899447794;before=1700899527801
go tool pprof -http=0.0.0.0:1080 http://isucon3/pprof/11250804
74000
90