karamaru-alpha / isucon11-qualify-re

2022/6/25 isucon11予選デモ
0 stars 0 forks source link

計測 #1

Open karamaru-alpha opened 2 years ago

karamaru-alpha commented 2 years ago
Memory 3.6Gi
CPU 2コア
MariaDB  Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
CREATE TABLE `isu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `jia_isu_uuid` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `image` longblob DEFAULT NULL,
  `character` varchar(255) DEFAULT NULL,
  `jia_user_id` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT current_timestamp(6),
  `updated_at` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
  PRIMARY KEY (`id`),
  UNIQUE KEY `jia_isu_uuid` (`jia_isu_uuid`)
) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8mb4;

CREATE TABLE `isu_association_config` (
  `name` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  PRIMARY KEY (`name`),
  UNIQUE KEY `url` (`url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `isu_condition` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `jia_isu_uuid` char(36) NOT NULL,
  `timestamp` datetime NOT NULL,
  `is_sitting` tinyint(1) NOT NULL,
  `condition` varchar(255) NOT NULL,
  `message` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT current_timestamp(6),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67597 DEFAULT CHARSET=utf8mb4;

CREATE TABLE `user` (
  `jia_user_id` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT current_timestamp(6),
  PRIMARY KEY (`jia_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+------------------------+--------+------------+----------+---------+----------+
| table_name             | engine | table_rows | total_mb | data_mb | index_mb |
+------------------------+--------+------------+----------+---------+----------+
| isu_condition          | InnoDB |      64548 |       12 |      12 |        0 |
| isu                    | InnoDB |         71 |        3 |       3 |        0 |
| isu_association_config | InnoDB |          1 |        0 |       0 |        0 |
| user                   | InnoDB |         13 |        0 |       0 |        0 |
+------------------------+--------+------------+----------+---------+----------+
karamaru-alpha commented 2 years ago

初期実装・各種調査 1389

経過: 40m

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1376 14.382 0.0105 0.000 0.180 POST /api/condition/bf45aace-bf0b-4ca2-9cf5-93eea3065e72 HTTP/2.0 1374 14.696 0.0107 0.000 0.260 POST /api/condition/ac2de55d-a37b-4a37-b480-266afca12f3f HTTP/2.0 1373 14.018 0.0102 0.000 0.112 POST /api/condition/6e78c524-ba53-448f-b18a-8d49e7850ceb HTTP/2.0 1371 13.885 0.0101 0.000 0.115 POST /api/condition/b7d1ce73-a01d-4437-b35d-866e4635a22e HTTP/2.0 1370 14.505 0.0106 0.000 0.275 POST /api/condition/23af9690-0163-412a-b6c8-3be609f6fe16 HTTP/2.0 1366 14.419 0.0106 0.000 0.111 POST /api/condition/c45bc547-5a30-44c6-a724-348d5d82a01a HTTP/2.0 1366 14.862 0.0109 0.000 0.116 POST /api/condition/a6ac7d79-1069-4edb-8ef1-0f7ad4bcf565 HTTP/2.0 1364 14.732 0.0108 0.000 0.119 POST /api/condition/515e5871-5745-4dcd-ade5-ee1cd86d99a4 HTTP/2.0 1363 13.910 0.0102 0.000 0.111 POST /api/condition/d19e5405-bacb-486c-9c95-4f895e7351c1 HTTP/2.0 1363 14.458 0.0106 0.000 0.119 POST /api/condition/6b015f98-fb7b-413e-8c03-0070accdf2b6 HTTP/2.0 1360 14.304 0.0105 0.000 0.113 POST /api/condition/61ff2aa6-2b97-407a-8c47-5d7e61730447 HTTP/2.0 1360 16.019 0.0118 0.000 0.109 POST /api/condition/33e93f18-9172-47f8-8b07-95f5e377a2cc HTTP/2.0 1359 15.636 0.0115 0.000 0.263 POST /api/condition/18eecff9-4968-4ccc-ba57-bc0c22239698 HTTP/2.0 1357 15.121 0.0111 0.000 0.113 POST /api/condition/db1aa3ea-b7d7-4c00-a50c-835092dad3e7 HTTP/2.0 1356 15.004 0.0111 0.000 0.301 POST /api/condition/7f5ef43c-b240-4d4b-8813-cac58ae7a2ff HTTP/2.0 1356 15.293 0.0113 0.000 0.116 POST /api/condition/31c87216-76f4-482d-9827-3c7e430835f3 HTTP/2.0 1355 15.479 0.0114 0.000 0.112 POST /api/condition/8f9c89df-d687-4cd8-85e0-82cd2a3e9aa4 HTTP/2.0 1354 16.097 0.0119 0.000 0.114 POST /api/condition/b0e970fe-a3ee-42f4-978b-b78fd2206467 HTTP/2.0 1354 15.645 0.0116 0.000 0.116 POST /api/condition/259f7a2f-1fb7-45fd-8de3-c23f6ad74135 HTTP/2.0 1354 13.856 0.0102 0.000 0.109 POST /api/condition/e0e846aa-3df3-45fb-a309-b7bf48b15a86 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 381 319.188 0.8378 0.000 3.002 GET /api/isu HTTP/2.0 31 23.500 0.7581 0.025 1.011 GET /api/trend HTTP/2.0 126 19.152 0.1520 0.001 2.561 POST /api/auth HTTP/2.0 1305 17.353 0.0133 0.000 0.214 POST /api/condition/235c5c29-06d3-4f33-a903-e5276c070c2f HTTP/2.0 1324 17.005 0.0128 0.000 0.110 POST /api/condition/999fb38b-f032-419b-99c4-573b3853336c HTTP/2.0 1341 16.834 0.0126 0.000 0.304 POST /api/condition/157da117-ea4a-49e0-bccb-da8796aa2115 HTTP/2.0 1323 16.547 0.0125 0.000 0.243 POST /api/condition/8df52e6c-5ebf-44e3-a5e2-c59e119fe657 HTTP/2.0 1340 16.546 0.0123 0.000 0.111 POST /api/condition/d83990ed-6d14-4c46-ae30-97697a968ddb HTTP/2.0 1337 16.533 0.0124 0.000 0.112 POST /api/condition/e0617ea3-b8f3-4943-9e97-fd4887f7cc54 HTTP/2.0 1346 16.526 0.0123 0.000 0.260 POST /api/condition/cfdf6205-9aeb-4d6b-8243-87daacd7bb49 HTTP/2.0 1327 16.463 0.0124 0.000 0.213 POST /api/condition/c0b1b418-044c-48fd-b941-5398d3d4d380 HTTP/2.0 1335 16.435 0.0123 0.000 0.112 POST /api/condition/c66764ab-5d5c-4398-80c9-75535610d6c5 HTTP/2.0 1343 16.230 0.0121 0.000 0.264 POST /api/condition/3436887d-be9d-4b39-9483-9c86342a58ea HTTP/2.0 1333 16.155 0.0121 0.000 0.126 POST /api/condition/38846d23-99fd-481a-baa5-9d0efb67e09a HTTP/2.0 1322 16.108 0.0122 0.000 0.128 POST /api/condition/b4a420ac-cfd5-4ad7-9adc-beae5b96d367 HTTP/2.0 1354 16.097 0.0119 0.000 0.114 POST /api/condition/b0e970fe-a3ee-42f4-978b-b78fd2206467 HTTP/2.0 1344 16.037 0.0119 0.000 0.303 POST /api/condition/0a34b613-8b53-4f89-b0ba-260f3dbfb807 HTTP/2.0 1360 16.019 0.0118 0.000 0.109 POST /api/condition/33e93f18-9172-47f8-8b07-95f5e377a2cc HTTP/2.0 1348 15.976 0.0119 0.000 0.283 POST /api/condition/ffb299fe-9415-4849-aa82-4cf6cb49774c HTTP/2.0 1353 15.866 0.0117 0.000 0.206 POST /api/condition/48b2b60b-1930-4675-88b6-6a46066ae2b5 HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 3 3.020 1.0067 0.001 3.008 GET /api/isu/435feb84-055b-4123-8994-a3410b4ece91 HTTP/2.0 1 1.004 1.0040 1.004 1.004 GET /api/condition/8df52e6c-5ebf-44e3-a5e2-c59e119fe657?condition_level=info%2Cwarning%2Ccritical HTTP/2.0 1 1.004 1.0040 1.004 1.004 GET /api/isu/3c6bce60-c4d7-44a6-a247-0c043905f102/graph?datetime=datetime HTTP/2.0 1 1.003 1.0030 1.003 1.003 GET /api/condition/3436887d-be9d-4b39-9483-9c86342a58ea?condition_level=info%2Cwarning%2Ccritical&end_time=1628577172 HTTP/2.0 1 1.001 1.0010 1.001 1.001 GET /api/condition/3436887d-be9d-4b39-9483-9c86342a58ea?condition_level=info%2Cwarning%2Ccritical&end_time=1628541227 HTTP/2.0 1 1.001 1.0010 1.001 1.001 GET /api/isu/8df52e6c-5ebf-44e3-a5e2-c59e119fe657/graph HTTP/2.0 1 1.000 1.0000 1.000 1.000 GET /api/isu/31c87216-76f4-482d-9827-3c7e430835f3/graph?datetime=1628866800 HTTP/2.0 1 1.000 1.0000 1.000 1.000 GET /api/condition/18eecff9-4968-4ccc-ba57-bc0c22239698?condition_level=info%2Cwarning%2Ccritical&end_time=1628812884 HTTP/2.0 1 1.000 1.0000 1.000 1.000 GET /api/condition/e0617ea3-b8f3-4943-9e97-fd4887f7cc54?condition_level=info%2Cwarning%2Ccritical&end_time=1628834234 HTTP/2.0 1 0.999 0.9990 0.999 0.999 GET /api/condition/e0617ea3-b8f3-4943-9e97-fd4887f7cc54?condition_level=info%2Cwarning%2Ccritical&end_time=1629019034 HTTP/2.0 1 0.998 0.9980 0.998 0.998 GET /api/isu/c45bc547-5a30-44c6-a724-348d5d82a01a/graph?datetime=1628521200 HTTP/2.0 1 0.956 0.9560 0.956 0.956 GET /api/condition/3436887d-be9d-4b39-9483-9c86342a58ea?condition_level=info%2Cwarning%2Ccritical&end_time=1628676284 HTTP/2.0 1 0.912 0.9120 0.912 0.912 GET /api/condition/81e85656-aedd-4c41-887c-0bcee3b37012?condition_level=info%2Cwarning%2Ccritical&end_time=1628613230 HTTP/2.0 1 0.879 0.8790 0.879 0.879 GET /api/condition/3436887d-be9d-4b39-9483-9c86342a58ea?condition_level=info%2Cwarning%2Ccritical&end_time=1628759382 HTTP/2.0 1 0.877 0.8770 0.877 0.877 GET /api/isu/c45bc547-5a30-44c6-a724-348d5d82a01a/graph?datetime=1628780400 HTTP/2.0 1 0.863 0.8630 0.863 0.863 GET /api/condition/81e85656-aedd-4c41-887c-0bcee3b37012?condition_level=info%2Cwarning%2Ccritical&end_time=1628686367 HTTP/2.0 1 0.853 0.8530 0.853 0.853 GET /api/condition/81e85656-aedd-4c41-887c-0bcee3b37012?condition_level=info%2Cwarning%2Ccritical&end_time=1628544772 HTTP/2.0 381 319.188 0.8378 0.000 3.002 GET /api/isu HTTP/2.0 1 0.833 0.8330 0.833 0.833 GET /api/condition/81e85656-aedd-4c41-887c-0bcee3b37012?condition_level=info%2Cwarning%2Ccritical&end_time=1628670834 HTTP/2.0 1 0.831 0.8310 0.831 0.831 GET /api/isu/a6ac7d79-1069-4edb-8ef1-0f7ad4bcf565/graph?datetime=1628434800 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 3 3.020 1.0067 0.001 3.008 GET /api/isu/435feb84-055b-4123-8994-a3410b4ece91 HTTP/2.0 4 3.006 0.7515 0.001 3.002 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab/icon HTTP/2.0 381 319.188 0.8378 0.000 3.002 GET /api/isu HTTP/2.0 126 19.152 0.1520 0.001 2.561 POST /api/auth HTTP/2.0 3 1.899 0.6330 0.000 1.898 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab HTTP/2.0 2 1.579 0.7895 0.000 1.579 GET /api/condition/f7dcee6b-b48e-4624-98d0-6de2d25fe9e2?condition_level=info%2Cwarning%2Ccritical&end_time=1629098107 HTTP/2.0 3 1.448 0.4827 0.000 1.418 GET /api/isu/3c6bce60-c4d7-44a6-a247-0c043905f102 HTTP/2.0 11 3.528 0.3207 0.004 1.367 GET /api/isu/c66764ab-5d5c-4398-80c9-75535610d6c5/icon HTTP/2.0 31 23.500 0.7581 0.025 1.011 GET /api/trend HTTP/2.0 8 2.800 0.3500 0.033 1.006 GET /api/isu/b4a420ac-cfd5-4ad7-9adc-beae5b96d367/icon HTTP/2.0 14 4.608 0.3291 0.004 1.005 GET /api/isu/d83990ed-6d14-4c46-ae30-97697a968ddb/icon HTTP/2.0 11 3.462 0.3147 0.031 1.005 GET /api/isu/cfdf6205-9aeb-4d6b-8243-87daacd7bb49/icon HTTP/2.0 1 1.004 1.0040 1.004 1.004 GET /api/condition/8df52e6c-5ebf-44e3-a5e2-c59e119fe657?condition_level=info%2Cwarning%2Ccritical HTTP/2.0 1 1.004 1.0040 1.004 1.004 GET /api/isu/3c6bce60-c4d7-44a6-a247-0c043905f102/graph?datetime=datetime HTTP/2.0 8 1.968 0.2460 0.001 1.003 GET /api/isu/9e5c1109-beff-4598-b8f1-658d1994d55f HTTP/2.0 8 4.813 0.6016 0.004 1.003 GET /api/isu/48b2b60b-1930-4675-88b6-6a46066ae2b5/icon HTTP/2.0 9 2.519 0.2799 0.018 1.003 GET /api/isu/8df52e6c-5ebf-44e3-a5e2-c59e119fe657/icon HTTP/2.0 11 4.037 0.3670 0.010 1.003 GET /api/isu/37c62823-9f46-4ae8-90b5-d553ba06c50a/icon HTTP/2.0 11 4.403 0.4003 0.031 1.003 GET /api/isu/3c6bce60-c4d7-44a6-a247-0c043905f102/icon HTTP/2.0 11 3.538 0.3216 0.021 1.003 GET /api/isu/157da117-ea4a-49e0-bccb-da8796aa2115/icon HTTP/2.0 TOP 10 Slow Requests 1 3.008 GET /api/isu/435feb84-055b-4123-8994-a3410b4ece91 HTTP/2.0 2 3.002 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab/icon HTTP/2.0 3 3.002 GET /api/isu HTTP/2.0 4 2.561 POST /api/auth HTTP/2.0 5 1.898 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab HTTP/2.0 6 1.579 GET /api/condition/f7dcee6b-b48e-4624-98d0-6de2d25fe9e2?condition_level=info%2Cwarning%2Ccritical&end_time=1629098107 HTTP/2.0 7 1.418 GET /api/isu/3c6bce60-c4d7-44a6-a247-0c043905f102 HTTP/2.0 8 1.367 GET /api/isu/c66764ab-5d5c-4398-80c9-75535610d6c5/icon HTTP/2.0 9 1.038 GET /api/isu HTTP/2.0 10 1.023 GET /api/isu HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 30.49 QPS, 5.11x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 79441892 # This item is included in the report because it matches --limit. # Scores: V/M = 0.06 # Time range: 2022-06-25 16:27:58 to 16:29:18 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 2439 # Exec time 61 409s 70us 454ms 168ms 339ms 97ms 163ms # Lock time 8 262ms 0 34ms 107us 76us 1ms 12us # Rows sent 0 2.35k 0 1 0.99 0.99 0.12 0.99 # Rows examine 76 96.39M 0 67.33k 40.47k 65.68k 20.42k 40.32k # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 1.73M 589 789 742.67 755.64 22.29 719.66 # Query size 1 297.73k 125 125 125 125 0 125 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us # # 1ms ### # 10ms ############### # 100ms ################################################################ # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '81e85656-aedd-4c41-887c-0bcee3b37012' ORDER BY `timestamp` DESC LIMIT 1\G # Query 2: 24.07 QPS, 1.73x concurrency, ID 0x931A992E852C61FC6D46141A39DEF4FE at byte 90996613 # This item is included in the report because it matches --limit. # Scores: V/M = 0.14 # Time range: 2022-06-25 16:27:58 to 16:29:22 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 2022 # Exec time 21 146s 10us 435ms 72ms 339ms 101ms 24ms # Lock time 2 74ms 0 7ms 36us 36us 258us 11us # Rows sent 94 555.97k 0 1.53k 281.56 1.33k 433.93 69.19 # Rows examine 22 28.52M 0 68.92k 14.44k 65.68k 19.03k 6.96k # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 36 86.01M 589 258.39k 43.56k 201.74k 66.98k 10.80k # Query size 0 227.08k 115 115 115 115 0 115 # Boolean: # QC hit 19% yes, 80% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ######################## # 100us ############ # 1ms ########################### # 10ms ################################################################ # 100ms ######################################## # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'b0e970fe-a3ee-42f4-978b-b78fd2206467' ORDER BY timestamp DESC\G # Query 3: 92.11 QPS, 0.67x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 45426470 # This item is included in the report because it matches --limit. # Scores: V/M = 0.02 # Time range: 2022-06-25 16:27:58 to 16:29:18 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 7369 # Exec time 8 54s 5us 299ms 7ms 16ms 12ms 5ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 79.16k 11 11 11 11 0 11 # Query size 0 43.18k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us # # 100us # # 1ms ################################################################ # 10ms ############### # 100ms # # 1s # 10s+ COMMIT\G # Query 4: 950.14 QPS, 0.30x concurrency, ID 0xDA556F9115773A1A99AA0165670CE848 at byte 18481896 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-25 16:27:54 to 16:29:22 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 31 83612 # Exec time 3 26s 13us 35ms 312us 1ms 863us 76us # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 6 14.77M 52 681 185.18 621.67 118.47 158.58 # Query size 9 2.39M 30 30 30 30 0 30 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ############################### # 1ms ####### # 10ms # # 100ms # 1s # 10s+ administrator command: Prepare\G ```

863516408aae0c05139b13988a04c0b6f1b06f34

karamaru-alpha commented 2 years ago

index追加 12580

3

経過:50m

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1436 14.348 0.0100 0.000 0.109 POST /api/condition/efc4b897-6ff1-4512-8010-b2ade245082f HTTP/2.0 1433 14.023 0.0098 0.000 0.112 POST /api/condition/7810eb3c-860d-4696-8fd5-8f01bcc15024 HTTP/2.0 1427 14.105 0.0099 0.000 0.110 POST /api/condition/e0098871-579a-497b-bb86-3420d88ab1af HTTP/2.0 1425 15.068 0.0106 0.000 0.112 POST /api/condition/438fa2cc-f6e6-4576-b7a1-23318031eda7 HTTP/2.0 1425 14.232 0.0100 0.000 0.111 POST /api/condition/4793b2ce-a8cb-40ae-af10-843646ae9b0b HTTP/2.0 1424 15.435 0.0108 0.000 0.113 POST /api/condition/3482379f-c539-46f6-9184-5f116d3a26b1 HTTP/2.0 1424 16.008 0.0112 0.000 0.104 POST /api/condition/5f6d3686-dc96-4ed4-bf3a-f9eb90dbad56 HTTP/2.0 1419 14.243 0.0100 0.000 0.109 POST /api/condition/4e60e25e-ba08-4f08-bb83-dfa3909200c1 HTTP/2.0 1418 15.282 0.0108 0.000 0.107 POST /api/condition/3a68a4c1-6f8b-4179-8c9e-666d3c4c525a HTTP/2.0 1418 15.472 0.0109 0.000 0.163 POST /api/condition/43b188bf-62fd-48aa-b5cb-5791dcc19153 HTTP/2.0 1414 15.417 0.0109 0.000 0.111 POST /api/condition/9ce3df8e-55a0-4865-99b8-ab882a5e71ed HTTP/2.0 1414 15.315 0.0108 0.000 0.116 POST /api/condition/9bdc21cb-fdf6-4ecc-b17a-549fa0343389 HTTP/2.0 1414 15.013 0.0106 0.000 0.107 POST /api/condition/381fabc9-6c60-4049-9d5d-62eaeb742778 HTTP/2.0 1414 15.219 0.0108 0.000 0.107 POST /api/condition/168076ce-053b-4465-b8b4-9244d88a0a7a HTTP/2.0 1414 15.101 0.0107 0.000 0.117 POST /api/condition/f6c96ec7-1b41-425e-b110-960a010fa3c4 HTTP/2.0 1413 14.982 0.0106 0.000 0.108 POST /api/condition/3d13f73b-ccea-4cbf-ae9b-21b4dc4afa3e HTTP/2.0 1412 15.228 0.0108 0.000 0.107 POST /api/condition/3f049499-b2a9-4e8e-9a0d-7b6789632f1b HTTP/2.0 1412 16.154 0.0114 0.000 0.107 POST /api/condition/304564d8-840d-482f-a558-a5dd4f1e463c HTTP/2.0 1411 15.683 0.0111 0.000 0.111 POST /api/condition/3a78ce0d-df50-4252-bb1c-4057fa7952da HTTP/2.0 1411 14.613 0.0104 0.000 0.109 POST /api/condition/1221d0a6-2ef8-4619-8be8-c88960dab356 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 81 72.725 0.8978 0.022 1.020 GET /api/trend HTTP/2.0 380 33.101 0.0871 0.000 0.369 GET /api/isu HTTP/2.0 1386 17.755 0.0128 0.000 0.107 POST /api/condition/503f045c-39b6-40b7-8e6f-7945d63fde13 HTTP/2.0 1385 17.340 0.0125 0.000 0.110 POST /api/condition/2b535d60-969d-4d0c-a33f-4b7bcba019c6 HTTP/2.0 1393 17.011 0.0122 0.000 0.108 POST /api/condition/202e871a-4c60-404c-a5f2-e1dfd872c8f2 HTTP/2.0 1405 16.912 0.0120 0.000 0.109 POST /api/condition/b5655341-9af2-40de-a5e5-50addf5dcc4a HTTP/2.0 1402 16.824 0.0120 0.000 0.118 POST /api/condition/3c610e3b-2dce-4c2f-9fa3-ef8f58793a48 HTTP/2.0 1404 16.780 0.0120 0.000 0.111 POST /api/condition/235f5e7c-7969-4f44-8ac7-a791bb38c45b HTTP/2.0 1388 16.460 0.0119 0.000 0.116 POST /api/condition/2d01a972-229d-4ca7-a3a9-5ec79d4d4697 HTTP/2.0 1389 16.358 0.0118 0.000 0.112 POST /api/condition/0b1a7ace-9ea2-4166-9dc9-b2d66d8bd029 HTTP/2.0 1407 16.352 0.0116 0.000 0.147 POST /api/condition/538b4b06-b653-48b8-9d4a-b491ae18a8a0 HTTP/2.0 1389 16.190 0.0117 0.000 0.108 POST /api/condition/772180c2-53e1-40b3-95ff-52354eb1d283 HTTP/2.0 1412 16.154 0.0114 0.000 0.107 POST /api/condition/304564d8-840d-482f-a558-a5dd4f1e463c HTTP/2.0 1402 16.138 0.0115 0.000 0.107 POST /api/condition/d759ea03-c854-46f9-8b00-28ce41d89af2 HTTP/2.0 1403 16.109 0.0115 0.000 0.111 POST /api/condition/ea57db40-766b-4bd9-9ef9-88da0df249d0 HTTP/2.0 1402 16.048 0.0114 0.000 0.109 POST /api/condition/1e9a8bba-6ceb-4f53-936d-1b433bb0ffd0 HTTP/2.0 1424 16.008 0.0112 0.000 0.104 POST /api/condition/5f6d3686-dc96-4ed4-bf3a-f9eb90dbad56 HTTP/2.0 1395 15.964 0.0114 0.000 0.112 POST /api/condition/52a0b64a-eead-416d-b929-19c2aeb6a23b HTTP/2.0 1401 15.875 0.0113 0.000 0.110 POST /api/condition/c3d798da-ba97-4410-b3d3-ef34ed93a3be HTTP/2.0 1409 15.869 0.0113 0.000 0.108 POST /api/condition/f383ff6e-67ce-4b16-ae76-01f616722d7d HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.935 0.9350 0.935 0.935 GET /api/condition/f8534bb7-43d4-4318-830d-8e4782d4612a?condition_level=info%2Cwarning%2Ccritical&end_time=1628666064&start_time=start_time HTTP/2.0 81 72.725 0.8978 0.022 1.020 GET /api/trend HTTP/2.0 1 0.818 0.8180 0.818 0.818 GET /api/condition/1e9a8bba-6ceb-4f53-936d-1b433bb0ffd0?condition_level=info%2Cwarning%2Ccritical&end_time=1630081533 HTTP/2.0 1 0.767 0.7670 0.767 0.767 GET /api/condition/3a68a4c1-6f8b-4179-8c9e-666d3c4c525a?condition_level=info%2Cwarning%2Ccritical&end_time=1628438400&start_time=1628434800 HTTP/2.0 1 0.667 0.6670 0.667 0.667 GET /api/condition/1e737659-8979-445f-a37a-27f5cba15dcb?condition_level=info%2Cwarning%2Ccritical&end_time=1629044492 HTTP/2.0 1 0.646 0.6460 0.646 0.646 GET /api/isu/1221d0a6-2ef8-4619-8be8-c88960dab356/graph?datetime=1628607600 HTTP/2.0 1 0.638 0.6380 0.638 0.638 GET /api/isu/538b4b06-b653-48b8-9d4a-b491ae18a8a0/graph?datetime=1628521200 HTTP/2.0 1 0.578 0.5780 0.578 0.578 GET /api/condition/304564d8-840d-482f-a558-a5dd4f1e463c?condition_level=warning%2Ccritical&end_time=1629170383 HTTP/2.0 1 0.577 0.5770 0.577 0.577 GET /api/condition/1e9a8bba-6ceb-4f53-936d-1b433bb0ffd0?condition_level=info%2Cwarning%2Ccritical&end_time=1630089820 HTTP/2.0 1 0.563 0.5630 0.563 0.563 GET /api/condition/f383ff6e-67ce-4b16-ae76-01f616722d7d?condition_level=info%2Cwarning%2Ccritical&end_time=1629930927 HTTP/2.0 1 0.546 0.5460 0.546 0.546 GET /api/isu/4e60e25e-ba08-4f08-bb83-dfa3909200c1/graph?datetime=1629730800 HTTP/2.0 1 0.532 0.5320 0.532 0.532 GET /api/condition/43b188bf-62fd-48aa-b5cb-5791dcc19153?condition_level=info%2Cwarning%2Ccritical&end_time=1629848817 HTTP/2.0 1 0.489 0.4890 0.489 0.489 GET /api/condition/1e9a8bba-6ceb-4f53-936d-1b433bb0ffd0?condition_level=info%2Cwarning%2Ccritical&end_time=1630193014 HTTP/2.0 1 0.484 0.4840 0.484 0.484 GET /api/condition/f383ff6e-67ce-4b16-ae76-01f616722d7d?condition_level=info%2Cwarning%2Ccritical&end_time=1630129711 HTTP/2.0 1 0.483 0.4830 0.483 0.483 GET /api/condition/503f045c-39b6-40b7-8e6f-7945d63fde13?condition_level=info%2Cwarning%2Ccritical&end_time=1628648734 HTTP/2.0 1 0.478 0.4780 0.478 0.478 GET /api/condition/b5655341-9af2-40de-a5e5-50addf5dcc4a?condition_level=info%2Cwarning%2Ccritical&end_time=1628551603 HTTP/2.0 1 0.476 0.4760 0.476 0.476 GET /api/condition/7cf2f6ac-f45b-4b49-bd48-9ad0b8aec019?condition_level=info%2Cwarning%2Ccritical&end_time=1629416145 HTTP/2.0 1 0.469 0.4690 0.469 0.469 GET /api/condition/a6b328fd-4214-443a-b2fe-17fb0b52f129?condition_level=info%2Cwarning%2Ccritical&end_time=1630152935 HTTP/2.0 1 0.468 0.4680 0.468 0.468 GET /api/condition/772180c2-53e1-40b3-95ff-52354eb1d283?condition_level=info%2Cwarning%2Ccritical&end_time=1629462717 HTTP/2.0 1 0.467 0.4670 0.467 0.467 GET /api/condition/43b188bf-62fd-48aa-b5cb-5791dcc19153?condition_level=info%2Cwarning%2Ccritical&end_time=1630182541 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 81 72.725 0.8978 0.022 1.020 GET /api/trend HTTP/2.0 73 6.822 0.0935 0.005 1.000 GET /api/isu/304564d8-840d-482f-a558-a5dd4f1e463c/icon HTTP/2.0 1 0.935 0.9350 0.935 0.935 GET /api/condition/f8534bb7-43d4-4318-830d-8e4782d4612a?condition_level=info%2Cwarning%2Ccritical&end_time=1628666064&start_time=start_time HTTP/2.0 41 4.460 0.1088 0.008 0.860 GET /api/isu/f8534bb7-43d4-4318-830d-8e4782d4612a/icon HTTP/2.0 1 0.818 0.8180 0.818 0.818 GET /api/condition/1e9a8bba-6ceb-4f53-936d-1b433bb0ffd0?condition_level=info%2Cwarning%2Ccritical&end_time=1630081533 HTTP/2.0 73 6.161 0.0844 0.002 0.796 GET /api/isu/f383ff6e-67ce-4b16-ae76-01f616722d7d/icon HTTP/2.0 1 0.767 0.7670 0.767 0.767 GET /api/condition/3a68a4c1-6f8b-4179-8c9e-666d3c4c525a?condition_level=info%2Cwarning%2Ccritical&end_time=1628438400&start_time=1628434800 HTTP/2.0 40 2.948 0.0737 0.003 0.715 GET /api/isu/abb712f5-364f-462e-9931-269985ca7d6f/icon HTTP/2.0 51 3.996 0.0784 0.016 0.681 GET /api/isu/f6c96ec7-1b41-425e-b110-960a010fa3c4/icon HTTP/2.0 1 0.667 0.6670 0.667 0.667 GET /api/condition/1e737659-8979-445f-a37a-27f5cba15dcb?condition_level=info%2Cwarning%2Ccritical&end_time=1629044492 HTTP/2.0 48 4.098 0.0854 0.012 0.649 GET /api/isu/d759ea03-c854-46f9-8b00-28ce41d89af2/icon HTTP/2.0 1 0.646 0.6460 0.646 0.646 GET /api/isu/1221d0a6-2ef8-4619-8be8-c88960dab356/graph?datetime=1628607600 HTTP/2.0 1 0.638 0.6380 0.638 0.638 GET /api/isu/538b4b06-b653-48b8-9d4a-b491ae18a8a0/graph?datetime=1628521200 HTTP/2.0 45 3.274 0.0728 0.002 0.629 GET /api/isu/52a0b64a-eead-416d-b929-19c2aeb6a23b/icon HTTP/2.0 44 3.662 0.0832 0.002 0.615 GET /api/isu/a6b328fd-4214-443a-b2fe-17fb0b52f129/icon HTTP/2.0 51 4.104 0.0805 0.007 0.606 GET /api/isu/503f045c-39b6-40b7-8e6f-7945d63fde13/icon HTTP/2.0 1 0.578 0.5780 0.578 0.578 GET /api/condition/304564d8-840d-482f-a558-a5dd4f1e463c?condition_level=warning%2Ccritical&end_time=1629170383 HTTP/2.0 1 0.577 0.5770 0.577 0.577 GET /api/condition/1e9a8bba-6ceb-4f53-936d-1b433bb0ffd0?condition_level=info%2Cwarning%2Ccritical&end_time=1630089820 HTTP/2.0 2 0.577 0.2885 0.005 0.572 GET /api/condition/3a78ce0d-df50-4252-bb1c-4057fa7952da?condition_level=info%2Cwarning%2Ccritical&end_time=1630182757 HTTP/2.0 41 3.082 0.0752 0.005 0.570 GET /api/isu/3f049499-b2a9-4e8e-9a0d-7b6789632f1b/icon HTTP/2.0 TOP 10 Slow Requests 1 1.020 GET /api/trend HTTP/2.0 2 1.016 GET /api/trend HTTP/2.0 3 1.015 GET /api/trend HTTP/2.0 4 1.012 GET /api/trend HTTP/2.0 5 1.009 GET /api/trend HTTP/2.0 6 1.006 GET /api/trend HTTP/2.0 7 1.006 GET /api/trend HTTP/2.0 8 1.005 GET /api/trend HTTP/2.0 9 1.005 GET /api/trend HTTP/2.0 10 1.005 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 136.17 QPS, 1.13x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 15331363 # Scores: V/M = 0.03 # Time range: 2022-06-26 01:10:09 to 01:11:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 8170 # Exec time 46 68s 3us 131ms 8ms 18ms 15ms 4ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 87.76k 11 11 11 11 0 11 # Query size 0 47.87k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ## # 10us #### # 100us # # 1ms ################################################################ # 10ms ############# # 100ms # # 1s # 10s+ COMMIT\G # Query 2: 98.21 QPS, 0.42x concurrency, ID 0x931A992E852C61FC6D46141A39DEF4FE at byte 67194133 # Scores: V/M = 0.01 # Time range: 2022-06-26 01:10:09 to 01:11:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 5991 # Exec time 17 26s 9us 73ms 4ms 17ms 7ms 1ms # Lock time 8 241ms 0 18ms 40us 28us 380us 11us # Rows sent 57 1.77M 0 1.62k 309.85 1.20k 390.17 107.34 # Rows examine 55 1.65M 0 1.62k 289.59 1.14k 371.25 97.36 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 35 277.16M 589 271.29k 47.37k 182.98k 59.63k 16.75k # Query size 2 672.82k 115 115 115 115 0 115 # Boolean: # QC hit 6% yes, 93% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ######### # 100us ############################################################ # 1ms ################################################################ # 10ms ###################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '3c610e3b-2dce-4c2f-9fa3-ef8f58793a48' ORDER BY timestamp DESC\G # Query 3: 1.18k QPS, 0.29x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 52635801 # Scores: V/M = 0.00 # Time range: 2022-06-26 01:10:09 to 01:11:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 21 70873 # Exec time 11 17s 18us 38ms 241us 799us 1ms 52us # Lock time 78 2s 4us 17ms 30us 27us 236us 12us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 98 69.21k 1 1 1 1 0 1 # Bytes sent 0 905.57k 13 14 13.08 13.83 0.36 12.54 # Query size 58 17.44M 225 302 258.06 271.23 13.79 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ######## # 1ms ### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('1221d0a6-2ef8-4619-8be8-c88960dab356', '2021-08-18 19:13:59', 1, 'is_dirty=true,is_overweight=true,is_broken=true', 'う〜ん無理そう〜')\G # Query 4: 1.57k QPS, 0.20x concurrency, ID 0xDA556F9115773A1A99AA0165670CE848 at byte 52636291 # Scores: V/M = 0.00 # Time range: 2022-06-26 01:10:04 to 01:11:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 31 103505 # Exec time 9 13s 13us 38ms 126us 348us 600us 38us # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 2 20.67M 52 681 209.36 621.67 157.96 158.58 # Query size 9 2.96M 30 30 30 30 0 30 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ###### # 1ms # # 10ms # # 100ms # 1s # 10s+ administrator command: Prepare\G # Query 5: 33.23 QPS, 0.19x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 105256575 # Scores: V/M = 0.01 # Time range: 2022-06-26 01:10:09 to 01:11:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 1994 # Exec time 7 11s 85us 52ms 6ms 21ms 7ms 3ms # Lock time 4 126ms 7us 21ms 63us 28us 696us 12us # Rows sent 28 890.48k 0 1.39k 457.30 1.04k 317.90 381.65 # Rows examine 29 890.48k 0 1.39k 457.30 1.04k 317.90 381.65 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 17 135.58M 589 230.65k 69.63k 158.07k 48.28k 59.57k # Query size 1 305.72k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ##################### # 1ms ################################################################ # 10ms ################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'f383ff6e-67ce-4b16-ae76-01f616722d7d' AND `timestamp` < '2021-08-26 11:35:24' ORDER BY `timestamp` DESC\G # Query 6: 10 QPS, 0.07x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 103728939 # Scores: V/M = 0.01 # Time range: 2022-06-26 01:10:09 to 01:11:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 600 # Exec time 3 4s 17us 54ms 7ms 22ms 8ms 4ms # Lock time 0 21ms 0 4ms 35us 44us 215us 10us # Rows sent 13 432.44k 6 1.46k 738.02 1.26k 372.33 685.39 # Rows examine 14 431.39k 0 1.46k 736.24 1.26k 374.54 685.39 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 8 66.82M 1.48k 240.63k 114.04k 201.74k 59.35k 106.99k # Query size 0 67.97k 116 116 116 116 0 116 # Boolean: # QC hit 1% yes, 98% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ###### # 1ms ################################################################ # 10ms ######################## # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '4e60e25e-ba08-4f08-bb83-dfa3909200c1' ORDER BY `timestamp` ASC\G ```

ac6243c52138df9e90e499e6c4379372e8b69c27

karamaru-alpha commented 2 years ago

log設定調整 15909

4

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1452 11.109 0.0077 0.000 0.104 POST /api/condition/8ffa5dfa-76e1-43fa-8a8b-ad0a7afadf43 HTTP/2.0 1450 12.231 0.0084 0.000 0.107 POST /api/condition/e0559912-89a4-417c-849e-91fbd5fdc616 HTTP/2.0 1449 11.801 0.0081 0.000 0.108 POST /api/condition/22a2a41f-2ac2-485c-a1ae-49a5a8755b94 HTTP/2.0 1448 10.581 0.0073 0.000 0.109 POST /api/condition/8955583f-523c-46ac-992e-16492781d4e6 HTTP/2.0 1448 12.527 0.0087 0.000 0.112 POST /api/condition/af24ba51-aa11-4aee-aebe-b62b391a4297 HTTP/2.0 1447 12.829 0.0089 0.000 0.109 POST /api/condition/d47c662d-c618-4e79-b993-a6f7d2243bc2 HTTP/2.0 1443 11.595 0.0080 0.000 0.109 POST /api/condition/cc5a454f-3911-4670-8fdf-1334f9ee8d71 HTTP/2.0 1442 12.788 0.0089 0.000 0.113 POST /api/condition/56d5036f-9c3a-457c-baf6-1a24311a49f2 HTTP/2.0 1442 13.121 0.0091 0.000 0.108 POST /api/condition/d0813208-269a-4a39-8004-358a6440950e HTTP/2.0 1442 12.306 0.0085 0.000 0.121 POST /api/condition/947c33da-3dda-4e63-95dc-a9db2993155b HTTP/2.0 1441 11.858 0.0082 0.000 0.109 POST /api/condition/4c0868cf-efd4-4c73-a22b-b72b97e5f4ad HTTP/2.0 1441 11.579 0.0080 0.000 0.105 POST /api/condition/31575042-6ad6-4368-9be6-a233a24e71d5 HTTP/2.0 1441 12.164 0.0084 0.000 0.110 POST /api/condition/5f8335fd-3591-4297-879c-54ef199093e2 HTTP/2.0 1441 13.075 0.0091 0.000 0.115 POST /api/condition/0743d046-3aa2-445d-8df8-45b138dfc7d3 HTTP/2.0 1440 11.833 0.0082 0.000 0.111 POST /api/condition/bd6c07d2-f30c-4987-98e3-0ec29533a0f2 HTTP/2.0 1440 11.404 0.0079 0.000 0.112 POST /api/condition/684b80ac-7c18-430f-b276-08721490cfb2 HTTP/2.0 1440 13.360 0.0093 0.000 0.111 POST /api/condition/e818b5a7-6945-4326-b3ed-287c14f0adad HTTP/2.0 1439 12.602 0.0088 0.000 0.117 POST /api/condition/cf220e2b-7857-4940-addc-494ecbd546e0 HTTP/2.0 1439 11.743 0.0082 0.000 0.107 POST /api/condition/f87132c9-2b38-426c-8d01-d9c831b6b7a3 HTTP/2.0 1438 13.036 0.0091 0.000 0.111 POST /api/condition/ef629e32-861c-427d-ad88-7de6b7d7bedb HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 115 107.068 0.9310 0.022 1.030 GET /api/trend HTTP/2.0 533 38.919 0.0730 0.000 0.356 GET /api/isu HTTP/2.0 1413 14.597 0.0103 0.000 0.124 POST /api/condition/81e19259-fe80-47af-9da8-a06b8be433f4 HTTP/2.0 1417 14.454 0.0102 0.000 0.107 POST /api/condition/15b2a57d-7227-4650-9470-0aa65fa72d1c HTTP/2.0 1433 14.211 0.0099 0.000 0.124 POST /api/condition/fa37a9ab-30aa-4b46-9bc6-67f86ec62d5b HTTP/2.0 1435 13.915 0.0097 0.000 0.108 POST /api/condition/4181a99b-c814-4ae8-91c9-edc8f01da5eb HTTP/2.0 1427 13.659 0.0096 0.000 0.110 POST /api/condition/187a7e91-778a-4ca3-b978-150615b3dfcd HTTP/2.0 1436 13.546 0.0094 0.000 0.108 POST /api/condition/58fc0007-2ecb-4c4a-b97a-c63d68657e5d HTTP/2.0 1440 13.360 0.0093 0.000 0.111 POST /api/condition/e818b5a7-6945-4326-b3ed-287c14f0adad HTTP/2.0 1423 13.232 0.0093 0.000 0.110 POST /api/condition/6ba2a58d-0280-4d88-8b9b-100a0d3e123e HTTP/2.0 1427 13.231 0.0093 0.000 0.113 POST /api/condition/0010c9c6-2d85-4f61-8987-c6280d976f8a HTTP/2.0 1425 13.169 0.0092 0.000 0.109 POST /api/condition/8b1a84aa-aa4c-46c9-ab6d-4078fcbaf4c7 HTTP/2.0 1442 13.121 0.0091 0.000 0.108 POST /api/condition/d0813208-269a-4a39-8004-358a6440950e HTTP/2.0 1441 13.075 0.0091 0.000 0.115 POST /api/condition/0743d046-3aa2-445d-8df8-45b138dfc7d3 HTTP/2.0 1438 13.046 0.0091 0.000 0.108 POST /api/condition/75da99ab-089b-44e3-8a1c-82097c52d3aa HTTP/2.0 1438 13.036 0.0091 0.000 0.111 POST /api/condition/ef629e32-861c-427d-ad88-7de6b7d7bedb HTTP/2.0 1425 13.026 0.0091 0.000 0.112 POST /api/condition/7241f3be-3466-480a-9fb4-4ca0fab4fd3d HTTP/2.0 1438 12.931 0.0090 0.000 0.112 POST /api/condition/de6a6160-7ac7-4462-8172-be44d4f05ad9 HTTP/2.0 1429 12.912 0.0090 0.000 0.111 POST /api/condition/5e1229c0-cb17-467b-9bc2-eb4312efce72 HTTP/2.0 1425 12.863 0.0090 0.000 0.107 POST /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 115 107.068 0.9310 0.022 1.030 GET /api/trend HTTP/2.0 1 0.768 0.7680 0.768 0.768 GET /api/condition/cc94d8f3-fde6-4571-a27d-d197ebec4dbd?condition_level=info%2Cwarning%2Ccritical&end_time=1629732667 HTTP/2.0 1 0.756 0.7560 0.756 0.756 GET /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b?condition_level=info%2Cwarning%2Ccritical&end_time=1629879876 HTTP/2.0 1 0.470 0.4700 0.470 0.470 GET /api/condition/d0813208-269a-4a39-8004-358a6440950e?condition_level=info%2Cwarning%2Ccritical&end_time=1629472078 HTTP/2.0 1 0.392 0.3920 0.392 0.392 GET /api/condition/af24ba51-aa11-4aee-aebe-b62b391a4297?condition_level=info%2Cwarning%2Ccritical&end_time=1628561164 HTTP/2.0 1 0.385 0.3850 0.385 0.385 GET /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b?condition_level=info%2Cwarning%2Ccritical&end_time=1629627395 HTTP/2.0 1 0.380 0.3800 0.380 0.380 GET /api/condition/cf220e2b-7857-4940-addc-494ecbd546e0?condition_level=info%2Cwarning%2Ccritical&end_time=1629649807 HTTP/2.0 1 0.377 0.3770 0.377 0.377 GET /api/condition/15b2a57d-7227-4650-9470-0aa65fa72d1c?condition_level=info%2Cwarning%2Ccritical&end_time=1628438400&start_time=1628434800 HTTP/2.0 1 0.369 0.3690 0.369 0.369 GET /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b?condition_level=info%2Cwarning%2Ccritical&end_time=1629572203 HTTP/2.0 1 0.366 0.3660 0.366 0.366 GET /api/condition/d47c662d-c618-4e79-b993-a6f7d2243bc2?condition_level=info%2Cwarning%2Ccritical&end_time=1628524965 HTTP/2.0 1 0.361 0.3610 0.361 0.361 GET /api/isu/81e19259-fe80-47af-9da8-a06b8be433f4/graph?datetime=1628953200 HTTP/2.0 1 0.358 0.3580 0.358 0.358 GET /api/condition/187a7e91-778a-4ca3-b978-150615b3dfcd?condition_level=info%2Cwarning%2Ccritical&end_time=1629514603 HTTP/2.0 1 0.354 0.3540 0.354 0.354 GET /api/condition/0010c9c6-2d85-4f61-8987-c6280d976f8a?condition_level=info%2Cwarning%2Ccritical&end_time=1629752908 HTTP/2.0 1 0.336 0.3360 0.336 0.336 GET /api/condition/d47c662d-c618-4e79-b993-a6f7d2243bc2?condition_level=info%2Cwarning%2Ccritical&end_time=1629867769 HTTP/2.0 1 0.327 0.3270 0.327 0.327 GET /api/isu/22a2a41f-2ac2-485c-a1ae-49a5a8755b94/graph?datetime=1629385200 HTTP/2.0 1 0.323 0.3230 0.323 0.323 GET /api/condition/cc5a454f-3911-4670-8fdf-1334f9ee8d71?condition_level=info%2Cwarning%2Ccritical&end_time=1629888384 HTTP/2.0 1 0.321 0.3210 0.321 0.321 GET /api/condition/0010c9c6-2d85-4f61-8987-c6280d976f8a?condition_level=info%2Cwarning%2Ccritical&end_time=1629910049 HTTP/2.0 1 0.320 0.3200 0.320 0.320 GET /api/condition/8b1a84aa-aa4c-46c9-ab6d-4078fcbaf4c7?condition_level=info%2Cwarning%2Ccritical&end_time=1630085484 HTTP/2.0 1 0.320 0.3200 0.320 0.320 GET /api/condition/d47c662d-c618-4e79-b993-a6f7d2243bc2?condition_level=info%2Cwarning%2Ccritical&end_time=1629823365 HTTP/2.0 1 0.320 0.3200 0.320 0.320 GET /api/condition/4c0868cf-efd4-4c73-a22b-b72b97e5f4ad?condition_level=info%2Cwarning%2Ccritical&end_time=1629869354 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 115 107.068 0.9310 0.022 1.030 GET /api/trend HTTP/2.0 1 0.768 0.7680 0.768 0.768 GET /api/condition/cc94d8f3-fde6-4571-a27d-d197ebec4dbd?condition_level=info%2Cwarning%2Ccritical&end_time=1629732667 HTTP/2.0 1 0.756 0.7560 0.756 0.756 GET /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b?condition_level=info%2Cwarning%2Ccritical&end_time=1629879876 HTTP/2.0 63 3.906 0.0620 0.000 0.689 GET /api/isu/f87132c9-2b38-426c-8d01-d9c831b6b7a3/icon HTTP/2.0 111 6.681 0.0602 0.002 0.475 GET /api/isu/58fc0007-2ecb-4c4a-b97a-c63d68657e5d/icon HTTP/2.0 2 0.472 0.2360 0.001 0.471 GET /api/condition/c39e23ec-1681-4251-bd08-d082b882a74b?condition_level=info%2Cwarning%2Ccritical&end_time=1625683480 HTTP/2.0 1 0.470 0.4700 0.470 0.470 GET /api/condition/d0813208-269a-4a39-8004-358a6440950e?condition_level=info%2Cwarning%2Ccritical&end_time=1629472078 HTTP/2.0 1 0.392 0.3920 0.392 0.392 GET /api/condition/af24ba51-aa11-4aee-aebe-b62b391a4297?condition_level=info%2Cwarning%2Ccritical&end_time=1628561164 HTTP/2.0 1 0.385 0.3850 0.385 0.385 GET /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b?condition_level=info%2Cwarning%2Ccritical&end_time=1629627395 HTTP/2.0 1 0.380 0.3800 0.380 0.380 GET /api/condition/cf220e2b-7857-4940-addc-494ecbd546e0?condition_level=info%2Cwarning%2Ccritical&end_time=1629649807 HTTP/2.0 1 0.377 0.3770 0.377 0.377 GET /api/condition/15b2a57d-7227-4650-9470-0aa65fa72d1c?condition_level=info%2Cwarning%2Ccritical&end_time=1628438400&start_time=1628434800 HTTP/2.0 66 3.170 0.0480 0.004 0.370 GET /api/isu/2e9a4d03-2408-48e4-b5a8-972fdcbbf276/icon HTTP/2.0 1 0.369 0.3690 0.369 0.369 GET /api/condition/59b177db-a16b-40e8-a4d7-ad536e85ed2b?condition_level=info%2Cwarning%2Ccritical&end_time=1629572203 HTTP/2.0 1 0.366 0.3660 0.366 0.366 GET /api/condition/d47c662d-c618-4e79-b993-a6f7d2243bc2?condition_level=info%2Cwarning%2Ccritical&end_time=1628524965 HTTP/2.0 79 4.732 0.0599 0.008 0.363 GET /api/isu/94c2e46b-f4a6-415c-bbac-8a03bb6b3855/icon HTTP/2.0 1 0.361 0.3610 0.361 0.361 GET /api/isu/81e19259-fe80-47af-9da8-a06b8be433f4/graph?datetime=1628953200 HTTP/2.0 1 0.358 0.3580 0.358 0.358 GET /api/condition/187a7e91-778a-4ca3-b978-150615b3dfcd?condition_level=info%2Cwarning%2Ccritical&end_time=1629514603 HTTP/2.0 533 38.919 0.0730 0.000 0.356 GET /api/isu HTTP/2.0 1 0.354 0.3540 0.354 0.354 GET /api/condition/0010c9c6-2d85-4f61-8987-c6280d976f8a?condition_level=info%2Cwarning%2Ccritical&end_time=1629752908 HTTP/2.0 1 0.336 0.3360 0.336 0.336 GET /api/condition/d47c662d-c618-4e79-b993-a6f7d2243bc2?condition_level=info%2Cwarning%2Ccritical&end_time=1629867769 HTTP/2.0 TOP 10 Slow Requests 1 1.030 GET /api/trend HTTP/2.0 2 1.015 GET /api/trend HTTP/2.0 3 1.013 GET /api/trend HTTP/2.0 4 1.010 GET /api/trend HTTP/2.0 5 1.007 GET /api/trend HTTP/2.0 6 1.006 GET /api/trend HTTP/2.0 7 1.006 GET /api/trend HTTP/2.0 8 1.005 GET /api/trend HTTP/2.0 9 1.005 GET /api/trend HTTP/2.0 10 1.005 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 144.13 QPS, 0.72x concurrency, ID 0x931A992E852C61FC6D46141A39DEF4FE at byte 116106696 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:32:45 to 22:33:45 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 8648 # Exec time 28 43s 9us 87ms 5ms 20ms 7ms 2ms # Lock time 13 441ms 0 15ms 50us 28us 435us 11us # Rows sent 58 2.51M 0 1.62k 303.92 1.14k 375.51 107.34 # Rows examine 59 2.50M 0 1.62k 303.25 1.14k 375.81 107.34 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 36 390.57M 589 257.16k 46.25k 174.27k 56.87k 16.75k # Query size 2 971.21k 115 115 115 115 0 115 # Boolean: # QC hit 2% yes, 97% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ### # 100us ############################################################ # 1ms ################################################################ # 10ms ########################## # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '745f7105-b56f-42de-a8c9-0f6a6c116419' ORDER BY timestamp DESC\G # Query 2: 141 QPS, 0.67x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 82630223 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:32:44 to 22:33:45 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 8601 # Exec time 27 41s 3us 80ms 5ms 12ms 4ms 3ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 92.39k 11 11 11 11 0 11 # Query size 0 50.40k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ### # 10us #### # 100us ## # 1ms ################################################################ # 10ms ######### # 100ms # 1s # 10s+ COMMIT\G # Query 3: 1.22k QPS, 0.31x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 67928863 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:32:45 to 22:33:45 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 20 72959 # Exec time 12 19s 16us 37ms 255us 881us 1ms 49us # Lock time 74 3s 4us 19ms 34us 26us 306us 12us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 98 71.25k 1 1 1 1 0 1 # Bytes sent 0 934.09k 13 14 13.11 13.83 0.40 12.54 # Query size 56 17.89M 225 302 257.08 271.23 12.68 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ######## # 1ms ### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('adc13a76-f0ca-4db9-afca-e444c670f8c2', '2021-08-20 10:54:11', 1, 'is_dirty=true,is_overweight=true,is_broken=true', '改善を希望します。')\G # Query 4: 1.77k QPS, 0.28x concurrency, ID 0xDA556F9115773A1A99AA0165670CE848 at byte 79578972 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:32:40 to 22:33:45 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 31 115025 # Exec time 12 18s 12us 29ms 158us 515us 676us 38us # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 2 24.54M 52 681 223.74 621.67 173.61 158.58 # Query size 10 3.29M 30 30 30 30 0 30 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ######## # 1ms ## # 10ms # # 100ms # 1s # 10s+ administrator command: Prepare\G # Query 5: 41.05 QPS, 0.29x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 98180122 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:32:44 to 22:33:45 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 2504 # Exec time 11 18s 89us 63ms 7ms 22ms 8ms 4ms # Lock time 3 106ms 6us 10ms 42us 35us 321us 11us # Rows sent 29 1.24M 0 1.46k 518.98 1.09k 336.96 463.90 # Rows examine 29 1.24M 0 1.46k 518.98 1.09k 336.96 463.90 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 18 192.15M 589 229.57k 78.58k 165.97k 50.93k 68.96k # Query size 1 383.91k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ############### # 1ms ################################################################ # 10ms ########################## # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '7241f3be-3466-480a-9fb4-4ca0fab4fd3d' AND `timestamp` < '2021-08-18 23:38:56' ORDER BY `timestamp` DESC\G # Query 6: 11.18 QPS, 0.09x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 110083557 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:32:44 to 22:33:45 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 682 # Exec time 3 5s 16us 59ms 8ms 23ms 8ms 5ms # Lock time 1 44ms 0 17ms 64us 23us 683us 10us # Rows sent 10 478.93k 6 1.47k 719.09 1.26k 383.93 685.39 # Rows examine 11 478.57k 0 1.47k 718.56 1.26k 384.82 685.39 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 6 72.65M 1.50k 234.11k 109.07k 201.74k 58.55k 101.89k # Query size 0 77.26k 116 116 116 116 0 116 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ########## # 1ms ################################################################ # 10ms ############################# # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '187a7e91-778a-4ca3-b978-150615b3dfcd' ORDER BY `timestamp` ASC\G ```

3ee36c04ee8c914401003f1a8dfe28b716598013

karamaru-alpha commented 2 years ago

存在確認にLimit1をかける 13566

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1441 14.141 0.0098 0.000 0.105 POST /api/condition/242daff6-02f1-40dc-a4e2-b9147542485e HTTP/2.0 1429 15.735 0.0110 0.000 0.107 POST /api/condition/208bb1af-faa3-40e0-bc4f-acf4763ff5df HTTP/2.0 1428 13.903 0.0097 0.000 0.127 POST /api/condition/fb5e9e23-c2d5-4d2b-8c67-f86e074a4afb HTTP/2.0 1427 14.107 0.0099 0.000 0.124 POST /api/condition/bff70d40-b2c0-413f-a5fd-9d4ee22d5213 HTTP/2.0 1423 14.428 0.0101 0.000 0.110 POST /api/condition/4063ed17-eba2-4a12-bd42-8fa2372c780f HTTP/2.0 1423 14.826 0.0104 0.000 0.121 POST /api/condition/a72e176e-f2ab-4781-9110-d1addd32f07a HTTP/2.0 1422 15.031 0.0106 0.000 0.112 POST /api/condition/747f080c-2db9-4db3-bf9d-94568bc19606 HTTP/2.0 1416 15.366 0.0109 0.000 0.115 POST /api/condition/508d66ea-6dd4-4d78-893c-5d9465999372 HTTP/2.0 1415 15.460 0.0109 0.000 0.113 POST /api/condition/5fe1fa45-a693-41c4-abcb-db6f45ea73b7 HTTP/2.0 1415 15.439 0.0109 0.000 0.108 POST /api/condition/57607e2c-f1dc-4118-85e4-48e60ff6a1ba HTTP/2.0 1413 14.712 0.0104 0.000 0.111 POST /api/condition/2a2a870d-bc27-4aaf-b9a9-9f5af71ddd1f HTTP/2.0 1412 14.229 0.0101 0.000 0.109 POST /api/condition/e1a83245-0e8c-4bda-99f6-d6819f90879c HTTP/2.0 1412 13.473 0.0095 0.000 0.110 POST /api/condition/996e21fa-26d0-41d0-8cd4-04c6567e7279 HTTP/2.0 1411 15.658 0.0111 0.000 0.108 POST /api/condition/9f10c27e-a281-4da2-9f3a-56ec27e89f3d HTTP/2.0 1411 15.441 0.0109 0.000 0.132 POST /api/condition/af1a2f2f-e8cf-4c99-ad55-4d7ecd1f57a4 HTTP/2.0 1411 16.914 0.0120 0.000 0.114 POST /api/condition/bcac744b-a75a-4029-9efc-dc0b9d7ae6c7 HTTP/2.0 1411 15.507 0.0110 0.000 0.118 POST /api/condition/b6435656-f83c-4ba8-a96a-869d9e6a240e HTTP/2.0 1409 15.807 0.0112 0.000 0.121 POST /api/condition/6e60073c-0059-4ee2-be5a-e2c5b06f2128 HTTP/2.0 1409 15.010 0.0107 0.000 0.110 POST /api/condition/54a91534-85f9-43b2-b058-8c483eb134ef HTTP/2.0 1407 15.023 0.0107 0.000 0.113 POST /api/condition/397f2c20-8deb-43aa-8926-d46ed19d5122 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 96 91.298 0.9510 0.024 1.028 GET /api/trend HTTP/2.0 426 34.098 0.0800 0.000 0.512 GET /api/isu HTTP/2.0 1401 17.643 0.0126 0.000 0.110 POST /api/condition/ea4e7b74-c91d-4d7b-9870-6185c72776b2 HTTP/2.0 1395 17.192 0.0123 0.000 0.121 POST /api/condition/a4f9f9c1-e0c4-4df7-b435-f488a74873b0 HTTP/2.0 1400 17.140 0.0122 0.000 0.116 POST /api/condition/87b6efd5-6172-4c56-a0db-fafd3e0eefb7 HTTP/2.0 1394 17.022 0.0122 0.000 0.116 POST /api/condition/a89fbe38-8bbf-4722-839e-d1f29a6a1429 HTTP/2.0 1411 16.914 0.0120 0.000 0.114 POST /api/condition/bcac744b-a75a-4029-9efc-dc0b9d7ae6c7 HTTP/2.0 1380 16.705 0.0121 0.000 0.114 POST /api/condition/d388e441-d87c-4de1-837f-92fee638586f HTTP/2.0 1385 16.507 0.0119 0.000 0.115 POST /api/condition/0b38f4be-b45a-4352-af93-73730abed55c HTTP/2.0 1373 16.473 0.0120 0.000 0.113 POST /api/condition/0e0526af-529e-46a1-b101-bde1533892da HTTP/2.0 1378 16.372 0.0119 0.000 0.117 POST /api/condition/cf3aa2bc-800e-4fbd-b038-3b19e0d201b0 HTTP/2.0 1392 16.346 0.0117 0.000 0.113 POST /api/condition/3e11af51-8d00-4ec0-b88a-99ddfb576579 HTTP/2.0 1400 16.168 0.0115 0.000 0.107 POST /api/condition/f4293891-1525-4f0e-baa5-28a3d1ed1c53 HTTP/2.0 1400 16.031 0.0115 0.000 0.121 POST /api/condition/f31d1869-199f-43e5-a14d-6bf4abc85c83 HTTP/2.0 1404 15.951 0.0114 0.000 0.116 POST /api/condition/576669d5-449e-4571-a1bb-df6c8a4f8bc2 HTTP/2.0 1386 15.948 0.0115 0.000 0.108 POST /api/condition/12852e00-4506-474e-8ca9-18309670431f HTTP/2.0 1391 15.854 0.0114 0.000 0.125 POST /api/condition/0189ab86-e1ae-49df-a44f-44ed44cd6111 HTTP/2.0 1389 15.838 0.0114 0.000 0.115 POST /api/condition/49760192-bbc9-4762-97f3-ee19c542dc29 HTTP/2.0 1409 15.807 0.0112 0.000 0.121 POST /api/condition/6e60073c-0059-4ee2-be5a-e2c5b06f2128 HTTP/2.0 1429 15.735 0.0110 0.000 0.107 POST /api/condition/208bb1af-faa3-40e0-bc4f-acf4763ff5df HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 1.006 1.0060 1.006 1.006 GET /api/condition/5fe1fa45-a693-41c4-abcb-db6f45ea73b7?condition_level=info%2Cwarning%2Ccritical&end_time=1628532000&start_time=1628528400 HTTP/2.0 96 91.298 0.9510 0.024 1.028 GET /api/trend HTTP/2.0 1 0.580 0.5800 0.580 0.580 GET /api/condition/5fe1fa45-a693-41c4-abcb-db6f45ea73b7?condition_level=info%2Cwarning%2Ccritical&end_time=1628592621 HTTP/2.0 1 0.493 0.4930 0.493 0.493 GET /api/condition/94ce2e49-433e-4ad3-97a4-583fa2c6973e?condition_level=info%2Cwarning%2Ccritical&end_time=1628678022 HTTP/2.0 1 0.483 0.4830 0.483 0.483 GET /api/condition/a72e176e-f2ab-4781-9110-d1addd32f07a?condition_level=info%2Cwarning%2Ccritical&end_time=1628564090 HTTP/2.0 1 0.466 0.4660 0.466 0.466 GET /api/condition/52291fdd-b0b1-4dc9-86da-d2b646d9a2d3?condition_level=info%2Cwarning%2Ccritical&end_time=1628550198 HTTP/2.0 1 0.455 0.4550 0.455 0.455 GET /api/isu/0b38f4be-b45a-4352-af93-73730abed55c/graph?datetime=1629817200 HTTP/2.0 1 0.452 0.4520 0.452 0.452 GET /api/condition/54a91534-85f9-43b2-b058-8c483eb134ef?condition_level=info%2Cwarning%2Ccritical&end_time=1628532000&start_time=1628528400 HTTP/2.0 1 0.448 0.4480 0.448 0.448 GET /api/condition/397f2c20-8deb-43aa-8926-d46ed19d5122?condition_level=info%2Cwarning%2Ccritical&end_time=1630181412 HTTP/2.0 1 0.432 0.4320 0.432 0.432 GET /api/condition/f4293891-1525-4f0e-baa5-28a3d1ed1c53?condition_level=info%2Cwarning%2Ccritical&end_time=1629920445 HTTP/2.0 1 0.406 0.4060 0.406 0.406 GET /api/condition/0189ab86-e1ae-49df-a44f-44ed44cd6111?condition_level=info%2Cwarning%2Ccritical&end_time=1629662875 HTTP/2.0 1 0.403 0.4030 0.403 0.403 GET /api/condition/4063ed17-eba2-4a12-bd42-8fa2372c780f?condition_level=info%2Cwarning%2Ccritical&end_time=1630098797 HTTP/2.0 1 0.398 0.3980 0.398 0.398 GET /api/condition/961bd2f1-2f81-46d9-b7c6-5259d43cf588?condition_level=info%2Cwarning%2Ccritical&end_time=1629155485 HTTP/2.0 1 0.395 0.3950 0.395 0.395 GET /api/condition/508d66ea-6dd4-4d78-893c-5d9465999372?condition_level=info%2Cwarning%2Ccritical&end_time=1628569468 HTTP/2.0 1 0.393 0.3930 0.393 0.393 GET /api/condition/9f10c27e-a281-4da2-9f3a-56ec27e89f3d?condition_level=info%2Cwarning%2Ccritical&end_time=1629479747 HTTP/2.0 1 0.385 0.3850 0.385 0.385 GET /api/condition/126e8e29-1001-4f95-b34a-3770b70be1f0?condition_level=info%2Cwarning%2Ccritical&end_time=1628958328 HTTP/2.0 1 0.370 0.3700 0.370 0.370 GET /api/condition/12852e00-4506-474e-8ca9-18309670431f?condition_level=warning%2Ccritical&end_time=1629362690 HTTP/2.0 1 0.362 0.3620 0.362 0.362 GET /api/condition/49760192-bbc9-4762-97f3-ee19c542dc29?condition_level=warning%2Ccritical&end_time=1630291062 HTTP/2.0 1 0.359 0.3590 0.359 0.359 GET /api/condition/961bd2f1-2f81-46d9-b7c6-5259d43cf588?condition_level=info%2Cwarning%2Ccritical&end_time=1630013899 HTTP/2.0 1 0.359 0.3590 0.359 0.359 GET /api/condition/f4293891-1525-4f0e-baa5-28a3d1ed1c53?condition_level=info%2Cwarning%2Ccritical&end_time=1629866440 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 96 91.298 0.9510 0.024 1.028 GET /api/trend HTTP/2.0 1 1.006 1.0060 1.006 1.006 GET /api/condition/5fe1fa45-a693-41c4-abcb-db6f45ea73b7?condition_level=info%2Cwarning%2Ccritical&end_time=1628532000&start_time=1628528400 HTTP/2.0 45 4.150 0.0922 0.006 1.002 GET /api/isu/576669d5-449e-4571-a1bb-df6c8a4f8bc2/icon HTTP/2.0 9 0.902 0.1002 0.000 0.810 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab HTTP/2.0 44 3.378 0.0768 0.013 0.791 GET /api/isu/12852e00-4506-474e-8ca9-18309670431f/icon HTTP/2.0 43 3.404 0.0792 0.005 0.789 GET /api/isu/961bd2f1-2f81-46d9-b7c6-5259d43cf588/icon HTTP/2.0 56 4.653 0.0831 0.001 0.777 GET /api/isu/755d7eaf-c2e9-4632-95cf-e83965efccc1/icon HTTP/2.0 12 1.269 0.1057 0.001 0.626 GET /api/isu/6e60073c-0059-4ee2-be5a-e2c5b06f2128 HTTP/2.0 45 3.868 0.0860 0.012 0.596 GET /api/isu/87b6efd5-6172-4c56-a0db-fafd3e0eefb7/icon HTTP/2.0 10 1.176 0.1176 0.016 0.594 GET /api/isu/0b38f4be-b45a-4352-af93-73730abed55c HTTP/2.0 1 0.580 0.5800 0.580 0.580 GET /api/condition/5fe1fa45-a693-41c4-abcb-db6f45ea73b7?condition_level=info%2Cwarning%2Ccritical&end_time=1628592621 HTTP/2.0 61 4.098 0.0672 0.001 0.568 GET /api/isu/bff70d40-b2c0-413f-a5fd-9d4ee22d5213/icon HTTP/2.0 426 34.098 0.0800 0.000 0.512 GET /api/isu HTTP/2.0 1 0.493 0.4930 0.493 0.493 GET /api/condition/94ce2e49-433e-4ad3-97a4-583fa2c6973e?condition_level=info%2Cwarning%2Ccritical&end_time=1628678022 HTTP/2.0 1 0.483 0.4830 0.483 0.483 GET /api/condition/a72e176e-f2ab-4781-9110-d1addd32f07a?condition_level=info%2Cwarning%2Ccritical&end_time=1628564090 HTTP/2.0 1 0.466 0.4660 0.466 0.466 GET /api/condition/52291fdd-b0b1-4dc9-86da-d2b646d9a2d3?condition_level=info%2Cwarning%2Ccritical&end_time=1628550198 HTTP/2.0 60 4.319 0.0720 0.001 0.463 GET /api/isu/ed50521b-b60e-4761-9542-90c4166547c5/icon HTTP/2.0 111 2.143 0.0193 0.000 0.456 POST /api/signout HTTP/2.0 1 0.455 0.4550 0.455 0.455 GET /api/isu/0b38f4be-b45a-4352-af93-73730abed55c/graph?datetime=1629817200 HTTP/2.0 1 0.452 0.4520 0.452 0.452 GET /api/condition/54a91534-85f9-43b2-b058-8c483eb134ef?condition_level=info%2Cwarning%2Ccritical&end_time=1628532000&start_time=1628528400 HTTP/2.0 TOP 10 Slow Requests 1 1.028 GET /api/trend HTTP/2.0 2 1.017 GET /api/trend HTTP/2.0 3 1.017 GET /api/trend HTTP/2.0 4 1.011 GET /api/trend HTTP/2.0 5 1.010 GET /api/trend HTTP/2.0 6 1.010 GET /api/trend HTTP/2.0 7 1.010 GET /api/trend HTTP/2.0 8 1.009 GET /api/trend HTTP/2.0 9 1.009 GET /api/trend HTTP/2.0 10 1.008 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 132.77 QPS, 0.69x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 83737557 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:43:02 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 8099 # Exec time 31 42s 4us 49ms 5ms 14ms 5ms 4ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 87.00k 11 11 11 11 0 11 # Query size 0 47.46k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ### # 100us ## # 1ms ################################################################ # 10ms ########## # 100ms # 1s # 10s+ COMMIT\G # Query 2: 1.60k QPS, 0.40x concurrency, ID 0xDA556F9115773A1A99AA0165670CE848 at byte 108711445 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:42:57 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 31 105314 # Exec time 19 26s 13us 32ms 249us 1ms 817us 38us # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 3 21.84M 52 681 217.47 621.67 167.02 158.58 # Query size 10 3.01M 30 30 30 30 0 30 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ####### # 1ms ##### # 10ms # # 100ms # 1s # 10s+ administrator command: Prepare\G # Query 3: 1.14k QPS, 0.35x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 50748666 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:43:02 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 20 69341 # Exec time 16 21s 19us 36ms 308us 2ms 1ms 49us # Lock time 78 3s 4us 16ms 37us 23us 293us 12us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 98 67.72k 1 1 1 1 0 1 # Bytes sent 0 884.63k 13 14 13.06 13.83 0.31 12.54 # Query size 57 16.96M 225 302 256.41 271.23 13.96 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ###### # 1ms ##### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('52291fdd-b0b1-4dc9-86da-d2b646d9a2d3', '2021-08-18 10:43:15', 1, 'is_dirty=true,is_overweight=true,is_broken=false', '降りて掃除してほしいです...')\G # Query 4: 36.11 QPS, 0.34x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 88594935 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:43:02 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 2203 # Exec time 15 21s 101us 139ms 9ms 31ms 11ms 6ms # Lock time 2 86ms 7us 9ms 39us 23us 276us 12us # Rows sent 68 1.02M 0 1.46k 484.79 1.04k 321.71 420.77 # Rows examine 69 1.02M 0 1.46k 484.79 1.04k 321.71 420.77 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 27 157.56M 589 221.62k 73.24k 158.07k 48.37k 65.68k # Query size 1 337.76k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################# # 1ms ################################################################ # 10ms ######################################### # 100ms # # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '5fe1fa45-a693-41c4-abcb-db6f45ea73b7' AND `timestamp` < '2021-08-24 17:29:22' ORDER BY `timestamp` DESC\G # Query 5: 118.34 QPS, 0.17x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 89473326 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:43:02 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 7219 # Exec time 7 10s 9us 32ms 1ms 7ms 3ms 131us # Lock time 10 349ms 0 14ms 48us 28us 347us 11us # Rows sent 0 6.98k 0 1 0.99 0.99 0.10 0.99 # Rows examine 0 6.90k 0 1 0.98 0.99 0.14 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 5.09M 589 789 739.09 755.64 20.31 719.66 # Query size 2 867.13k 123 123 123 123 0 123 # Boolean: # QC hit 1% yes, 98% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################# # 100us ################################################################ # 1ms ############################### # 10ms ## # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '08985a64-c425-48d2-ac33-25ac61d5a931' ORDER BY timestamp DESC LIMIT 1\G # Query 6: 10.31 QPS, 0.09x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 60395274 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:43:02 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 629 # Exec time 3 5s 17us 79ms 8ms 31ms 11ms 4ms # Lock time 0 18ms 0 3ms 28us 23us 164us 11us # Rows sent 28 428.98k 6 1.46k 698.37 1.20k 348.98 685.39 # Rows examine 28 428.62k 0 1.46k 697.79 1.20k 350.01 685.39 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 11 65.21M 1.50k 222.98k 106.16k 182.98k 53.17k 97.04k # Query size 0 71.25k 116 116 116 116 0 116 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ######## # 1ms ################################################################ # 10ms ####################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '12852e00-4506-474e-8ca9-18309670431f' ORDER BY `timestamp` ASC\G # Query 7: 39.34 QPS, 0.02x concurrency, ID 0x8C2BC651CBBBF3DB41D1CAD61AA0BD68 at byte 45968026 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:43:02 to 22:44:03 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 2400 # Exec time 0 1s 12us 26ms 520us 2ms 2ms 49us # Lock time 0 7ms 0 3ms 3us 10us 62us 0 # Rows sent 0 7.05k 1 8 3.01 4.96 1.56 2.90 # Rows examine 0 9.41k 0 79 4.02 36.69 13.39 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 31 179.23M 5.44k 175.50k 76.47k 165.97k 54.79k 44.45k # Query size 0 127.41k 51 57 54.36 56.92 2.95 51.63 # Boolean: # QC hit 91% yes, 8% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ############### # 1ms ######### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `character` = 'いじっぱり'\G ```

23aeaab9a9cc815a5bf1dae56f575fe910dba18b

karamaru-alpha commented 2 years ago

interpolateParams=true 25092

5

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1601 59.614 0.0372 0.000 0.145 GET /api/isu HTTP/2.0 1490 13.078 0.0088 0.000 0.106 POST /api/condition/e22103eb-449d-4b31-bd87-98e887fb1128 HTTP/2.0 1490 11.009 0.0074 0.000 0.105 POST /api/condition/bbb52af3-dc07-458f-b769-292f6f6e4776 HTTP/2.0 1490 11.966 0.0080 0.000 0.103 POST /api/condition/56570e8e-f071-4bf1-b9ac-42ee9b2b86e0 HTTP/2.0 1489 12.082 0.0081 0.000 0.101 POST /api/condition/4ea71285-3239-4bd9-85f5-6e7d177b7821 HTTP/2.0 1488 12.477 0.0084 0.000 0.104 POST /api/condition/3fdc26ac-2585-4e2f-8674-2b31256b9b7a HTTP/2.0 1487 12.862 0.0086 0.000 0.101 POST /api/condition/33416562-b6a7-43d6-a380-a897a477ecc3 HTTP/2.0 1486 11.695 0.0079 0.000 0.100 POST /api/condition/40378363-620f-450e-b89a-d508cb7e0c1e HTTP/2.0 1484 11.887 0.0080 0.000 0.105 POST /api/condition/c2fab88b-594c-4832-8192-b74cfb1f93bb HTTP/2.0 1484 11.950 0.0081 0.000 0.100 POST /api/condition/786ebbcb-47d8-4f36-b80a-3d24a6e2cef7 HTTP/2.0 1484 12.506 0.0084 0.000 0.100 POST /api/condition/3752f176-422a-4018-97ce-3d9c93d7047f HTTP/2.0 1483 10.514 0.0071 0.000 0.103 POST /api/condition/036ffda5-3b6f-4ff6-aa0d-18701d34d699 HTTP/2.0 1482 12.716 0.0086 0.000 0.103 POST /api/condition/ccc3627a-9e31-40be-8085-19e9655eab52 HTTP/2.0 1482 12.578 0.0085 0.000 0.103 POST /api/condition/40c13a1d-80f5-401c-b006-0159545c7826 HTTP/2.0 1481 12.762 0.0086 0.000 0.109 POST /api/condition/7e9daa0c-9562-417b-93dc-3a23d7c7350a HTTP/2.0 1480 12.083 0.0082 0.000 0.108 POST /api/condition/35214179-86af-4169-8915-6ecb9cfa03cb HTTP/2.0 1480 13.190 0.0089 0.000 0.103 POST /api/condition/80c34db6-2afa-40c9-b4a6-dfabc662f35d HTTP/2.0 1480 12.622 0.0085 0.000 0.112 POST /api/condition/9b0bc409-2b01-4f50-9097-fa287a8c890f HTTP/2.0 1480 10.837 0.0073 0.000 0.103 POST /api/condition/a7100717-9a31-470a-b3fa-ce6c860ac1b4 HTTP/2.0 1479 12.861 0.0087 0.000 0.104 POST /api/condition/6a7981fd-c11a-4a81-811c-9271bfb697da HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 404 280.695 0.6948 0.014 1.039 GET /api/trend HTTP/2.0 1601 59.614 0.0372 0.000 0.145 GET /api/isu HTTP/2.0 1472 14.417 0.0098 0.000 0.100 POST /api/condition/8904f8a8-0a6b-411c-96be-39b742b5eac2 HTTP/2.0 1476 13.590 0.0092 0.000 0.117 POST /api/condition/ea2e6ba0-1154-4ef4-9f53-d2a504eabfba HTTP/2.0 1480 13.190 0.0089 0.000 0.103 POST /api/condition/80c34db6-2afa-40c9-b4a6-dfabc662f35d HTTP/2.0 1474 13.106 0.0089 0.000 0.103 POST /api/condition/99fd396a-4657-4548-9f79-c5860183167b HTTP/2.0 1475 13.078 0.0089 0.000 0.101 POST /api/condition/d1c737c0-7c1f-4bd8-ada5-00d7c7333473 HTTP/2.0 1490 13.078 0.0088 0.000 0.106 POST /api/condition/e22103eb-449d-4b31-bd87-98e887fb1128 HTTP/2.0 1467 13.043 0.0089 0.000 0.100 POST /api/condition/3adce3ad-9d0c-4a4b-bf32-afa8c79ec1e0 HTTP/2.0 1476 12.997 0.0088 0.000 0.100 POST /api/condition/24b9bbd2-ee67-4bd9-8a2a-1dc5d6de2db6 HTTP/2.0 1475 12.895 0.0087 0.000 0.101 POST /api/condition/71e23587-6fb0-4335-88eb-96022b0a1e8a HTTP/2.0 1487 12.862 0.0086 0.000 0.101 POST /api/condition/33416562-b6a7-43d6-a380-a897a477ecc3 HTTP/2.0 1479 12.861 0.0087 0.000 0.104 POST /api/condition/6a7981fd-c11a-4a81-811c-9271bfb697da HTTP/2.0 1476 12.838 0.0087 0.000 0.103 POST /api/condition/8528fa6e-dc45-4e56-9574-b572d235720d HTTP/2.0 1481 12.762 0.0086 0.000 0.109 POST /api/condition/7e9daa0c-9562-417b-93dc-3a23d7c7350a HTTP/2.0 1482 12.716 0.0086 0.000 0.103 POST /api/condition/ccc3627a-9e31-40be-8085-19e9655eab52 HTTP/2.0 1474 12.645 0.0086 0.000 0.103 POST /api/condition/ee8171ae-b7e2-4091-bc04-eb255d1f125d HTTP/2.0 1472 12.641 0.0086 0.000 0.095 POST /api/condition/3d67a459-9622-45bf-af86-acf764c9d66d HTTP/2.0 1478 12.640 0.0086 0.000 0.104 POST /api/condition/ab839b5b-f1e8-4cc2-b956-eaa6a1b26866 HTTP/2.0 1480 12.622 0.0085 0.000 0.112 POST /api/condition/9b0bc409-2b01-4f50-9097-fa287a8c890f HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 404 280.695 0.6948 0.014 1.039 GET /api/trend HTTP/2.0 1 0.225 0.2250 0.225 0.225 POST /initialize HTTP/2.0 1 0.201 0.2010 0.201 0.201 GET /api/condition/f15874ac-1454-4c56-bb4e-f766df1bf697?condition_level=info%2Cwarning%2Ccritical&end_time=1628352000&start_time=1628348400 HTTP/2.0 1 0.198 0.1980 0.198 0.198 GET /api/condition/f125d3d6-ec7b-4f51-abf4-3323732743c0?condition_level=info%2Cwarning%2Ccritical&end_time=1629928260 HTTP/2.0 1 0.157 0.1570 0.157 0.157 GET /api/condition/6a7981fd-c11a-4a81-811c-9271bfb697da?condition_level=info%2Cwarning%2Ccritical&end_time=1630059953 HTTP/2.0 1 0.145 0.1450 0.145 0.145 GET /api/condition/71e23587-6fb0-4335-88eb-96022b0a1e8a?condition_level=info%2Cwarning%2Ccritical&end_time=1629336392 HTTP/2.0 1 0.130 0.1300 0.130 0.130 GET /api/condition/bea4b953-e4a8-4049-8b4c-ab8d9f803f5c?condition_level=warning%2Ccritical&end_time=1630280348 HTTP/2.0 1 0.126 0.1260 0.126 0.126 GET /api/condition/23fdb905-0a2a-49cf-8fd9-5863bdb9f5ff?condition_level=info%2Cwarning%2Ccritical&end_time=1630070764 HTTP/2.0 1 0.123 0.1230 0.123 0.123 GET /api/condition/8528fa6e-dc45-4e56-9574-b572d235720d?condition_level=info%2Cwarning%2Ccritical&end_time=1630114455 HTTP/2.0 1 0.122 0.1220 0.122 0.122 GET /api/condition/35214179-86af-4169-8915-6ecb9cfa03cb?condition_level=info%2Cwarning%2Ccritical&end_time=1630099154 HTTP/2.0 1 0.122 0.1220 0.122 0.122 GET /api/isu/6a7981fd-c11a-4a81-811c-9271bfb697da/graph?datetime=1629990000 HTTP/2.0 1 0.122 0.1220 0.122 0.122 GET /api/condition/8904f8a8-0a6b-411c-96be-39b742b5eac2?condition_level=info%2Cwarning%2Ccritical&end_time=1629959548 HTTP/2.0 1 0.120 0.1200 0.120 0.120 GET /api/condition/4159d033-d1eb-448d-9f78-03d340f56b8b?condition_level=info%2Cwarning%2Ccritical&end_time=1629307032 HTTP/2.0 1 0.118 0.1180 0.118 0.118 GET /api/condition/99fd396a-4657-4548-9f79-c5860183167b?condition_level=info%2Cwarning%2Ccritical&end_time=1630007843 HTTP/2.0 1 0.118 0.1180 0.118 0.118 GET /api/condition/f15874ac-1454-4c56-bb4e-f766df1bf697?condition_level=info%2Cwarning%2Ccritical&end_time=1630123691 HTTP/2.0 1 0.118 0.1180 0.118 0.118 GET /api/condition/ea2e6ba0-1154-4ef4-9f53-d2a504eabfba?condition_level=info%2Cwarning%2Ccritical&end_time=1630162515 HTTP/2.0 1 0.116 0.1160 0.116 0.116 GET /api/condition/f125d3d6-ec7b-4f51-abf4-3323732743c0?condition_level=info%2Cwarning%2Ccritical&end_time=1629740523 HTTP/2.0 1 0.115 0.1150 0.115 0.115 GET /api/condition/45a294ba-3766-4a5e-bc41-73fe39070dd1?condition_level=info%2Cwarning%2Ccritical&end_time=1629834689 HTTP/2.0 1 0.115 0.1150 0.115 0.115 GET /api/condition/ab839b5b-f1e8-4cc2-b956-eaa6a1b26866?condition_level=info%2Cwarning%2Ccritical&end_time=1629461295 HTTP/2.0 1 0.112 0.1120 0.112 0.112 GET /api/condition/ab839b5b-f1e8-4cc2-b956-eaa6a1b26866?condition_level=info%2Cwarning%2Ccritical&end_time=1629726196 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 404 280.695 0.6948 0.014 1.039 GET /api/trend HTTP/2.0 1 0.225 0.2250 0.225 0.225 POST /initialize HTTP/2.0 1 0.201 0.2010 0.201 0.201 GET /api/condition/f15874ac-1454-4c56-bb4e-f766df1bf697?condition_level=info%2Cwarning%2Ccritical&end_time=1628352000&start_time=1628348400 HTTP/2.0 1 0.198 0.1980 0.198 0.198 GET /api/condition/f125d3d6-ec7b-4f51-abf4-3323732743c0?condition_level=info%2Cwarning%2Ccritical&end_time=1629928260 HTTP/2.0 1 0.157 0.1570 0.157 0.157 GET /api/condition/6a7981fd-c11a-4a81-811c-9271bfb697da?condition_level=info%2Cwarning%2Ccritical&end_time=1630059953 HTTP/2.0 1 0.145 0.1450 0.145 0.145 GET /api/condition/71e23587-6fb0-4335-88eb-96022b0a1e8a?condition_level=info%2Cwarning%2Ccritical&end_time=1629336392 HTTP/2.0 1601 59.614 0.0372 0.000 0.145 GET /api/isu HTTP/2.0 55 3.780 0.0687 0.000 0.137 POST /api/isu HTTP/2.0 1 0.130 0.1300 0.130 0.130 GET /api/condition/bea4b953-e4a8-4049-8b4c-ab8d9f803f5c?condition_level=warning%2Ccritical&end_time=1630280348 HTTP/2.0 1 0.126 0.1260 0.126 0.126 GET /api/condition/23fdb905-0a2a-49cf-8fd9-5863bdb9f5ff?condition_level=info%2Cwarning%2Ccritical&end_time=1630070764 HTTP/2.0 1 0.123 0.1230 0.123 0.123 GET /api/condition/8528fa6e-dc45-4e56-9574-b572d235720d?condition_level=info%2Cwarning%2Ccritical&end_time=1630114455 HTTP/2.0 1 0.122 0.1220 0.122 0.122 GET /api/condition/35214179-86af-4169-8915-6ecb9cfa03cb?condition_level=info%2Cwarning%2Ccritical&end_time=1630099154 HTTP/2.0 1 0.122 0.1220 0.122 0.122 GET /api/isu/6a7981fd-c11a-4a81-811c-9271bfb697da/graph?datetime=1629990000 HTTP/2.0 1 0.122 0.1220 0.122 0.122 GET /api/condition/8904f8a8-0a6b-411c-96be-39b742b5eac2?condition_level=info%2Cwarning%2Ccritical&end_time=1629959548 HTTP/2.0 1 0.120 0.1200 0.120 0.120 GET /api/condition/4159d033-d1eb-448d-9f78-03d340f56b8b?condition_level=info%2Cwarning%2Ccritical&end_time=1629307032 HTTP/2.0 229 5.103 0.0223 0.001 0.120 GET /api/isu/4159d033-d1eb-448d-9f78-03d340f56b8b/icon HTTP/2.0 1 0.118 0.1180 0.118 0.118 GET /api/condition/f15874ac-1454-4c56-bb4e-f766df1bf697?condition_level=info%2Cwarning%2Ccritical&end_time=1630123691 HTTP/2.0 1 0.118 0.1180 0.118 0.118 GET /api/condition/ea2e6ba0-1154-4ef4-9f53-d2a504eabfba?condition_level=info%2Cwarning%2Ccritical&end_time=1630162515 HTTP/2.0 1 0.118 0.1180 0.118 0.118 GET /api/condition/99fd396a-4657-4548-9f79-c5860183167b?condition_level=info%2Cwarning%2Ccritical&end_time=1630007843 HTTP/2.0 1476 13.590 0.0092 0.000 0.117 POST /api/condition/ea2e6ba0-1154-4ef4-9f53-d2a504eabfba HTTP/2.0 TOP 10 Slow Requests 1 1.039 GET /api/trend HTTP/2.0 2 1.019 GET /api/trend HTTP/2.0 3 1.010 GET /api/trend HTTP/2.0 4 1.008 GET /api/trend HTTP/2.0 5 1.008 GET /api/trend HTTP/2.0 6 1.008 GET /api/trend HTTP/2.0 7 1.007 GET /api/trend HTTP/2.0 8 1.007 GET /api/trend HTTP/2.0 9 1.006 GET /api/trend HTTP/2.0 10 1.005 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 166 QPS, 0.60x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 69676636 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:57:42 to 22:58:43 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 4 10126 # Exec time 33 37s 3us 38ms 4ms 11ms 4ms 3ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 108.78k 11 11 11 11 0 11 # Query size 0 59.33k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ######### # 10us ######### # 100us ### # 1ms ################################################################ # 10ms ###### # 100ms # 1s # 10s+ COMMIT\G # Query 2: 65.13 QPS, 0.44x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 65895667 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:57:42 to 22:58:43 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 3973 # Exec time 24 27s 93us 84ms 7ms 22ms 7ms 4ms # Lock time 4 290ms 14us 15ms 73us 73us 455us 26us # Rows sent 75 2.45M 0 1.68k 647.87 1.26k 391.30 621.67 # Rows examine 77 2.45M 0 1.68k 647.87 1.26k 391.30 621.67 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 22 424.71M 589 303.27k 109.47k 211.82k 66.06k 101.89k # Query size 1 609.14k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ############## # 1ms ################################################################ # 10ms ######################## # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'dbd217c9-c4fe-4658-a7fc-06e56db6a2b4' AND `timestamp` < '2021-08-23 16:53:26' ORDER BY `timestamp` DESC\G # Query 3: 515.75 QPS, 0.28x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 61467351 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:57:42 to 22:58:43 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 15 31461 # Exec time 15 17s 6us 33ms 550us 3ms 2ms 119us # Lock time 27 2s 0 17ms 60us 57us 352us 25us # Rows sent 0 30.53k 0 1 0.99 0.99 0.08 0.99 # Rows examine 0 29.86k 0 1 0.97 0.99 0.16 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 22.81M 589 812 760.28 755.64 21.90 755.64 # Query size 11 3.69M 123 123 123 123 0 123 # Boolean: # QC hit 2% yes, 97% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ######## # 100us ################################################################ # 1ms ######## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'cab99f63-bb3a-4648-b6df-376396f2c7ab' ORDER BY timestamp DESC LIMIT 1\G # Query 4: 1.24k QPS, 0.26x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 40969216 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:57:43 to 22:58:43 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 36 74626 # Exec time 14 16s 23us 41ms 210us 467us 961us 60us # Lock time 54 4s 9us 26ms 50us 42us 368us 23us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 98 72.88k 1 1 1 1 0 1 # Bytes sent 0 956.88k 13 14 13.13 13.83 0.43 12.54 # Query size 58 17.96M 225 302 252.35 271.23 11.20 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ###### # 1ms ## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('4c5b0201-db5d-41fb-a521-fb417e81fccf', '2021-08-18 11:35:00', 0, 'is_dirty=false,is_overweight=false,is_broken=false', 'よいです。')\G # Query 5: 16.89 QPS, 0.10x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 73647079 # Scores: V/M = 0.01 # Time range: 2022-06-26 22:57:42 to 22:58:43 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 1030 # Exec time 5 6s 9us 53ms 6ms 19ms 7ms 3ms # Lock time 0 66ms 0 9ms 64us 47us 414us 23us # Rows sent 20 685.69k 6 1.70k 681.70 1.33k 428.41 652.75 # Rows examine 21 683.66k 0 1.70k 679.67 1.33k 430.05 652.75 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 6 115.97M 1.60k 305.21k 115.29k 233.54k 72.83k 112.33k # Query size 0 116.68k 116 116 116 116 0 116 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us # # 100us ################# # 1ms ################################################################ # 10ms ##################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '31356b5b-7713-4b56-af31-90255f3f746e' ORDER BY `timestamp` ASC\G # Query 6: 161.98 QPS, 0.05x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 3343707 # Scores: V/M = 0.00 # Time range: 2022-06-26 22:57:42 to 22:58:42 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 4 9719 # Exec time 2 3s 22us 19ms 304us 881us 986us 113us # Lock time 9 655ms 0 18ms 67us 49us 475us 23us # Rows sent 0 9.39k 0 1 0.99 0.99 0.10 0.99 # Rows examine 0 9.39k 0 1 0.99 0.99 0.10 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 7.04M 589 812 759.91 755.64 24.67 755.64 # Query size 3 1.16M 125 125 125 125 0 125 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ############ # 100us ################################################################ # 1ms ### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'c0c786cf-494d-449b-b4ea-a8b563f95058' ORDER BY `timestamp` DESC LIMIT 1\G ```

e5faa999f44398df0a7954bb2deba33c72a9827e

karamaru-alpha commented 2 years ago

tx剥がし 24458

6

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1531 91.753 0.0599 0.000 0.263 GET /api/isu HTTP/2.0 1495 12.823 0.0086 0.000 0.088 POST /api/condition/61729fff-c1cd-4d26-a80a-c0978725ac79 HTTP/2.0 1491 11.079 0.0074 0.000 0.104 POST /api/condition/07ee40f6-ff5a-4ba2-b1e1-2be23d2b061d HTTP/2.0 1487 12.462 0.0084 0.000 0.101 POST /api/condition/caad390f-ffc4-49dc-a9a5-bbe7171886e0 HTTP/2.0 1485 11.900 0.0080 0.000 0.103 POST /api/condition/cfc01bbe-f55a-47bd-ae02-dab21eee6efd HTTP/2.0 1485 11.293 0.0076 0.000 0.106 POST /api/condition/51c30a80-6611-4aad-b62e-852a8e27fa93 HTTP/2.0 1484 12.402 0.0084 0.000 0.108 POST /api/condition/116013f1-8df9-4b39-9cdc-7cbf5393e90e HTTP/2.0 1483 11.915 0.0080 0.000 0.107 POST /api/condition/f16debbd-301a-4c58-b864-f24e50066cc2 HTTP/2.0 1483 11.851 0.0080 0.000 0.107 POST /api/condition/07c7cf15-9117-4e9d-88a6-e67612fdb0f5 HTTP/2.0 1482 11.774 0.0079 0.000 0.104 POST /api/condition/486f41e9-9629-4129-9286-b0b3458c7369 HTTP/2.0 1482 11.610 0.0078 0.000 0.101 POST /api/condition/cbc5e4a8-fa81-4838-b9e1-1219af18fd16 HTTP/2.0 1482 11.818 0.0080 0.000 0.100 POST /api/condition/f794a9ed-d762-4b98-94e9-3e540d581b47 HTTP/2.0 1481 11.859 0.0080 0.000 0.106 POST /api/condition/73eb9e08-6ab9-474b-8770-7db3ffd0b509 HTTP/2.0 1480 12.810 0.0087 0.000 0.103 POST /api/condition/9ff382ff-69b6-41b2-84a9-01b0e573e274 HTTP/2.0 1480 11.326 0.0077 0.000 0.101 POST /api/condition/b1051b4c-334c-4e9c-b96e-0f96f96540a7 HTTP/2.0 1480 11.122 0.0075 0.000 0.088 POST /api/condition/70623d66-9f02-4dca-a6bd-cd49ad301f86 HTTP/2.0 1480 12.251 0.0083 0.000 0.102 POST /api/condition/22dffb2e-78d8-46d8-8785-53dd10b1a206 HTTP/2.0 1480 12.560 0.0085 0.000 0.103 POST /api/condition/4840019b-b914-4e3c-9fa2-429e666a0da8 HTTP/2.0 1479 12.342 0.0083 0.000 0.104 POST /api/condition/fd53cee1-c37d-4762-9d4d-b421443cb46a HTTP/2.0 1478 12.527 0.0085 0.000 0.100 POST /api/condition/330349b3-9e48-4db9-aa49-44c1e0b8830a HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 438 310.402 0.7087 0.014 1.013 GET /api/trend HTTP/2.0 1531 91.753 0.0599 0.000 0.263 GET /api/isu HTTP/2.0 1475 13.717 0.0093 0.000 0.100 POST /api/condition/3cd09df1-5665-4368-9a2d-d74a26c92e21 HTTP/2.0 1473 13.282 0.0090 0.000 0.105 POST /api/condition/dd65c8b6-679a-454a-9c5d-4bffd34271e4 HTTP/2.0 1475 13.168 0.0089 0.000 0.101 POST /api/condition/a2cd1c9e-d197-44e0-b117-0c2bec862428 HTTP/2.0 1471 13.089 0.0089 0.000 0.100 POST /api/condition/86d6ab78-117a-46f0-9b07-f0a904d1e3b6 HTTP/2.0 1476 13.031 0.0088 0.000 0.105 POST /api/condition/76dcd66f-cfb0-4f0d-a37f-942b8fed21b5 HTTP/2.0 1473 13.027 0.0088 0.000 0.107 POST /api/condition/6eecf186-a1e5-4034-a93f-be5813df6edc HTTP/2.0 1459 12.881 0.0088 0.000 0.103 POST /api/condition/facd3245-bac0-45c6-8a3e-fb8c3504f3af HTTP/2.0 1469 12.876 0.0088 0.000 0.102 POST /api/condition/a1e0e628-162d-4d3f-b7f6-960b35fa1412 HTTP/2.0 1495 12.823 0.0086 0.000 0.088 POST /api/condition/61729fff-c1cd-4d26-a80a-c0978725ac79 HTTP/2.0 1480 12.810 0.0087 0.000 0.103 POST /api/condition/9ff382ff-69b6-41b2-84a9-01b0e573e274 HTTP/2.0 1467 12.764 0.0087 0.000 0.103 POST /api/condition/0943c993-c4fa-47e9-b2e7-729061d43944 HTTP/2.0 1478 12.672 0.0086 0.000 0.108 POST /api/condition/e9a736ef-aa12-4d5b-be7f-67f076be4ffc HTTP/2.0 1475 12.622 0.0086 0.000 0.102 POST /api/condition/a02e344b-bc0c-48c7-9899-f17f4c96ef75 HTTP/2.0 1475 12.609 0.0085 0.000 0.112 POST /api/condition/27b362d4-9f7e-47e4-a7a9-1ca530c84a85 HTTP/2.0 1465 12.564 0.0086 0.000 0.103 POST /api/condition/69b08bd7-9337-4f91-a619-94c5c985cba9 HTTP/2.0 1480 12.560 0.0085 0.000 0.103 POST /api/condition/4840019b-b914-4e3c-9fa2-429e666a0da8 HTTP/2.0 1464 12.548 0.0086 0.000 0.107 POST /api/condition/cb501e69-450d-421d-9b05-162708c813d3 HTTP/2.0 1478 12.527 0.0085 0.000 0.100 POST /api/condition/330349b3-9e48-4db9-aa49-44c1e0b8830a HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 438 310.402 0.7087 0.014 1.013 GET /api/trend HTTP/2.0 1 0.194 0.1940 0.194 0.194 POST /initialize HTTP/2.0 1 0.188 0.1880 0.188 0.188 GET /api/condition/330349b3-9e48-4db9-aa49-44c1e0b8830a?condition_level=info%2Cwarning%2Ccritical&end_time=1629708611 HTTP/2.0 1 0.178 0.1780 0.178 0.178 GET /api/condition/70623d66-9f02-4dca-a6bd-cd49ad301f86?condition_level=info%2Cwarning%2Ccritical&end_time=1630212962 HTTP/2.0 1 0.166 0.1660 0.166 0.166 GET /api/condition/22e5874b-579b-461f-90bc-b6f2c21ea1af?condition_level=info%2Cwarning%2Ccritical&end_time=1629710425 HTTP/2.0 1 0.158 0.1580 0.158 0.158 GET /api/condition/192aa34c-8f1a-4068-9001-54b605ed639f?condition_level=info%2Cwarning%2Ccritical&end_time=1629320400&start_time=1629316800 HTTP/2.0 1 0.156 0.1560 0.156 0.156 GET /api/condition/9ff382ff-69b6-41b2-84a9-01b0e573e274?condition_level=info%2Cwarning%2Ccritical&end_time=1629436101 HTTP/2.0 1 0.155 0.1550 0.155 0.155 GET /api/condition/e0b36112-4573-4a37-9312-11003e830a23?condition_level=info%2Cwarning%2Ccritical&end_time=1630015200&start_time=1630011600 HTTP/2.0 1 0.148 0.1480 0.148 0.148 GET /api/isu/51c30a80-6611-4aad-b62e-852a8e27fa93/graph?datetime=1630076400 HTTP/2.0 1 0.148 0.1480 0.148 0.148 GET /api/condition/a2cd1c9e-d197-44e0-b117-0c2bec862428?condition_level=info%2Cwarning%2Ccritical&end_time=1629840176 HTTP/2.0 1 0.147 0.1470 0.147 0.147 GET /api/condition/486f41e9-9629-4129-9286-b0b3458c7369?condition_level=info%2Cwarning%2Ccritical&end_time=1629821079 HTTP/2.0 1 0.139 0.1390 0.139 0.139 GET /api/condition/a02e344b-bc0c-48c7-9899-f17f4c96ef75?condition_level=info%2Cwarning%2Ccritical&end_time=1629876407 HTTP/2.0 1 0.137 0.1370 0.137 0.137 GET /api/condition/22e5874b-579b-461f-90bc-b6f2c21ea1af?condition_level=info%2Cwarning%2Ccritical&end_time=1629813858 HTTP/2.0 1 0.137 0.1370 0.137 0.137 GET /api/condition/cfc01bbe-f55a-47bd-ae02-dab21eee6efd?condition_level=info%2Cwarning%2Ccritical&end_time=1629923351 HTTP/2.0 1 0.137 0.1370 0.137 0.137 GET /api/condition/abf2f325-893b-447a-a1b2-25f337606912?condition_level=info%2Cwarning%2Ccritical&end_time=1629683622 HTTP/2.0 1 0.136 0.1360 0.136 0.136 GET /api/isu/e0b36112-4573-4a37-9312-11003e830a23/graph?datetime=1629903600 HTTP/2.0 1 0.135 0.1350 0.135 0.135 GET /api/condition/f794a9ed-d762-4b98-94e9-3e540d581b47?condition_level=info%2Cwarning%2Ccritical&end_time=1630106426 HTTP/2.0 1 0.134 0.1340 0.134 0.134 GET /api/condition/1ba6ec72-de4c-45bb-a7b8-1f023ec909f4?condition_level=info%2Cwarning%2Ccritical&end_time=1629494527 HTTP/2.0 1 0.134 0.1340 0.134 0.134 GET /api/condition/07c7cf15-9117-4e9d-88a6-e67612fdb0f5?condition_level=info%2Cwarning%2Ccritical&end_time=1629959389 HTTP/2.0 1 0.133 0.1330 0.133 0.133 GET /api/isu/facd3245-bac0-45c6-8a3e-fb8c3504f3af/graph?datetime=1629644400 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 438 310.402 0.7087 0.014 1.013 GET /api/trend HTTP/2.0 1531 91.753 0.0599 0.000 0.263 GET /api/isu HTTP/2.0 19 0.489 0.0257 0.004 0.196 GET /api/isu/22e5874b-579b-461f-90bc-b6f2c21ea1af HTTP/2.0 1 0.194 0.1940 0.194 0.194 POST /initialize HTTP/2.0 1 0.188 0.1880 0.188 0.188 GET /api/condition/330349b3-9e48-4db9-aa49-44c1e0b8830a?condition_level=info%2Cwarning%2Ccritical&end_time=1629708611 HTTP/2.0 205 4.464 0.0218 0.001 0.183 GET /api/isu/70623d66-9f02-4dca-a6bd-cd49ad301f86/icon HTTP/2.0 1 0.178 0.1780 0.178 0.178 GET /api/condition/70623d66-9f02-4dca-a6bd-cd49ad301f86?condition_level=info%2Cwarning%2Ccritical&end_time=1630212962 HTTP/2.0 1 0.166 0.1660 0.166 0.166 GET /api/condition/22e5874b-579b-461f-90bc-b6f2c21ea1af?condition_level=info%2Cwarning%2Ccritical&end_time=1629710425 HTTP/2.0 3 0.212 0.0707 0.002 0.162 GET /api/isu/e9a736ef-aa12-4d5b-be7f-67f076be4ffc/graph?datetime=1629990000 HTTP/2.0 301 5.808 0.0193 0.000 0.160 GET /api/isu/330349b3-9e48-4db9-aa49-44c1e0b8830a/icon HTTP/2.0 1 0.158 0.1580 0.158 0.158 GET /api/condition/192aa34c-8f1a-4068-9001-54b605ed639f?condition_level=info%2Cwarning%2Ccritical&end_time=1629320400&start_time=1629316800 HTTP/2.0 1 0.156 0.1560 0.156 0.156 GET /api/condition/9ff382ff-69b6-41b2-84a9-01b0e573e274?condition_level=info%2Cwarning%2Ccritical&end_time=1629436101 HTTP/2.0 1 0.155 0.1550 0.155 0.155 GET /api/condition/e0b36112-4573-4a37-9312-11003e830a23?condition_level=info%2Cwarning%2Ccritical&end_time=1630015200&start_time=1630011600 HTTP/2.0 1 0.148 0.1480 0.148 0.148 GET /api/isu/51c30a80-6611-4aad-b62e-852a8e27fa93/graph?datetime=1630076400 HTTP/2.0 1 0.148 0.1480 0.148 0.148 GET /api/condition/a2cd1c9e-d197-44e0-b117-0c2bec862428?condition_level=info%2Cwarning%2Ccritical&end_time=1629840176 HTTP/2.0 1 0.147 0.1470 0.147 0.147 GET /api/condition/486f41e9-9629-4129-9286-b0b3458c7369?condition_level=info%2Cwarning%2Ccritical&end_time=1629821079 HTTP/2.0 200 4.322 0.0216 0.001 0.144 GET /api/isu/abf2f325-893b-447a-a1b2-25f337606912/icon HTTP/2.0 58 4.278 0.0738 0.000 0.143 POST /api/isu HTTP/2.0 163 3.389 0.0208 0.001 0.143 GET /api/isu/192aa34c-8f1a-4068-9001-54b605ed639f/icon HTTP/2.0 1 0.139 0.1390 0.139 0.139 GET /api/condition/a02e344b-bc0c-48c7-9899-f17f4c96ef75?condition_level=info%2Cwarning%2Ccritical&end_time=1629876407 HTTP/2.0 TOP 10 Slow Requests 1 1.013 GET /api/trend HTTP/2.0 2 1.010 GET /api/trend HTTP/2.0 3 1.009 GET /api/trend HTTP/2.0 4 1.007 GET /api/trend HTTP/2.0 5 1.007 GET /api/trend HTTP/2.0 6 1.006 GET /api/trend HTTP/2.0 7 1.006 GET /api/trend HTTP/2.0 8 1.006 GET /api/trend HTTP/2.0 9 1.005 GET /api/trend HTTP/2.0 10 1.005 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 131.67 QPS, 0.64x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 35911506 # Scores: V/M = 0.00 # Time range: 2022-06-26 23:03:33 to 23:04:33 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 3 7900 # Exec time 31 38s 412us 38ms 5ms 12ms 4ms 3ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 84.86k 11 11 11 11 0 11 # Query size 0 46.29k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us # # 1ms ################################################################ # 10ms ####### # 100ms # 1s # 10s+ COMMIT\G # Query 2: 64.46 QPS, 0.46x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 80898451 # Scores: V/M = 0.01 # Time range: 2022-06-26 23:03:32 to 23:04:33 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 3932 # Exec time 22 28s 103us 61ms 7ms 23ms 8ms 4ms # Lock time 3 307ms 14us 17ms 78us 63us 544us 26us # Rows sent 74 2.26M 0 1.67k 603.62 1.20k 371.82 563.87 # Rows examine 76 2.26M 0 1.67k 603.62 1.20k 371.82 563.87 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 19 387.52M 589 282.94k 100.92k 201.74k 62.50k 92.42k # Query size 1 602.86k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################# # 1ms ################################################################ # 10ms ########################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '07c7cf15-9117-4e9d-88a6-e67612fdb0f5' AND `timestamp` < '2021-08-26 15:29:49' ORDER BY `timestamp` DESC\G # Query 3: 567.93 QPS, 0.33x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 80098857 # Scores: V/M = 0.00 # Time range: 2022-06-26 23:03:32 to 23:04:33 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 17 34644 # Exec time 16 20s 7us 36ms 587us 3ms 2ms 119us # Lock time 31 3s 0 32ms 72us 76us 485us 25us # Rows sent 1 33.56k 0 1 0.99 0.99 0.09 0.99 # Rows examine 1 32.85k 0 1 0.97 0.99 0.17 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 25.07M 589 801 758.90 755.64 23.06 755.64 # Query size 12 4.06M 123 123 123 123 0 123 # Boolean: # QC hit 2% yes, 97% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ########## # 100us ################################################################ # 1ms ######### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '7d195770-8d14-4c79-946e-d7a313d3cabd' ORDER BY timestamp DESC LIMIT 1\G # Query 4: 1.30k QPS, 0.29x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 76735345 # Scores: V/M = 0.00 # Time range: 2022-06-26 23:03:33 to 23:04:33 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 38 77942 # Exec time 14 17s 21us 49ms 219us 596us 936us 60us # Lock time 51 4s 9us 28ms 52us 44us 348us 23us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 98 76.12k 1 1 1 1 0 1 # Bytes sent 0 1002.22k 13 14 13.17 13.83 0.48 12.54 # Query size 58 18.66M 233 291 250.98 258.32 9.98 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ####### # 1ms ## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('65c89f64-7921-487e-b856-640739ff4507', '2021-08-28 19:05:21', 1, 'is_dirty=false,is_overweight=false,is_broken=false', 'いい!')\G # Query 5: 17 QPS, 0.11x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 70764356 # Scores: V/M = 0.01 # Time range: 2022-06-26 23:03:32 to 23:04:33 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 1037 # Exec time 5 7s 9us 80ms 7ms 21ms 8ms 3ms # Lock time 0 71ms 0 8ms 68us 63us 438us 23us # Rows sent 21 656.06k 6 1.60k 647.84 1.26k 419.51 563.87 # Rows examine 21 654.97k 0 1.60k 646.76 1.26k 420.83 563.87 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 5 109.74M 1.64k 273.67k 108.36k 222.42k 70.13k 97.04k # Query size 0 117.47k 116 116 116 116 0 116 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us # # 100us ################### # 1ms ################################################################ # 10ms ############################ # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'facd3245-bac0-45c6-8a3e-fb8c3504f3af' ORDER BY `timestamp` ASC\G # Query 6: 142.15 QPS, 0.08x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 66467695 # Scores: V/M = 0.00 # Time range: 2022-06-26 23:03:32 to 23:04:33 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 4 8671 # Exec time 4 5s 8us 27ms 597us 3ms 2ms 119us # Lock time 7 611ms 0 16ms 70us 73us 432us 23us # Rows sent 0 8.38k 0 1 0.99 0.99 0.10 0.99 # Rows examine 0 8.37k 0 1 0.99 0.99 0.10 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 6.27M 589 801 757.89 755.64 25.20 755.64 # Query size 3 1.03M 125 125 125 125 0 125 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ######## # 100us ################################################################ # 1ms ######### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'e0b36112-4573-4a37-9312-11003e830a23' ORDER BY `timestamp` DESC LIMIT 1\G ```

2e619a197718dab77237f98a6996e7715d3f2f04

karamaru-alpha commented 2 years ago

trendをsingleFlightで処理 25064

7

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1462 15.390 0.0105 0.000 0.107 POST /api/condition/53f2ef86-0b29-450b-b7da-472ba473c798 HTTP/2.0 1462 13.806 0.0094 0.000 0.110 POST /api/condition/3fbe5b04-1a34-4352-9911-9244a3fb3ac0 HTTP/2.0 1462 14.501 0.0099 0.000 0.109 POST /api/condition/8c3df03e-8b50-4e32-8862-50e87e005883 HTTP/2.0 1462 15.102 0.0103 0.000 0.103 POST /api/condition/230301b2-b383-41be-95fc-abbf24b51d6b HTTP/2.0 1461 14.954 0.0102 0.000 0.103 POST /api/condition/a8b44723-d14c-4dd4-917d-3f23d88c5c89 HTTP/2.0 1460 15.595 0.0107 0.000 0.104 POST /api/condition/811bb516-0e1e-4b85-93fa-d738981188f0 HTTP/2.0 1460 15.999 0.0110 0.000 0.107 POST /api/condition/81f225f3-fb78-45e3-a293-b9dbf947619a HTTP/2.0 1459 13.980 0.0096 0.000 0.107 POST /api/condition/376affc1-0469-4e73-9a14-7074368cd0a2 HTTP/2.0 1459 15.573 0.0107 0.000 0.107 POST /api/condition/d828a2f7-481c-4ad9-b460-7b6f3e30e1ca HTTP/2.0 1459 16.176 0.0111 0.000 0.115 POST /api/condition/7ca78c50-723a-42a6-bef6-e7bba4d66618 HTTP/2.0 1458 15.424 0.0106 0.000 0.104 POST /api/condition/3027f15c-bbcc-4a60-8018-d0381e71ec1b HTTP/2.0 1458 14.846 0.0102 0.000 0.112 POST /api/condition/68b031f2-df52-476f-a238-662f334ab847 HTTP/2.0 1458 14.968 0.0103 0.000 0.106 POST /api/condition/c8cf02c6-65f2-440e-ba27-870de3128601 HTTP/2.0 1458 15.417 0.0106 0.000 0.118 POST /api/condition/851d85ea-7c2c-45c9-aa3f-298b47d926af HTTP/2.0 1457 14.889 0.0102 0.000 0.105 POST /api/condition/c6dc6793-bc03-45d3-8155-68c46010cd98 HTTP/2.0 1455 17.314 0.0119 0.000 0.107 POST /api/condition/5ea5bde9-9d61-476e-9e39-672c810e12a6 HTTP/2.0 1454 15.717 0.0108 0.000 0.105 POST /api/condition/0c73241a-fbd9-4bcf-8ea8-f9c1b01c466a HTTP/2.0 1454 14.804 0.0102 0.000 0.107 POST /api/condition/e0a2541f-eda8-447c-96eb-3ff6053835ea HTTP/2.0 1454 14.204 0.0098 0.000 0.102 POST /api/condition/be75f4ac-7579-402e-9329-37531e8c3e9a HTTP/2.0 1453 14.708 0.0101 0.000 0.103 POST /api/condition/ae1a8aee-81f1-4543-a8bf-6d64f8f9b1b9 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 1295 472.906 0.3652 0.005 1.013 GET /api/trend HTTP/2.0 1329 124.150 0.0934 0.000 0.815 GET /api/isu HTTP/2.0 1455 17.314 0.0119 0.000 0.107 POST /api/condition/5ea5bde9-9d61-476e-9e39-672c810e12a6 HTTP/2.0 1297 17.020 0.0131 0.000 0.051 GET /assets/logo_orange.svg HTTP/2.0 1377 16.897 0.0123 0.000 0.088 GET /assets/vendor.ee7444dd.js HTTP/2.0 1449 16.684 0.0115 0.000 0.107 POST /api/condition/99d8fefb-6037-4fb0-9373-6e79a18c8f24 HTTP/2.0 1377 16.654 0.0121 0.000 0.078 GET /assets/index.23dac98b.js HTTP/2.0 1443 16.608 0.0115 0.000 0.107 POST /api/condition/ab9e721c-74d9-42ea-83f6-a01915fcc678 HTTP/2.0 1445 16.520 0.0114 0.000 0.122 POST /api/condition/e844e087-2b82-4fc3-8409-53639bd102ad HTTP/2.0 1377 16.428 0.0119 0.000 0.078 GET /assets/favicon.d0f5f504.svg HTTP/2.0 1377 16.396 0.0119 0.000 0.058 GET /assets/logo_white.svg HTTP/2.0 1441 16.377 0.0114 0.000 0.108 POST /api/condition/d7cd2784-9537-44dc-a8a2-837393456e2f HTTP/2.0 1451 16.331 0.0113 0.000 0.111 POST /api/condition/895de034-5773-48db-bdfb-9422e9af03a0 HTTP/2.0 1450 16.197 0.0112 0.000 0.113 POST /api/condition/266842fc-c3c3-4b75-b701-d1925ce59342 HTTP/2.0 1459 16.176 0.0111 0.000 0.115 POST /api/condition/7ca78c50-723a-42a6-bef6-e7bba4d66618 HTTP/2.0 1445 16.129 0.0112 0.000 0.106 POST /api/condition/6e1666fa-e15c-4250-8167-5f783c07fdce HTTP/2.0 1435 16.123 0.0112 0.000 0.106 POST /api/condition/a79e0b84-b94f-4c59-9050-4ccff22f76bf HTTP/2.0 1443 16.115 0.0112 0.000 0.106 POST /api/condition/a716da6a-2aaf-4f0b-986a-4373ac6f263c HTTP/2.0 1442 16.045 0.0111 0.000 0.129 POST /api/condition/16af9c7a-4b14-49c5-908c-8591193c3d93 HTTP/2.0 1447 16.034 0.0111 0.000 0.110 POST /api/condition/fa438f17-9804-480b-ad91-838a3bcf26cf HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.808 0.8080 0.808 0.808 GET /api/condition/c7ad0ac5-2389-4a69-9003-0f3bc0567fb7?condition_level=info%2Cwarning%2Ccritical&end_time=1630133020 HTTP/2.0 1 0.721 0.7210 0.721 0.721 GET /api/condition/365f733b-ae9e-476f-bf99-8bf3104fb30f?condition_level=warning%2Ccritical&end_time=1630064823 HTTP/2.0 1 0.639 0.6390 0.639 0.639 GET /api/condition/8c3df03e-8b50-4e32-8862-50e87e005883?condition_level=info%2Cwarning%2Ccritical&end_time=1629090194 HTTP/2.0 1 0.571 0.5710 0.571 0.571 GET /api/condition/46025019-7c47-49eb-b82f-73ac972c0f46?condition_level=info%2Cwarning%2Ccritical&end_time=1629219600&start_time=1629216000 HTTP/2.0 1 0.547 0.5470 0.547 0.547 GET /api/condition/67cca655-2081-4b3f-800d-df4d9d0e41d6?condition_level=info%2Cwarning%2Ccritical&end_time=1629523667 HTTP/2.0 1 0.545 0.5450 0.545 0.545 GET /api/condition/46025019-7c47-49eb-b82f-73ac972c0f46?condition_level=info%2Cwarning%2Ccritical&end_time=1629308011 HTTP/2.0 1 0.517 0.5170 0.517 0.517 GET /api/condition/895de034-5773-48db-bdfb-9422e9af03a0?condition_level=info%2Cwarning%2Ccritical&end_time=1630093515 HTTP/2.0 1 0.468 0.4680 0.468 0.468 GET /api/condition/266842fc-c3c3-4b75-b701-d1925ce59342?condition_level=info%2Cwarning%2Ccritical&end_time=1629153103 HTTP/2.0 1 0.463 0.4630 0.463 0.463 GET /api/isu/8f3ea362-b897-426e-b162-d878a71688a2/graph?datetime=1629558000 HTTP/2.0 1 0.449 0.4490 0.449 0.449 GET /api/condition/186aa6e6-5df3-4284-beb9-2be983151cec?condition_level=info%2Cwarning%2Ccritical&end_time=1629514960 HTTP/2.0 1 0.442 0.4420 0.442 0.442 GET /api/condition/edf1299c-cb18-44cd-a449-a295a56f5aa6?condition_level=info%2Cwarning%2Ccritical&end_time=1629556462 HTTP/2.0 1 0.435 0.4350 0.435 0.435 GET /api/condition/c161253a-1829-44e2-ab96-a5f266755458?condition_level=info%2Cwarning%2Ccritical&end_time=1630076586 HTTP/2.0 1 0.431 0.4310 0.431 0.431 GET /api/condition/ae1a8aee-81f1-4543-a8bf-6d64f8f9b1b9?condition_level=info%2Cwarning%2Ccritical&end_time=1630019402 HTTP/2.0 1 0.430 0.4300 0.430 0.430 GET /api/condition/8c3df03e-8b50-4e32-8862-50e87e005883?condition_level=info%2Cwarning%2Ccritical&end_time=1629424337 HTTP/2.0 1 0.424 0.4240 0.424 0.424 GET /api/condition/8f3ea362-b897-426e-b162-d878a71688a2?condition_level=info%2Cwarning%2Ccritical&end_time=1629375636 HTTP/2.0 1 0.424 0.4240 0.424 0.424 GET /api/condition/abf718cf-b558-4179-9036-127888301515?condition_level=info%2Cwarning%2Ccritical&end_time=1630258510 HTTP/2.0 1 0.409 0.4090 0.409 0.409 GET /api/condition/71bdcb90-62bf-44a8-a4db-7b09cbcb25ce?condition_level=info%2Cwarning%2Ccritical&end_time=1629686534 HTTP/2.0 1 0.393 0.3930 0.393 0.393 GET /api/condition/edf1299c-cb18-44cd-a449-a295a56f5aa6?condition_level=info%2Cwarning%2Ccritical&end_time=1629420858 HTTP/2.0 1 0.381 0.3810 0.381 0.381 GET /api/condition/67cca655-2081-4b3f-800d-df4d9d0e41d6?condition_level=info%2Cwarning%2Ccritical&end_time=1629328361 HTTP/2.0 1 0.372 0.3720 0.372 0.372 GET /api/isu/aeb6216e-5d8d-469e-a200-6338f3f42107/graph?datetime=1629644400 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 1295 472.906 0.3652 0.005 1.013 GET /api/trend HTTP/2.0 113 4.109 0.0364 0.000 0.832 GET /api/isu/e07e98d1-7d2e-426d-a283-ac18f90fdaeb/icon HTTP/2.0 1329 124.150 0.0934 0.000 0.815 GET /api/isu HTTP/2.0 1 0.808 0.8080 0.808 0.808 GET /api/condition/c7ad0ac5-2389-4a69-9003-0f3bc0567fb7?condition_level=info%2Cwarning%2Ccritical&end_time=1630133020 HTTP/2.0 1 0.721 0.7210 0.721 0.721 GET /api/condition/365f733b-ae9e-476f-bf99-8bf3104fb30f?condition_level=warning%2Ccritical&end_time=1630064823 HTTP/2.0 1 0.639 0.6390 0.639 0.639 GET /api/condition/8c3df03e-8b50-4e32-8862-50e87e005883?condition_level=info%2Cwarning%2Ccritical&end_time=1629090194 HTTP/2.0 1 0.571 0.5710 0.571 0.571 GET /api/condition/46025019-7c47-49eb-b82f-73ac972c0f46?condition_level=info%2Cwarning%2Ccritical&end_time=1629219600&start_time=1629216000 HTTP/2.0 1 0.547 0.5470 0.547 0.547 GET /api/condition/67cca655-2081-4b3f-800d-df4d9d0e41d6?condition_level=info%2Cwarning%2Ccritical&end_time=1629523667 HTTP/2.0 1 0.545 0.5450 0.545 0.545 GET /api/condition/46025019-7c47-49eb-b82f-73ac972c0f46?condition_level=info%2Cwarning%2Ccritical&end_time=1629308011 HTTP/2.0 1 0.517 0.5170 0.517 0.517 GET /api/condition/895de034-5773-48db-bdfb-9422e9af03a0?condition_level=info%2Cwarning%2Ccritical&end_time=1630093515 HTTP/2.0 44 2.863 0.0651 0.007 0.506 GET /api/isu/e6401f9b-69c3-451f-b5f6-5596ecc2968d/icon HTTP/2.0 44 3.089 0.0702 0.001 0.470 GET /api/isu/56fe744d-d43f-47b0-9dd5-a6432d5b519a/icon HTTP/2.0 1 0.468 0.4680 0.468 0.468 GET /api/condition/266842fc-c3c3-4b75-b701-d1925ce59342?condition_level=info%2Cwarning%2Ccritical&end_time=1629153103 HTTP/2.0 95 3.131 0.0330 0.001 0.467 GET /api/isu/64cf2ecf-811c-42f2-a0fb-99e88aa5151e/icon HTTP/2.0 1 0.463 0.4630 0.463 0.463 GET /api/isu/8f3ea362-b897-426e-b162-d878a71688a2/graph?datetime=1629558000 HTTP/2.0 5 0.777 0.1554 0.034 0.458 GET /api/isu/c7ad0ac5-2389-4a69-9003-0f3bc0567fb7/graph?datetime=1629471600 HTTP/2.0 1 0.449 0.4490 0.449 0.449 GET /api/condition/186aa6e6-5df3-4284-beb9-2be983151cec?condition_level=info%2Cwarning%2Ccritical&end_time=1629514960 HTTP/2.0 55 3.433 0.0624 0.001 0.448 GET /api/isu/67cca655-2081-4b3f-800d-df4d9d0e41d6/icon HTTP/2.0 58 2.800 0.0483 0.006 0.444 GET /api/isu/db27db97-7806-4479-a4d7-5df254482b14/icon HTTP/2.0 1 0.442 0.4420 0.442 0.442 GET /api/condition/edf1299c-cb18-44cd-a449-a295a56f5aa6?condition_level=info%2Cwarning%2Ccritical&end_time=1629556462 HTTP/2.0 TOP 10 Slow Requests 1 1.013 GET /api/trend HTTP/2.0 2 1.009 GET /api/trend HTTP/2.0 3 1.009 GET /api/trend HTTP/2.0 4 1.008 GET /api/trend HTTP/2.0 5 1.008 GET /api/trend HTTP/2.0 6 1.008 GET /api/trend HTTP/2.0 7 1.007 GET /api/trend HTTP/2.0 8 1.005 GET /api/trend HTTP/2.0 9 1.004 GET /api/trend HTTP/2.0 10 1.003 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 192.13 QPS, 0.85x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 73451332 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:27:10 to 19:28:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 5 11528 # Exec time 47 51s 438us 50ms 4ms 11ms 3ms 3ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 123.84k 11 11 11 11 0 11 # Query size 0 67.55k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ## # 1ms ################################################################ # 10ms ##### # 100ms # 1s # 10s+ COMMIT\G # Query 2: 1.89k QPS, 0.34x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 81610725 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:27:10 to 19:28:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 55 113578 # Exec time 19 21s 22us 25ms 181us 366us 818us 57us # Lock time 80 5s 9us 25ms 42us 40us 265us 22us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 99 110.92k 1 1 1 1 0 1 # Bytes sent 0 1.45M 13 14 13.43 13.83 0.50 12.54 # Query size 74 27.62M 225 302 255.01 271.23 13.75 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ###### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('186aa6e6-5df3-4284-beb9-2be983151cec', '2021-08-28 19:29:35', 1, 'is_dirty=true,is_overweight=true,is_broken=true', 'この状況はさすがに無理です...')\G # Query 3: 66.27 QPS, 0.33x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 73467889 # Scores: V/M = 0.01 # Time range: 2022-06-27 19:27:10 to 19:28:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 3976 # Exec time 18 20s 97us 78ms 5ms 18ms 6ms 2ms # Lock time 3 213ms 15us 8ms 53us 54us 270us 27us # Rows sent 69 1.71M 0 1.64k 451.35 1.04k 320.44 381.65 # Rows examine 70 1.71M 0 1.64k 451.35 1.04k 320.44 381.65 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 30 299.11M 589 297.06k 77.04k 182.98k 54.57k 65.68k # Query size 1 609.59k 148 157 157.00 151.03 0.11 151.03 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ############################# # 1ms ################################################################ # 10ms ################# # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '46025019-7c47-49eb-b82f-73ac972c0f46' AND `timestamp` < '2021-08-25 12:56:29' ORDER BY `timestamp` DESC\G # Query 4: 20.02 QPS, 0.12x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 71167957 # Scores: V/M = 0.01 # Time range: 2022-06-27 19:27:10 to 19:28:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 1201 # Exec time 6 7s 9us 56ms 6ms 20ms 7ms 3ms # Lock time 0 43ms 0 2ms 36us 42us 92us 25us # Rows sent 27 684.97k 6 1.73k 584.02 1.26k 402.94 511.45 # Rows examine 27 684.22k 0 1.73k 583.38 1.26k 403.72 511.45 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 12 116.99M 1.64k 311.21k 99.75k 211.82k 68.73k 88.02k # Query size 0 136.05k 116 116 116 116 0 116 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us # # 100us ########################### # 1ms ################################################################ # 10ms ####################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '71bdcb90-62bf-44a8-a4db-7b09cbcb25ce' ORDER BY `timestamp` ASC\G # Query 5: 110.57 QPS, 0.05x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 86011628 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:27:10 to 19:28:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 3 6634 # Exec time 2 3s 71us 22ms 468us 2ms 1ms 125us # Lock time 5 308ms 12us 18ms 46us 44us 363us 26us # Rows sent 0 6.40k 0 1 0.99 0.99 0.11 0.99 # Rows examine 0 6.40k 0 1 0.99 0.99 0.11 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 4.81M 589 813 760.77 755.64 26.59 755.64 # Query size 2 809.81k 125 125 125 125 0 125 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ## # 100us ################################################################ # 1ms ##### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'edf1299c-cb18-44cd-a449-a295a56f5aa6' ORDER BY `timestamp` DESC LIMIT 1\G # Query 6: 89.85 QPS, 0.03x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 68802069 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:27:10 to 19:28:10 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 5391 # Exec time 1 2s 12us 19ms 334us 1ms 962us 125us # Lock time 4 259ms 0 19ms 48us 44us 331us 27us # Rows sent 0 5.21k 0 1 0.99 0.99 0.10 0.99 # Rows examine 0 5.18k 0 1 0.98 0.99 0.12 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 3.91M 589 813 760.31 755.64 24.69 755.64 # Query size 1 647.55k 123 123 123 123 0 123 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ### # 100us ################################################################ # 1ms ### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'e6aa3e62-9482-4966-8078-aa4225c75992' ORDER BY timestamp DESC LIMIT 1\G ```

8b045c315ffec09f1d1ecf551ef6993880867396

karamaru-alpha commented 2 years ago

存在確認にlimit1 25150

8

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 1466 14.125 0.0096 0.000 0.109 POST /api/condition/0782a13f-4b93-48a5-906b-cff10f9ac869 HTTP/2.0 1465 14.462 0.0099 0.000 0.103 POST /api/condition/40065499-d78f-4a28-befd-de7511763287 HTTP/2.0 1465 15.388 0.0105 0.000 0.105 POST /api/condition/fed6c433-382d-4111-a5db-44d3f77d2fb2 HTTP/2.0 1465 15.419 0.0105 0.000 0.105 POST /api/condition/894a59d1-4e66-4d4e-a02c-bca9cad5d096 HTTP/2.0 1463 14.207 0.0097 0.000 0.108 POST /api/condition/d69bd5d8-ab89-4d86-9c93-fafd85ee2b1f HTTP/2.0 1463 16.279 0.0111 0.000 0.105 POST /api/condition/098da80a-e508-413c-a005-b02547c79af5 HTTP/2.0 1463 14.964 0.0102 0.000 0.107 POST /api/condition/ecc2f811-18a3-4241-b65d-8455737d0c42 HTTP/2.0 1462 16.558 0.0113 0.000 0.140 POST /api/condition/b529ce83-6bbf-4510-b029-7f1556a60805 HTTP/2.0 1462 14.731 0.0101 0.000 0.119 POST /api/condition/74b3e8ac-ab3d-4841-8bc1-21b00d6c4d7c HTTP/2.0 1460 15.202 0.0104 0.000 0.108 POST /api/condition/ae174019-115f-4040-95a5-1557dd171f45 HTTP/2.0 1460 14.897 0.0102 0.000 0.102 POST /api/condition/7dcc3fee-153e-4270-9869-765b9e5b5e8c HTTP/2.0 1460 15.586 0.0107 0.000 0.106 POST /api/condition/62279025-f188-481b-a193-4edfbb1e1b6d HTTP/2.0 1460 14.444 0.0099 0.000 0.103 POST /api/condition/d41b28cf-60e6-4aa6-971b-e4e7ced8a0c8 HTTP/2.0 1459 14.846 0.0102 0.000 0.108 POST /api/condition/0cd9007d-b32c-4ced-9777-907ec6de4639 HTTP/2.0 1457 14.904 0.0102 0.000 0.111 POST /api/condition/f3e92e01-5bb2-499d-8457-0fd04ee35f50 HTTP/2.0 1457 15.296 0.0105 0.000 0.117 POST /api/condition/34c62662-018f-4e2a-99d6-913e5fa9fe4a HTTP/2.0 1456 16.103 0.0111 0.000 0.109 POST /api/condition/d68d38c8-bec5-4e5f-9446-1aaa36c226ef HTTP/2.0 1456 15.632 0.0107 0.000 0.124 POST /api/condition/daba6e39-0c43-446c-a415-bc51f50f31e1 HTTP/2.0 1455 16.604 0.0114 0.000 0.104 POST /api/condition/bd8fedad-07d3-45b3-b8a5-f5a4504518c6 HTTP/2.0 1455 14.674 0.0101 0.000 0.108 POST /api/condition/e752561c-67e3-47e4-a6c5-5ae1c2ba3dc9 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 1305 469.862 0.3600 0.002 1.012 GET /api/trend HTTP/2.0 1339 121.344 0.0906 0.000 0.638 GET /api/isu HTTP/2.0 1387 19.548 0.0141 0.000 0.074 GET /assets/vendor.ee7444dd.js HTTP/2.0 1387 19.016 0.0137 0.000 0.074 GET /assets/index.23dac98b.js HTTP/2.0 1387 18.836 0.0136 0.000 0.074 GET /assets/favicon.d0f5f504.svg HTTP/2.0 1443 16.916 0.0117 0.000 0.109 POST /api/condition/591d942f-ee6d-4103-8929-327e117721cc HTTP/2.0 1387 16.859 0.0122 0.000 0.059 GET /assets/logo_white.svg HTTP/2.0 1438 16.723 0.0116 0.000 0.107 POST /api/condition/ae0b0be5-c157-4ce5-820b-5eb8a365816a HTTP/2.0 1307 16.656 0.0127 0.000 0.059 GET /assets/logo_orange.svg HTTP/2.0 1455 16.604 0.0114 0.000 0.104 POST /api/condition/bd8fedad-07d3-45b3-b8a5-f5a4504518c6 HTTP/2.0 1462 16.558 0.0113 0.000 0.140 POST /api/condition/b529ce83-6bbf-4510-b029-7f1556a60805 HTTP/2.0 1463 16.279 0.0111 0.000 0.105 POST /api/condition/098da80a-e508-413c-a005-b02547c79af5 HTTP/2.0 1440 16.274 0.0113 0.000 0.103 POST /api/condition/02f67efd-eb48-4734-8a41-fa1eaa7fd532 HTTP/2.0 1444 16.246 0.0113 0.000 0.110 POST /api/condition/61909c06-a297-4fdf-912a-e4cbbc6953be HTTP/2.0 1387 16.243 0.0117 0.000 0.075 GET /assets/index.144d8ca8.css HTTP/2.0 1452 16.158 0.0111 0.000 0.107 POST /api/condition/80f7855a-cf19-4b37-bbb5-14b5c5b807b3 HTTP/2.0 1456 16.103 0.0111 0.000 0.109 POST /api/condition/d68d38c8-bec5-4e5f-9446-1aaa36c226ef HTTP/2.0 1450 16.058 0.0111 0.000 0.109 POST /api/condition/fd29a240-51ae-4ba3-a168-532fe6a9c1b4 HTTP/2.0 1431 16.008 0.0112 0.000 0.114 POST /api/condition/b0aafc54-fc45-457b-8f2f-ccf0dec7efb8 HTTP/2.0 1449 16.004 0.0110 0.000 0.110 POST /api/condition/b72e98af-b2d7-4359-bff6-52a7c972a0af HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 1.000 1.0000 1.000 1.000 GET /api/condition/16d2e5ae-0e97-4003-8fc8-b22800a7ad24?condition_level=info%2Cwarning%2Ccritical&end_time=1629724089 HTTP/2.0 1 0.847 0.8470 0.847 0.847 GET /api/condition/02f67efd-eb48-4734-8a41-fa1eaa7fd532?condition_level=info%2Cwarning%2Ccritical&end_time=1629408043 HTTP/2.0 1 0.643 0.6430 0.643 0.643 GET /api/condition/d7609d2d-0f94-40b7-a674-999c77bf969b?condition_level=info%2Cwarning%2Ccritical&end_time=1629567623 HTTP/2.0 1 0.584 0.5840 0.584 0.584 GET /api/isu/13da10f2-c540-49db-a453-7be3e1bf0e5e/graph?datetime=1629558000 HTTP/2.0 1 0.537 0.5370 0.537 0.537 GET /api/condition/0292c3db-54b8-4a19-9139-721bbbdd04de?condition_level=info%2Cwarning%2Ccritical&end_time=1629414893 HTTP/2.0 1 0.531 0.5310 0.531 0.531 GET /api/condition/efa9d0d8-8686-4b12-a0b6-2a748d431b05?condition_level=info%2Cwarning%2Ccritical&end_time=1629610915 HTTP/2.0 1 0.530 0.5300 0.530 0.530 GET /api/condition/ae174019-115f-4040-95a5-1557dd171f45?condition_level=info%2Cwarning%2Ccritical&end_time=1629734278 HTTP/2.0 1 0.501 0.5010 0.501 0.501 GET /api/condition/edee6e94-2cf4-4730-a25d-a6fbfed6d861?condition_level=info%2Cwarning%2Ccritical&end_time=1629518949 HTTP/2.0 1 0.454 0.4540 0.454 0.454 GET /api/condition/80f7855a-cf19-4b37-bbb5-14b5c5b807b3?condition_level=info%2Cwarning%2Ccritical&end_time=1630114300 HTTP/2.0 1 0.424 0.4240 0.424 0.424 GET /api/isu/5c402d1c-0fa6-4bcb-bf60-cb885d69bc2f/graph?datetime=1630162800 HTTP/2.0 1 0.419 0.4190 0.419 0.419 GET /api/condition/ca260cef-2ce0-4fc2-b37a-01d573de124d?condition_level=info%2Cwarning%2Ccritical&end_time=1629312792 HTTP/2.0 1 0.411 0.4110 0.411 0.411 GET /api/condition/d7550499-7ce5-4d94-ab1a-469dd29a89f2?condition_level=info%2Cwarning%2Ccritical&end_time=1629741192 HTTP/2.0 1 0.400 0.4000 0.400 0.400 GET /api/condition/ef4687b7-7bef-43ca-a627-c1c6ad4a90a3?condition_level=info%2Cwarning%2Ccritical&end_time=1630136345 HTTP/2.0 1 0.392 0.3920 0.392 0.392 GET /api/condition/98da05af-1cca-4def-9134-09e3af052ad0?condition_level=info%2Cwarning%2Ccritical&end_time=1630124603 HTTP/2.0 1 0.389 0.3890 0.389 0.389 GET /api/condition/0292c3db-54b8-4a19-9139-721bbbdd04de?condition_level=info%2Cwarning%2Ccritical&end_time=1629364012 HTTP/2.0 1 0.388 0.3880 0.388 0.388 GET /api/condition/a9a18ebd-afa5-491a-9e6b-53bab85b2724?condition_level=warning%2Ccritical&end_time=1629808998 HTTP/2.0 1 0.381 0.3810 0.381 0.381 GET /api/condition/80f7855a-cf19-4b37-bbb5-14b5c5b807b3?condition_level=info%2Cwarning%2Ccritical&end_time=1629807338 HTTP/2.0 1 0.381 0.3810 0.381 0.381 GET /api/isu/a521572b-77be-41b7-b59e-8e0e2fb5af9c/graph?datetime=1629903600 HTTP/2.0 1 0.379 0.3790 0.379 0.379 GET /api/condition/a521572b-77be-41b7-b59e-8e0e2fb5af9c?condition_level=info%2Cwarning%2Ccritical&end_time=1629785971 HTTP/2.0 1 0.361 0.3610 0.361 0.361 GET /api/condition/ae0b0be5-c157-4ce5-820b-5eb8a365816a?condition_level=info%2Cwarning%2Ccritical&end_time=1629467072 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 1305 469.862 0.3600 0.002 1.012 GET /api/trend HTTP/2.0 1 1.000 1.0000 1.000 1.000 GET /api/condition/16d2e5ae-0e97-4003-8fc8-b22800a7ad24?condition_level=info%2Cwarning%2Ccritical&end_time=1629724089 HTTP/2.0 1 0.847 0.8470 0.847 0.847 GET /api/condition/02f67efd-eb48-4734-8a41-fa1eaa7fd532?condition_level=info%2Cwarning%2Ccritical&end_time=1629408043 HTTP/2.0 146 6.243 0.0428 0.003 0.699 GET /api/isu/8cc7e9bc-37dd-4078-b99f-c849958c5b07/icon HTTP/2.0 9 1.283 0.1426 0.032 0.679 GET /api/isu/dc3413e2-db30-4e8e-b782-48b8017e36f8/graph?datetime=1629212400 HTTP/2.0 1 0.643 0.6430 0.643 0.643 GET /api/condition/d7609d2d-0f94-40b7-a674-999c77bf969b?condition_level=info%2Cwarning%2Ccritical&end_time=1629567623 HTTP/2.0 1339 121.344 0.0906 0.000 0.638 GET /api/isu HTTP/2.0 113 3.450 0.0305 0.001 0.592 GET /api/isu/62279025-f188-481b-a193-4edfbb1e1b6d/icon HTTP/2.0 1 0.584 0.5840 0.584 0.584 GET /api/isu/13da10f2-c540-49db-a453-7be3e1bf0e5e/graph?datetime=1629558000 HTTP/2.0 1 0.537 0.5370 0.537 0.537 GET /api/condition/0292c3db-54b8-4a19-9139-721bbbdd04de?condition_level=info%2Cwarning%2Ccritical&end_time=1629414893 HTTP/2.0 1 0.531 0.5310 0.531 0.531 GET /api/condition/efa9d0d8-8686-4b12-a0b6-2a748d431b05?condition_level=info%2Cwarning%2Ccritical&end_time=1629610915 HTTP/2.0 1 0.530 0.5300 0.530 0.530 GET /api/condition/ae174019-115f-4040-95a5-1557dd171f45?condition_level=info%2Cwarning%2Ccritical&end_time=1629734278 HTTP/2.0 1 0.501 0.5010 0.501 0.501 GET /api/condition/edee6e94-2cf4-4730-a25d-a6fbfed6d861?condition_level=info%2Cwarning%2Ccritical&end_time=1629518949 HTTP/2.0 1 0.454 0.4540 0.454 0.454 GET /api/condition/80f7855a-cf19-4b37-bbb5-14b5c5b807b3?condition_level=info%2Cwarning%2Ccritical&end_time=1630114300 HTTP/2.0 1 0.424 0.4240 0.424 0.424 GET /api/isu/5c402d1c-0fa6-4bcb-bf60-cb885d69bc2f/graph?datetime=1630162800 HTTP/2.0 1 0.419 0.4190 0.419 0.419 GET /api/condition/ca260cef-2ce0-4fc2-b37a-01d573de124d?condition_level=info%2Cwarning%2Ccritical&end_time=1629312792 HTTP/2.0 1 0.411 0.4110 0.411 0.411 GET /api/condition/d7550499-7ce5-4d94-ab1a-469dd29a89f2?condition_level=info%2Cwarning%2Ccritical&end_time=1629741192 HTTP/2.0 112 3.826 0.0342 0.000 0.411 GET /api/isu/e752561c-67e3-47e4-a6c5-5ae1c2ba3dc9/icon HTTP/2.0 92 3.346 0.0364 0.001 0.411 GET /api/isu/d68d38c8-bec5-4e5f-9446-1aaa36c226ef/icon HTTP/2.0 1 0.400 0.4000 0.400 0.400 GET /api/condition/ef4687b7-7bef-43ca-a627-c1c6ad4a90a3?condition_level=info%2Cwarning%2Ccritical&end_time=1630136345 HTTP/2.0 TOP 10 Slow Requests 1 1.012 GET /api/trend HTTP/2.0 2 1.010 GET /api/trend HTTP/2.0 3 1.009 GET /api/trend HTTP/2.0 4 1.008 GET /api/trend HTTP/2.0 5 1.007 GET /api/trend HTTP/2.0 6 1.007 GET /api/trend HTTP/2.0 7 1.007 GET /api/trend HTTP/2.0 8 1.006 GET /api/trend HTTP/2.0 9 1.006 GET /api/trend HTTP/2.0 10 1.006 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 190.70 QPS, 0.81x concurrency, ID 0xFFFCA4D67EA0A788813031B8BBC3B329 at byte 87882437 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:59:25 to 20:00:25 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 5 11442 # Exec time 46 49s 418us 38ms 4ms 11ms 3ms 3ms # 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 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 122.91k 11 11 11 11 0 11 # Query size 0 67.04k 6 6 6 6 0 6 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ## # 1ms ################################################################ # 10ms ##### # 100ms # 1s # 10s+ COMMIT\G # Query 2: 1.88k QPS, 0.35x concurrency, ID 0xB8B32624C3268C0925657C305C0ED778 at byte 3098739 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:59:25 to 20:00:25 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 55 112686 # Exec time 20 21s 21us 56ms 187us 384us 883us 57us # Lock time 79 5s 9us 17ms 43us 40us 255us 22us # Rows sent 0 0 0 0 0 0 0 0 # Rows examine 0 0 0 0 0 0 0 0 # Rows affecte 99 110.04k 1 1 1 1 0 1 # Bytes sent 0 1.44M 13 14 13.42 13.83 0.50 12.54 # Query size 74 27.51M 233 302 255.99 271.23 13.02 246.02 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ###### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G INSERT INTO `isu_condition` (`jia_isu_uuid`, `timestamp`, `is_sitting`, `condition`, `message`) VALUES ('894a59d1-4e66-4d4e-a02c-bca9cad5d096', '2021-08-10 03:47:37', 0, 'is_dirty=true,is_overweight=false,is_broken=false', '早く拭いてもらえます?')\G # Query 3: 66.52 QPS, 0.33x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 17574685 # Scores: V/M = 0.01 # Time range: 2022-06-27 19:59:24 to 20:00:25 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 4058 # Exec time 18 20s 102us 73ms 5ms 18ms 7ms 2ms # Lock time 3 208ms 15us 11ms 51us 49us 290us 28us # Rows sent 70 1.73M 0 1.49k 447.24 1012.63 310.51 381.65 # Rows examine 70 1.73M 0 1.49k 447.24 1012.63 310.51 381.65 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 31 302.98M 589 247.26k 76.46k 174.27k 53.17k 65.68k # Query size 1 622.17k 148 157 157.00 151.03 0.11 151.03 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ############################# # 1ms ################################################################ # 10ms ################# # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'ae0b0be5-c157-4ce5-820b-5eb8a365816a' AND `timestamp` < '2021-08-11 21:15:27' ORDER BY `timestamp` DESC\G # Query 4: 20.16 QPS, 0.11x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 80952129 # Scores: V/M = 0.01 # Time range: 2022-06-27 19:59:24 to 20:00:25 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 1230 # Exec time 6 7s 7us 75ms 6ms 21ms 7ms 3ms # Lock time 1 63ms 0 6ms 51us 40us 260us 25us # Rows sent 26 677.36k 6 1.39k 563.92 1.26k 378.88 537.02 # Rows examine 27 677.00k 0 1.39k 563.62 1.26k 379.27 537.02 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 11 116.80M 1.60k 258.23k 97.23k 222.42k 66.17k 88.02k # Query size 0 139.34k 116 116 116 116 0 116 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us # # 100us ############################ # 1ms ################################################################ # 10ms ###################### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '61909c06-a297-4fdf-912a-e4cbbc6953be' ORDER BY `timestamp` ASC\G # Query 5: 109.48 QPS, 0.05x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 59697022 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:59:24 to 20:00:25 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 3 6678 # Exec time 2 3s 12us 23ms 416us 2ms 1ms 125us # Lock time 5 354ms 0 21ms 53us 44us 460us 26us # Rows sent 0 6.41k 0 1 0.98 0.99 0.13 0.99 # Rows examine 0 6.40k 0 1 0.98 0.99 0.13 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 4.84M 589 813 759.69 755.64 29.45 755.64 # Query size 2 815.19k 125 125 125 125 0 125 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ## # 100us ################################################################ # 1ms #### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'ae174019-115f-4040-95a5-1557dd171f45' ORDER BY `timestamp` DESC LIMIT 1\G # Query 6: 90.32 QPS, 0.03x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 18984104 # Scores: V/M = 0.00 # Time range: 2022-06-27 19:59:25 to 20:00:25 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 5419 # Exec time 1 2s 7us 21ms 323us 925us 989us 125us # Lock time 3 227ms 0 7ms 41us 42us 186us 27us # Rows sent 0 5.20k 0 1 0.98 0.99 0.13 0.99 # Rows examine 0 5.18k 0 1 0.98 0.99 0.15 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 3.92M 589 813 759.11 755.64 28.65 755.64 # Query size 1 650.92k 123 123 123 123 0 123 # Boolean: # QC hit 0% yes, 99% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ### # 100us ################################################################ # 1ms ### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'd41b28cf-60e6-4aa6-971b-e4e7ced8a0c8' ORDER BY timestamp DESC LIMIT 1\G ```

2bcb680935863667d8d2dda8663df3f8fb0f08e4

karamaru-alpha commented 2 years ago

condition遅延書き込み 29730

9

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 3315 61.758 0.0186 0.000 0.083 GET /assets/index.23dac98b.js HTTP/2.0 3315 62.540 0.0189 0.000 0.079 GET /assets/vendor.ee7444dd.js HTTP/2.0 3315 54.693 0.0165 0.000 0.082 GET /assets/index.144d8ca8.css HTTP/2.0 3315 60.777 0.0183 0.000 0.097 GET /assets/logo_white.svg HTTP/2.0 3315 61.283 0.0185 0.000 0.122 GET /assets/favicon.d0f5f504.svg HTTP/2.0 3262 44.172 0.0135 0.000 0.090 GET / HTTP/2.0 3220 61.601 0.0191 0.000 0.095 GET /assets/logo_orange.svg HTTP/2.0 3218 819.667 0.2547 0.003 1.018 GET /api/trend HTTP/2.0 1805 125.431 0.0695 0.000 0.529 GET /api/isu HTTP/2.0 1446 29.351 0.0203 0.000 0.114 POST /api/condition/9ea176fb-8a20-4735-8dd2-cd8ae5d637e2 HTTP/2.0 1439 29.107 0.0202 0.000 0.110 POST /api/condition/cb47ff43-f2a4-4193-a878-89e172f18916 HTTP/2.0 1438 28.527 0.0198 0.000 0.107 POST /api/condition/6e586ff1-d1a0-44b2-a6f2-7510310151fc HTTP/2.0 1437 28.998 0.0202 0.000 0.101 POST /api/condition/ce16cb59-a6a6-4d6c-9d6f-cfd96c6e0b9d HTTP/2.0 1437 28.733 0.0200 0.000 0.110 POST /api/condition/e652bb62-ee16-4398-b4ce-bb223fc2393b HTTP/2.0 1436 28.950 0.0202 0.000 0.110 POST /api/condition/433baba0-af5f-45a0-8ffb-bf1bf1016109 HTTP/2.0 1435 27.766 0.0193 0.000 0.105 POST /api/condition/e800a616-11b3-4555-b7a5-eac2d4272993 HTTP/2.0 1433 28.665 0.0200 0.000 0.107 POST /api/condition/3ec2adbd-e030-4e6b-9567-0036b42f207d HTTP/2.0 1433 28.967 0.0202 0.000 0.108 POST /api/condition/681a4c23-cdaa-4510-95f7-088e36f23ecf HTTP/2.0 1432 29.148 0.0204 0.000 0.107 POST /api/condition/85efe446-7445-4715-b847-e120469ce1d5 HTTP/2.0 1431 28.760 0.0201 0.000 0.110 POST /api/condition/5223dd30-1e5b-4485-9c8c-25086534cabf HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 3218 819.667 0.2547 0.003 1.018 GET /api/trend HTTP/2.0 1805 125.431 0.0695 0.000 0.529 GET /api/isu HTTP/2.0 3315 62.540 0.0189 0.000 0.079 GET /assets/vendor.ee7444dd.js HTTP/2.0 3315 61.758 0.0186 0.000 0.083 GET /assets/index.23dac98b.js HTTP/2.0 3220 61.601 0.0191 0.000 0.095 GET /assets/logo_orange.svg HTTP/2.0 3315 61.283 0.0185 0.000 0.122 GET /assets/favicon.d0f5f504.svg HTTP/2.0 3315 60.777 0.0183 0.000 0.097 GET /assets/logo_white.svg HTTP/2.0 3315 54.693 0.0165 0.000 0.082 GET /assets/index.144d8ca8.css HTTP/2.0 3262 44.172 0.0135 0.000 0.090 GET / HTTP/2.0 1431 29.535 0.0206 0.000 0.103 POST /api/condition/04d90972-0de0-4ca6-ba2d-1be51b78625e HTTP/2.0 1419 29.531 0.0208 0.000 0.110 POST /api/condition/fc813ec8-1c89-4bed-b558-ed848c4952ab HTTP/2.0 1422 29.491 0.0207 0.000 0.108 POST /api/condition/79d5e556-21d4-411c-a074-0f6724017ce2 HTTP/2.0 1417 29.466 0.0208 0.000 0.106 POST /api/condition/f50a6b83-e124-46b1-9212-b4320a2d5246 HTTP/2.0 1427 29.441 0.0206 0.000 0.107 POST /api/condition/c8d30cd9-614e-4ec7-bd10-beb4e181270b HTTP/2.0 1427 29.381 0.0206 0.000 0.104 POST /api/condition/b78457df-7077-4b69-81f8-bda28d74aef3 HTTP/2.0 1423 29.363 0.0206 0.000 0.113 POST /api/condition/e7f952e1-ac0f-4a57-b4aa-a45d3a03ff58 HTTP/2.0 1418 29.362 0.0207 0.000 0.110 POST /api/condition/80d98a10-f957-488b-9ce5-48f57a5dceb6 HTTP/2.0 1446 29.351 0.0203 0.000 0.114 POST /api/condition/9ea176fb-8a20-4735-8dd2-cd8ae5d637e2 HTTP/2.0 1430 29.351 0.0205 0.000 0.104 POST /api/condition/0c32b7c9-680f-4a2c-abad-8807ea8e0e0d HTTP/2.0 1416 29.271 0.0207 0.000 0.111 POST /api/condition/efccb9e1-abf5-4f11-b55f-cdfd78883582 HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.424 0.4240 0.424 0.424 GET /api/isu/5223dd30-1e5b-4485-9c8c-25086534cabf/graph?datetime=1629990000 HTTP/2.0 1 0.317 0.3170 0.317 0.317 GET /api/condition/0c32b7c9-680f-4a2c-abad-8807ea8e0e0d?condition_level=info%2Cwarning%2Ccritical&end_time=1630150781 HTTP/2.0 1 0.308 0.3080 0.308 0.308 GET /api/condition/f29230b2-1600-4bd1-a201-f5bb4139ff72?condition_level=warning%2Ccritical&end_time=1630105345 HTTP/2.0 1 0.300 0.3000 0.300 0.300 GET /api/condition/6e586ff1-d1a0-44b2-a6f2-7510310151fc?condition_level=info%2Cwarning%2Ccritical&end_time=1629862093 HTTP/2.0 1 0.299 0.2990 0.299 0.299 GET /api/condition/5544f324-167d-4f56-a055-503a73f4cec5?condition_level=info%2Cwarning%2Ccritical&end_time=1630058613 HTTP/2.0 1 0.290 0.2900 0.290 0.290 GET /api/condition/a44b9335-6faa-4ef8-9769-7f1a8578e8c0?condition_level=info%2Cwarning%2Ccritical&end_time=1630008394 HTTP/2.0 1 0.288 0.2880 0.288 0.288 GET /api/isu/6e6d2dd4-4938-4099-8485-75170281c7a1/graph?datetime=1629212400 HTTP/2.0 1 0.288 0.2880 0.288 0.288 GET /api/condition/fa35672e-b5a0-422c-ac77-e768a3dea1b4?condition_level=info%2Cwarning%2Ccritical&end_time=1629724136 HTTP/2.0 1 0.278 0.2780 0.278 0.278 GET /api/condition/9d9863b2-7f9a-4e63-a5f3-d087992e4fc1?condition_level=info%2Cwarning%2Ccritical&end_time=1629426326 HTTP/2.0 1 0.273 0.2730 0.273 0.273 GET /api/condition/91855aa7-8ef6-42ec-b15e-df9f92dbe307?condition_level=info%2Cwarning%2Ccritical&end_time=1630152563 HTTP/2.0 1 0.270 0.2700 0.270 0.270 GET /api/isu/265bd7ac-bba4-4283-91ae-624faece9100/graph?datetime=1629817200 HTTP/2.0 1 0.267 0.2670 0.267 0.267 GET /api/condition/f50a6b83-e124-46b1-9212-b4320a2d5246?condition_level=info%2Cwarning%2Ccritical&end_time=1629448936 HTTP/2.0 1 0.266 0.2660 0.266 0.266 GET /api/condition/39989271-d711-437f-a0be-7acc090aa9db?condition_level=info%2Cwarning%2Ccritical&end_time=1629984040 HTTP/2.0 1 0.261 0.2610 0.261 0.261 GET /api/condition/a8b5431e-65bf-4806-b318-ca8cfdb184bb?condition_level=info%2Cwarning%2Ccritical&end_time=1630111396 HTTP/2.0 1 0.260 0.2600 0.260 0.260 GET /api/condition/696f5052-0ce4-45da-a8bd-834de8b0ce27?condition_level=warning%2Ccritical&end_time=1629985759 HTTP/2.0 1 0.259 0.2590 0.259 0.259 GET /api/isu/fa35672e-b5a0-422c-ac77-e768a3dea1b4/graph?datetime=1629558000 HTTP/2.0 1 0.258 0.2580 0.258 0.258 GET /api/condition/b1b58b6a-12fc-4411-8a3f-78e1c48dc409?condition_level=info%2Cwarning%2Ccritical&end_time=1629896321 HTTP/2.0 1 0.258 0.2580 0.258 0.258 GET /api/condition/c2d659aa-39db-4c13-9f0c-45c9e4df864f?condition_level=info%2Cwarning%2Ccritical&end_time=1629966084 HTTP/2.0 1 0.256 0.2560 0.256 0.256 GET /api/condition/6344cb88-4560-449b-922a-3278ee24464f?condition_level=info%2Cwarning%2Ccritical&end_time=1629520704 HTTP/2.0 1 0.255 0.2550 0.255 0.255 GET /api/isu/e2c66c9d-b660-4e78-943e-b3412dfe1529/graph?datetime=1629558000 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 3218 819.667 0.2547 0.003 1.018 GET /api/trend HTTP/2.0 1805 125.431 0.0695 0.000 0.529 GET /api/isu HTTP/2.0 1 0.424 0.4240 0.424 0.424 GET /api/isu/5223dd30-1e5b-4485-9c8c-25086534cabf/graph?datetime=1629990000 HTTP/2.0 31 2.463 0.0795 0.004 0.383 GET /api/isu/6344cb88-4560-449b-922a-3278ee24464f/icon HTTP/2.0 152 5.012 0.0330 0.001 0.343 GET /api/isu/39989271-d711-437f-a0be-7acc090aa9db/icon HTTP/2.0 56 3.569 0.0637 0.006 0.326 GET /api/isu/6615f788-5642-4bf3-a0ac-f1b31d274028/icon HTTP/2.0 1 0.317 0.3170 0.317 0.317 GET /api/condition/0c32b7c9-680f-4a2c-abad-8807ea8e0e0d?condition_level=info%2Cwarning%2Ccritical&end_time=1630150781 HTTP/2.0 1 0.308 0.3080 0.308 0.308 GET /api/condition/f29230b2-1600-4bd1-a201-f5bb4139ff72?condition_level=warning%2Ccritical&end_time=1630105345 HTTP/2.0 1 0.300 0.3000 0.300 0.300 GET /api/condition/6e586ff1-d1a0-44b2-a6f2-7510310151fc?condition_level=info%2Cwarning%2Ccritical&end_time=1629862093 HTTP/2.0 1 0.299 0.2990 0.299 0.299 GET /api/condition/5544f324-167d-4f56-a055-503a73f4cec5?condition_level=info%2Cwarning%2Ccritical&end_time=1630058613 HTTP/2.0 1 0.290 0.2900 0.290 0.290 GET /api/condition/a44b9335-6faa-4ef8-9769-7f1a8578e8c0?condition_level=info%2Cwarning%2Ccritical&end_time=1630008394 HTTP/2.0 1 0.288 0.2880 0.288 0.288 GET /api/condition/fa35672e-b5a0-422c-ac77-e768a3dea1b4?condition_level=info%2Cwarning%2Ccritical&end_time=1629724136 HTTP/2.0 1 0.288 0.2880 0.288 0.288 GET /api/isu/6e6d2dd4-4938-4099-8485-75170281c7a1/graph?datetime=1629212400 HTTP/2.0 1 0.278 0.2780 0.278 0.278 GET /api/condition/9d9863b2-7f9a-4e63-a5f3-d087992e4fc1?condition_level=info%2Cwarning%2Ccritical&end_time=1629426326 HTTP/2.0 1 0.273 0.2730 0.273 0.273 GET /api/condition/91855aa7-8ef6-42ec-b15e-df9f92dbe307?condition_level=info%2Cwarning%2Ccritical&end_time=1630152563 HTTP/2.0 53 3.079 0.0581 0.011 0.272 GET /api/isu/d3e54ed5-48d2-4337-81a1-b5405192be04/icon HTTP/2.0 1 0.270 0.2700 0.270 0.270 GET /api/isu/265bd7ac-bba4-4283-91ae-624faece9100/graph?datetime=1629817200 HTTP/2.0 152 4.923 0.0324 0.002 0.269 GET /api/isu/f48da625-02b5-4891-b6b3-9361f63e92e1/icon HTTP/2.0 1 0.267 0.2670 0.267 0.267 GET /api/condition/f50a6b83-e124-46b1-9212-b4320a2d5246?condition_level=info%2Cwarning%2Ccritical&end_time=1629448936 HTTP/2.0 6 0.760 0.1267 0.040 0.266 GET /api/isu/5544f324-167d-4f56-a055-503a73f4cec5/graph?datetime=1629471600 HTTP/2.0 TOP 10 Slow Requests 1 1.018 GET /api/trend HTTP/2.0 2 1.017 GET /api/trend HTTP/2.0 3 1.017 GET /api/trend HTTP/2.0 4 1.017 GET /api/trend HTTP/2.0 5 1.017 GET /api/trend HTTP/2.0 6 1.017 GET /api/trend HTTP/2.0 7 1.016 GET /api/trend HTTP/2.0 8 1.016 GET /api/trend HTTP/2.0 9 1.015 GET /api/trend HTTP/2.0 10 1.015 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 80.80 QPS, 0.19x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 20741738 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 5 4848 # Exec time 57 11s 117us 54ms 2ms 8ms 3ms 2ms # Lock time 19 219ms 16us 8ms 45us 44us 226us 31us # Rows sent 70 1.95M 0 1.57k 422.73 964.41 300.29 363.48 # Rows examine 83 1.95M 0 1.57k 422.73 964.41 300.29 363.48 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 25 342.98M 589 277.54k 72.44k 165.97k 51.45k 62.55k # Query size 8 743.30k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################################ # 1ms ################################################################ # 10ms ### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'f714ddd1-23db-4a1a-a459-cfe623f655ea' AND `timestamp` < '2021-08-15 00:09:48' ORDER BY `timestamp` DESC\G # Query 2: 24.77 QPS, 0.03x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 61056972 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1486 # Exec time 8 2s 6us 27ms 1ms 4ms 2ms 113us # Lock time 1 23ms 0 928us 15us 35us 36us 0 # Rows sent 25 737.66k 10 1.41k 508.32 1.14k 369.84 441.81 # Rows examine 12 297.64k 0 1.41k 205.10 964.41 323.59 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 9 127.05M 2.12k 252.53k 87.55k 211.82k 63.93k 76.03k # Query size 1 168.34k 116 116 116 116 0 116 # Boolean: # QC hit 53% yes, 46% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us #################################### # 1ms ####################################### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '2cf4381f-42ce-44a4-865a-523196625518' ORDER BY `timestamp` ASC\G # Query 3: 147.52 QPS, 0.03x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 43183534 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 10 8851 # Exec time 8 2s 6us 22ms 182us 301us 714us 119us # Lock time 22 260ms 0 15ms 29us 38us 228us 27us # Rows sent 0 8.31k 0 1 0.96 0.99 0.19 0.99 # Rows examine 0 5.63k 0 1 0.65 0.99 0.47 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 6.38M 589 813 756.38 755.64 38.57 755.64 # Query size 12 1.06M 125 125 125 125 0 125 # Boolean: # QC hit 33% yes, 66% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ### # 10us ################################# # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'c79ba2fe-e710-4007-b9b8-1fad5ac1ced9' ORDER BY `timestamp` DESC LIMIT 1\G # Query 4: 206.80 QPS, 0.03x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 29013936 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 14 12408 # Exec time 7 2s 6us 16ms 121us 214us 436us 108us # Lock time 25 288ms 0 11ms 23us 38us 172us 25us # Rows sent 0 11.81k 0 1 0.97 0.99 0.16 0.99 # Rows examine 0 6.70k 0 1 0.55 0.99 0.49 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 8.97M 589 813 757.64 755.64 32.85 755.64 # Query size 16 1.46M 123 123 123 123 0 123 # Boolean: # QC hit 43% yes, 56% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ##### # 10us ################################################# # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'a8b5431e-65bf-4806-b318-ca8cfdb184bb' ORDER BY timestamp DESC LIMIT 1\G # Query 5: 177.83 QPS, 0.01x concurrency, ID 0xB5F4855605637317357023AD70B91455 at byte 55425372 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 12 10670 # Exec time 3 671ms 7us 15ms 62us 152us 299us 18us # Lock time 6 78ms 0 3ms 7us 28us 55us 0 # Rows sent 0 10.34k 0 1 0.99 0.99 0.09 0.99 # Rows examine 0 1.90k 0 1 0.18 0.99 0.38 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 20 274.80M 77 132.17k 26.37k 83.83k 25.24k 18.47k # Query size 14 1.26M 116 130 123.75 124.25 3.84 124.25 # Boolean: # QC hit 81% yes, 18% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ########## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT `image` FROM `isu` WHERE `jia_user_id` = 'jovial_bohr' AND `jia_isu_uuid` = '901849f2-9077-40f7-8a79-671730eccb38'\G # Query 6: 55 QPS, 0.01x concurrency, ID 0x8C2BC651CBBBF3DB41D1CAD61AA0BD68 at byte 26035025 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 3 3300 # Exec time 3 596ms 9us 15ms 180us 725us 536us 44us # Lock time 1 22ms 0 8ms 6us 23us 138us 0 # Rows sent 0 12.12k 1 10 3.76 7.70 2.08 2.90 # Rows examine 2 49.67k 0 135 15.41 107.34 35.36 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 22 310.32M 5.47k 311.29k 96.29k 211.82k 61.68k 83.83k # Query size 1 175.18k 51 57 54.36 56.92 2.95 51.63 # Boolean: # QC hit 83% yes, 16% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ############## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `character` = 'まじめ'\G # Query 7: 371.67 QPS, 0.01x concurrency, ID 0x7EC46C3D52058132BA4D921BE7986B53 at byte 60695491 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 25 22300 # Exec time 2 540ms 4us 11ms 24us 19us 219us 11us # Lock time 1 20ms 0 7ms 0 0 57us 0 # Rows sent 0 21.78k 1 1 1 1 0 1 # Rows examine 0 141 0 1 0.01 0 0.08 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 1.19M 56 56 56 56 0 56 # Query size 16 1.42M 59 73 66.88 69.19 3.58 65.89 # Boolean: # QC hit 99% yes, 0% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ########## # 10us ################################################################ # 100us # # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'user'\G # SHOW CREATE TABLE `isucondition`.`user`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `user` WHERE `jia_user_id` = 'flamboyant_brown' LIMIT 1\G # Query 8: 210.20 QPS, 0.01x concurrency, ID 0x88716D544EA925A1EE9114761B982E3E at byte 59395556 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 14 12612 # Exec time 2 496ms 8us 14ms 39us 80us 275us 16us # Lock time 6 79ms 0 11ms 6us 27us 124us 0 # Rows sent 0 12.31k 0 1 1.00 0.99 0.02 0.99 # Rows examine 0 1.62k 0 1 0.13 0.99 0.34 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 689.68k 50 56 56.00 54.21 0.11 54.21 # Query size 12 1.07M 89 89 89 89 0 89 # Boolean: # QC hit 86% yes, 13% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us # # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '80d98a10-f957-488b-9ce5-48f57a5dceb6' LIMIT 1\G # Query 9: 29.42 QPS, 0.01x concurrency, ID 0x20183D6FD015A9A0A6C4FB46B2683CF0 at byte 32250159 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:31:09 to 20:32:09 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 1765 # Exec time 2 439ms 8us 13ms 248us 839us 709us 69us # Lock time 1 12ms 0 1ms 6us 27us 38us 0 # Rows sent 0 8.64k 0 20 5.01 8.91 2.67 5.75 # Rows examine 1 34.95k 0 135 20.28 124.25 41.73 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 16 229.01M 501 646.78k 132.87k 222.42k 66.30k 143.37k # Query size 1 133.12k 69 83 77.23 76.28 3.00 76.28 # Boolean: # QC hit 80% yes, 19% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us #################### # 1ms ## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'trusting_lumiere' ORDER BY `id` DESC\G ```

859c7f68be1facf71efe5bfbe99a293dc8574270

karamaru-alpha commented 2 years ago

複合pkにする 29839

10

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 3069 58.377 0.0190 0.000 0.106 GET /assets/vendor.ee7444dd.js HTTP/2.0 3069 56.702 0.0185 0.000 0.093 GET /assets/favicon.d0f5f504.svg HTTP/2.0 3069 55.759 0.0182 0.000 0.121 GET /assets/logo_white.svg HTTP/2.0 3069 52.422 0.0171 0.000 0.113 GET /assets/index.144d8ca8.css HTTP/2.0 3069 57.510 0.0187 0.000 0.105 GET /assets/index.23dac98b.js HTTP/2.0 3016 40.942 0.0136 0.000 0.075 GET / HTTP/2.0 2974 55.890 0.0188 0.000 0.097 GET /assets/logo_orange.svg HTTP/2.0 2972 739.948 0.2490 0.004 1.011 GET /api/trend HTTP/2.0 1718 115.527 0.0672 0.000 0.547 GET /api/isu HTTP/2.0 1448 29.663 0.0205 0.000 0.110 POST /api/condition/e34df6a6-e736-4700-b311-fa0f500cda09 HTTP/2.0 1447 29.454 0.0204 0.000 0.103 POST /api/condition/16c2f785-ec75-4f23-922a-6467a02715a7 HTTP/2.0 1444 30.110 0.0209 0.000 0.107 POST /api/condition/95af9207-9055-449f-a23a-b0d4a6b558f8 HTTP/2.0 1443 29.881 0.0207 0.000 0.104 POST /api/condition/32502b92-d8e3-4614-977d-7ccd72855a5e HTTP/2.0 1442 30.263 0.0210 0.000 0.111 POST /api/condition/eeca036a-b71e-4443-ae33-2730fc7d2671 HTTP/2.0 1442 30.651 0.0213 0.000 0.108 POST /api/condition/a65ec8b5-6367-4129-94a3-f6814eefe1b4 HTTP/2.0 1442 29.356 0.0204 0.000 0.108 POST /api/condition/5f706d8b-74a0-4110-9ff3-2120f4acf244 HTTP/2.0 1441 29.659 0.0206 0.000 0.121 POST /api/condition/a4225d3e-34ee-49e1-a030-7b1aea12ea52 HTTP/2.0 1441 29.850 0.0207 0.000 0.103 POST /api/condition/c8c7c227-5ebc-4128-bbf9-0163a8656694 HTTP/2.0 1441 28.891 0.0200 0.000 0.104 POST /api/condition/9993ef02-2a4b-4a12-b208-19a3b0e7bbf2 HTTP/2.0 1439 30.141 0.0209 0.000 0.111 POST /api/condition/43ffd5b8-ccf2-4b14-acbc-c50ef17b8eb4 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 2972 739.948 0.2490 0.004 1.011 GET /api/trend HTTP/2.0 1718 115.527 0.0672 0.000 0.547 GET /api/isu HTTP/2.0 3069 58.377 0.0190 0.000 0.106 GET /assets/vendor.ee7444dd.js HTTP/2.0 3069 57.510 0.0187 0.000 0.105 GET /assets/index.23dac98b.js HTTP/2.0 3069 56.702 0.0185 0.000 0.093 GET /assets/favicon.d0f5f504.svg HTTP/2.0 2974 55.890 0.0188 0.000 0.097 GET /assets/logo_orange.svg HTTP/2.0 3069 55.759 0.0182 0.000 0.121 GET /assets/logo_white.svg HTTP/2.0 3069 52.422 0.0171 0.000 0.113 GET /assets/index.144d8ca8.css HTTP/2.0 3016 40.942 0.0136 0.000 0.075 GET / HTTP/2.0 1442 30.651 0.0213 0.000 0.108 POST /api/condition/a65ec8b5-6367-4129-94a3-f6814eefe1b4 HTTP/2.0 1438 30.573 0.0213 0.000 0.119 POST /api/condition/a2a86cc5-3bb8-48db-9396-69f997ba854d HTTP/2.0 1426 30.492 0.0214 0.000 0.107 POST /api/condition/7c39108e-4016-4334-a230-4b3664e16870 HTTP/2.0 1431 30.469 0.0213 0.000 0.109 POST /api/condition/12f02c32-b0fc-4311-ae5a-1762ec7ecaae HTTP/2.0 1425 30.366 0.0213 0.000 0.109 POST /api/condition/abe68d04-d544-436f-811a-d839080d7ce0 HTTP/2.0 1435 30.350 0.0211 0.000 0.104 POST /api/condition/facc0d43-36ca-45b0-9b93-de107e67c57b HTTP/2.0 1420 30.267 0.0213 0.000 0.108 POST /api/condition/395981bf-37d5-4b39-9d68-6f95b22bb67f HTTP/2.0 1442 30.263 0.0210 0.000 0.111 POST /api/condition/eeca036a-b71e-4443-ae33-2730fc7d2671 HTTP/2.0 1429 30.241 0.0212 0.000 0.130 POST /api/condition/06d03fec-d75e-432b-bf74-90732e86a761 HTTP/2.0 1429 30.238 0.0212 0.000 0.103 POST /api/condition/06a8984e-50fe-43cc-bcba-5f6137f8f17d HTTP/2.0 1423 30.201 0.0212 0.000 0.105 POST /api/condition/b0422188-5864-4def-8424-dabefa8bf411 HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.392 0.3920 0.392 0.392 GET /api/isu/9970f76b-1284-435d-aa50-b94bb8f57999/graph?datetime=1629558000 HTTP/2.0 1 0.333 0.3330 0.333 0.333 GET /api/condition/7731ea4f-ff6a-42bc-aa09-c7543ad21833?condition_level=info%2Cwarning%2Ccritical&end_time=1629653815 HTTP/2.0 1 0.318 0.3180 0.318 0.318 GET /api/isu/2e0fc845-9402-4e2f-aa3e-64513831d8c6/graph?datetime=1629990000 HTTP/2.0 1 0.318 0.3180 0.318 0.318 GET /api/condition/abe68d04-d544-436f-811a-d839080d7ce0?condition_level=info%2Cwarning%2Ccritical&end_time=1630056156 HTTP/2.0 1 0.314 0.3140 0.314 0.314 GET /api/condition/1dd1c7cd-a621-48c9-bb4a-a98bb30700cb?condition_level=info%2Cwarning%2Ccritical&end_time=1630129725 HTTP/2.0 1 0.312 0.3120 0.312 0.312 GET /api/condition/824fa473-bbb5-4707-9a8f-b422c088f5cc?condition_level=info%2Cwarning%2Ccritical&end_time=1630075767 HTTP/2.0 1 0.308 0.3080 0.308 0.308 GET /api/condition/b07af365-1ece-4a73-932f-e961af2826f5?condition_level=info%2Cwarning%2Ccritical&end_time=1629756415 HTTP/2.0 1 0.301 0.3010 0.301 0.301 GET /api/condition/83c0e0e1-eccd-4545-9e18-383f3c1ee825?condition_level=warning%2Ccritical&end_time=1630195785 HTTP/2.0 1 0.297 0.2970 0.297 0.297 GET /api/condition/2add7290-92c4-425d-879c-0be1851f3b77?condition_level=info%2Cwarning%2Ccritical&end_time=1630070271 HTTP/2.0 1 0.295 0.2950 0.295 0.295 GET /api/condition/7c39108e-4016-4334-a230-4b3664e16870?condition_level=info%2Cwarning%2Ccritical&end_time=1629279448 HTTP/2.0 1 0.288 0.2880 0.288 0.288 GET /api/condition/26e5d94c-ace4-491b-b6ab-3f7a773d89c2?condition_level=info%2Cwarning%2Ccritical&end_time=1630033672 HTTP/2.0 1 0.283 0.2830 0.283 0.283 GET /api/isu/b0422188-5864-4def-8424-dabefa8bf411/graph?datetime=1629471600 HTTP/2.0 1 0.278 0.2780 0.278 0.278 GET /api/condition/e9f1c375-330b-4c23-bdbc-f95267245f00?condition_level=info%2Cwarning%2Ccritical&end_time=1629934777 HTTP/2.0 1 0.271 0.2710 0.271 0.271 GET /api/isu/92d31380-b3c2-44c2-ba6b-3aa52771a2ef/graph?datetime=1629817200 HTTP/2.0 1 0.270 0.2700 0.270 0.270 GET /api/condition/43ffd5b8-ccf2-4b14-acbc-c50ef17b8eb4?condition_level=info%2Cwarning%2Ccritical&end_time=1630255637 HTTP/2.0 1 0.268 0.2680 0.268 0.268 GET /api/condition/abe68d04-d544-436f-811a-d839080d7ce0?condition_level=info%2Cwarning%2Ccritical&end_time=1629732644 HTTP/2.0 1 0.267 0.2670 0.267 0.267 GET /api/condition/d420b971-04a8-46c8-888d-9c6031bccc6f?condition_level=info%2Cwarning%2Ccritical&end_time=1629724576 HTTP/2.0 1 0.265 0.2650 0.265 0.265 GET /api/condition/2d73bef1-ac94-4d4c-98a5-c50936dabe0d?condition_level=info%2Cwarning%2Ccritical&end_time=1629943340 HTTP/2.0 1 0.258 0.2580 0.258 0.258 GET /api/isu/de0ed509-c6ce-43f7-8e6c-287f6dfab993/graph?datetime=1629903600 HTTP/2.0 1 0.255 0.2550 0.255 0.255 GET /api/condition/b07af365-1ece-4a73-932f-e961af2826f5?condition_level=info%2Cwarning%2Ccritical&end_time=1629986630 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 2972 739.948 0.2490 0.004 1.011 GET /api/trend HTTP/2.0 1718 115.527 0.0672 0.000 0.547 GET /api/isu HTTP/2.0 1 0.392 0.3920 0.392 0.392 GET /api/isu/9970f76b-1284-435d-aa50-b94bb8f57999/graph?datetime=1629558000 HTTP/2.0 1 0.333 0.3330 0.333 0.333 GET /api/condition/7731ea4f-ff6a-42bc-aa09-c7543ad21833?condition_level=info%2Cwarning%2Ccritical&end_time=1629653815 HTTP/2.0 1 0.318 0.3180 0.318 0.318 GET /api/isu/2e0fc845-9402-4e2f-aa3e-64513831d8c6/graph?datetime=1629990000 HTTP/2.0 1 0.318 0.3180 0.318 0.318 GET /api/condition/abe68d04-d544-436f-811a-d839080d7ce0?condition_level=info%2Cwarning%2Ccritical&end_time=1630056156 HTTP/2.0 1 0.314 0.3140 0.314 0.314 GET /api/condition/1dd1c7cd-a621-48c9-bb4a-a98bb30700cb?condition_level=info%2Cwarning%2Ccritical&end_time=1630129725 HTTP/2.0 1 0.312 0.3120 0.312 0.312 GET /api/condition/824fa473-bbb5-4707-9a8f-b422c088f5cc?condition_level=info%2Cwarning%2Ccritical&end_time=1630075767 HTTP/2.0 1 0.308 0.3080 0.308 0.308 GET /api/condition/b07af365-1ece-4a73-932f-e961af2826f5?condition_level=info%2Cwarning%2Ccritical&end_time=1629756415 HTTP/2.0 1 0.301 0.3010 0.301 0.301 GET /api/condition/83c0e0e1-eccd-4545-9e18-383f3c1ee825?condition_level=warning%2Ccritical&end_time=1630195785 HTTP/2.0 1 0.297 0.2970 0.297 0.297 GET /api/condition/2add7290-92c4-425d-879c-0be1851f3b77?condition_level=info%2Cwarning%2Ccritical&end_time=1630070271 HTTP/2.0 1 0.295 0.2950 0.295 0.295 GET /api/condition/7c39108e-4016-4334-a230-4b3664e16870?condition_level=info%2Cwarning%2Ccritical&end_time=1629279448 HTTP/2.0 1 0.288 0.2880 0.288 0.288 GET /api/condition/26e5d94c-ace4-491b-b6ab-3f7a773d89c2?condition_level=info%2Cwarning%2Ccritical&end_time=1630033672 HTTP/2.0 1 0.283 0.2830 0.283 0.283 GET /api/isu/b0422188-5864-4def-8424-dabefa8bf411/graph?datetime=1629471600 HTTP/2.0 164 6.678 0.0407 0.001 0.280 GET /api/isu/72d3fbb0-9927-4170-a708-6e374e9ee05a/icon HTTP/2.0 1 0.278 0.2780 0.278 0.278 GET /api/condition/e9f1c375-330b-4c23-bdbc-f95267245f00?condition_level=info%2Cwarning%2Ccritical&end_time=1629934777 HTTP/2.0 1 0.271 0.2710 0.271 0.271 GET /api/isu/92d31380-b3c2-44c2-ba6b-3aa52771a2ef/graph?datetime=1629817200 HTTP/2.0 1 0.270 0.2700 0.270 0.270 GET /api/condition/43ffd5b8-ccf2-4b14-acbc-c50ef17b8eb4?condition_level=info%2Cwarning%2Ccritical&end_time=1630255637 HTTP/2.0 19 1.181 0.0622 0.002 0.269 GET /api/isu/52f0b792-db92-428a-9297-91d0409b9f80 HTTP/2.0 1 0.268 0.2680 0.268 0.268 GET /api/condition/abe68d04-d544-436f-811a-d839080d7ce0?condition_level=info%2Cwarning%2Ccritical&end_time=1629732644 HTTP/2.0 TOP 10 Slow Requests 1 1.011 GET /api/trend HTTP/2.0 2 1.009 GET /api/trend HTTP/2.0 3 1.009 GET /api/trend HTTP/2.0 4 1.007 GET /api/trend HTTP/2.0 5 1.007 GET /api/trend HTTP/2.0 6 1.007 GET /api/trend HTTP/2.0 7 1.007 GET /api/trend HTTP/2.0 8 1.006 GET /api/trend HTTP/2.0 9 1.006 GET /api/trend HTTP/2.0 10 1.006 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 81.75 QPS, 0.13x concurrency, ID 0x9C6C682008AE0D08F3E2A0049B030C70 at byte 45111509 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 5 4987 # Exec time 52 8s 92us 40ms 2ms 4ms 2ms 1ms # Lock time 18 184ms 16us 3ms 36us 47us 60us 31us # Rows sent 71 2.09M 0 1.52k 439.03 964.41 302.76 381.65 # Rows examine 84 2.09M 0 1.52k 439.03 964.41 302.76 381.65 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 26 357.53M 589 266.97k 73.41k 165.97k 50.68k 62.55k # Query size 8 764.61k 157 157 157 157 0 157 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # # 100us ################################################# # 1ms ################################################################ # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '30840181-e5d7-4d77-ab1b-d12ab36f57c6' AND `timestamp` < '2021-08-21 02:20:09' ORDER BY `timestamp` DESC\G # Query 2: 206.90 QPS, 0.02x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 29798787 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 14 12621 # Exec time 9 1s 5us 16ms 108us 204us 346us 103us # Lock time 25 255ms 0 3ms 20us 38us 65us 25us # Rows sent 0 12.09k 0 1 0.98 0.99 0.13 0.99 # Rows examine 0 6.72k 0 1 0.54 0.99 0.49 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 9.11M 589 797 756.58 755.64 30.03 755.64 # Query size 17 1.48M 123 123 123 123 0 123 # Boolean: # QC hit 44% yes, 55% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ###### # 10us #################################################### # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '72d3fbb0-9927-4170-a708-6e374e9ee05a' ORDER BY timestamp DESC LIMIT 1\G # Query 3: 140.95 QPS, 0.02x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 24929322 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 9 8598 # Exec time 8 1s 6us 18ms 141us 224us 491us 113us # Lock time 23 236ms 0 3ms 27us 40us 94us 27us # Rows sent 0 8.12k 0 1 0.97 0.99 0.18 0.99 # Rows examine 0 5.66k 0 1 0.67 0.99 0.47 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 6.18M 589 797 753.94 755.64 36.41 755.64 # Query size 11 1.02M 125 125 125 125 0 125 # Boolean: # QC hit 31% yes, 68% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ### # 10us ############################## # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'a0ccaa86-f0f4-4783-acdc-c85852dfaf79' ORDER BY `timestamp` DESC LIMIT 1\G # Query 4: 23.75 QPS, 0.02x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 55701311 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1449 # Exec time 6 1s 8us 28ms 698us 2ms 2ms 103us # Lock time 2 23ms 0 2ms 16us 36us 47us 0 # Rows sent 25 745.70k 10 1.46k 526.98 1.20k 371.80 463.90 # Rows examine 11 296.70k 0 1.46k 209.68 964.41 329.92 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 9 124.73M 2.07k 242.38k 88.15k 211.82k 61.78k 79.83k # Query size 1 164.14k 116 116 116 116 0 116 # Boolean: # QC hit 54% yes, 45% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ###################################### # 1ms ############################# # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'b0422188-5864-4def-8424-dabefa8bf411' ORDER BY `timestamp` ASC\G # Query 5: 169.30 QPS, 0.01x concurrency, ID 0xB5F4855605637317357023AD70B91455 at byte 24485985 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 11 10327 # Exec time 4 667ms 7us 16ms 64us 138us 348us 18us # Lock time 8 81ms 0 8ms 7us 28us 90us 0 # Rows sent 0 10.01k 0 1 0.99 0.99 0.09 0.99 # Rows examine 0 1.84k 0 1 0.18 0.99 0.38 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 19 259.90M 77 132.17k 25.77k 79.83k 24.22k 18.47k # Query size 14 1.23M 116 133 124.76 124.25 3.99 124.25 # Boolean: # QC hit 81% yes, 18% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ########## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT `image` FROM `isu` WHERE `jia_user_id` = 'sweet_swartz' AND `jia_isu_uuid` = '80149d1e-1ce4-4257-a30f-213adc6efb5b'\G # Query 6: 55.33 QPS, 0.01x concurrency, ID 0x8C2BC651CBBBF3DB41D1CAD61AA0BD68 at byte 58151066 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 3 3375 # Exec time 3 518ms 8us 11ms 153us 657us 384us 40us # Lock time 1 15ms 0 924us 4us 23us 20us 0 # Rows sent 0 12.33k 1 11 3.74 7.70 2.15 2.90 # Rows examine 1 48.36k 0 134 14.67 102.22 34.21 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 23 315.92M 5.47k 350.98k 95.85k 283.86k 78.70k 79.83k # Query size 2 179.17k 51 57 54.36 56.92 2.95 51.63 # Boolean: # QC hit 83% yes, 16% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ################## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `character` = 'いじっぱり'\G # Query 7: 211.85 QPS, 0.01x concurrency, ID 0x88716D544EA925A1EE9114761B982E3E at byte 45156441 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:01 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 14 12711 # Exec time 3 512ms 8us 8ms 40us 80us 234us 16us # Lock time 6 67ms 0 7ms 5us 27us 77us 0 # Rows sent 0 12.41k 0 1 1.00 0.99 0.02 0.99 # Rows examine 0 1.56k 0 1 0.13 0.99 0.33 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 695.09k 50 56 56.00 54.21 0.12 54.21 # Query size 12 1.08M 89 89 89 89 0 89 # Boolean: # QC hit 87% yes, 12% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us # # 1ms # # 10ms # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '2d73bef1-ac94-4d4c-98a5-c50936dabe0d' LIMIT 1\G # Query 8: 27.51 QPS, 0.01x concurrency, ID 0x20183D6FD015A9A0A6C4FB46B2683CF0 at byte 32320380 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1678 # Exec time 3 503ms 8us 22ms 300us 839us 1ms 63us # Lock time 1 14ms 0 2ms 8us 27us 72us 0 # Rows sent 0 8.40k 0 20 5.12 8.91 2.59 5.75 # Rows examine 1 33.63k 0 134 20.52 118.34 41.57 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 16 217.06M 501 646.78k 132.46k 312.96k 75.24k 136.54k # Query size 1 128.16k 69 86 78.21 80.10 3.72 76.28 # Boolean: # QC hit 80% yes, 19% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ###################### # 1ms ### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'charming_meitner' ORDER BY `id` DESC\G # Query 9: 359.41 QPS, 0.01x concurrency, ID 0x7EC46C3D52058132BA4D921BE7986B53 at byte 29673280 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 25 21924 # Exec time 3 463ms 5us 11ms 21us 19us 183us 12us # Lock time 0 8ms 0 5ms 0 0 29us 0 # Rows sent 0 21.41k 1 1 1 1 0 1 # Rows examine 0 128 0 1 0.01 0 0.08 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 1.17M 56 56 56 56 0 56 # Query size 16 1.42M 59 76 67.83 69.19 3.54 65.89 # Boolean: # QC hit 99% yes, 0% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ########## # 10us ################################################################ # 100us # # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'user'\G # SHOW CREATE TABLE `isucondition`.`user`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `user` WHERE `jia_user_id` = 'ecstatic_williams' LIMIT 1\G # Query 10: 91.77 QPS, 0.00x concurrency, ID 0x262764FE7CE586B417A1206082D32E11 at byte 32214002 # Scores: V/M = 0.00 # Time range: 2022-06-27 20:43:00 to 20:44:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 6 5598 # Exec time 1 290ms 5us 18ms 51us 108us 429us 12us # Lock time 3 33ms 0 906us 5us 31us 24us 0 # Rows sent 0 5.39k 0 1 0.99 0.99 0.12 0.99 # Rows examine 0 828 0 1 0.15 0.99 0.35 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 541.45k 75 122 99.04 102.22 5.61 97.36 # Query size 7 666.24k 113 130 121.87 124.25 2.59 118.34 # Boolean: # QC hit 83% yes, 16% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ########### # 10us ################################################################ # 100us ##### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT name FROM `isu` WHERE `jia_isu_uuid` = '95af9207-9055-449f-a23a-b0d4a6b558f8' AND `jia_user_id` = 'sweet_swartz'\G ```

fd06893e58081e68ea8db590a729d54dc3ed5df1

karamaru-alpha commented 2 years ago

level切り出し 37861

11

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 4614 92.708 0.0201 0.000 0.174 GET /assets/favicon.d0f5f504.svg HTTP/2.0 4614 85.167 0.0185 0.000 0.103 GET /assets/index.144d8ca8.css HTTP/2.0 4614 82.659 0.0179 0.000 0.109 GET /assets/logo_white.svg HTTP/2.0 4614 92.490 0.0200 0.000 0.097 GET /assets/index.23dac98b.js HTTP/2.0 4614 93.948 0.0204 0.000 0.097 GET /assets/vendor.ee7444dd.js HTTP/2.0 4581 64.382 0.0141 0.000 0.088 GET / HTTP/2.0 4538 83.943 0.0185 0.000 0.142 GET /assets/logo_orange.svg HTTP/2.0 4536 929.559 0.2049 0.001 1.042 GET /api/trend HTTP/2.0 2246 122.249 0.0544 0.000 0.315 GET /api/isu HTTP/2.0 1434 25.439 0.0177 0.000 0.103 POST /api/condition/4516a955-4c76-40f6-a15e-802acfe86b77 HTTP/2.0 1432 25.458 0.0178 0.000 0.111 POST /api/condition/61b35a2c-8732-403a-add6-35027552354b HTTP/2.0 1432 24.200 0.0169 0.000 0.104 POST /api/condition/7d1cdefa-ae95-40e1-ba1e-fb529251abde HTTP/2.0 1431 23.799 0.0166 0.000 0.105 POST /api/condition/4b4b865d-3257-44e2-ac9c-791838e11ad0 HTTP/2.0 1431 24.611 0.0172 0.000 0.101 POST /api/condition/7593aaa7-fa9e-4ce8-8343-877da1bd31e4 HTTP/2.0 1430 25.298 0.0177 0.000 0.108 POST /api/condition/2234ea9f-3d1a-46fd-a0ef-a89e70984df2 HTTP/2.0 1429 24.202 0.0169 0.000 0.102 POST /api/condition/2e3d053c-2324-40b0-9869-eb779ea2dce7 HTTP/2.0 1429 25.590 0.0179 0.000 0.111 POST /api/condition/e79d7b86-11f6-49a3-8e05-f6608a968220 HTTP/2.0 1428 25.260 0.0177 0.000 0.103 POST /api/condition/63902b9e-e33e-49ce-b073-fb3c1e6a09f0 HTTP/2.0 1427 24.419 0.0171 0.000 0.105 POST /api/condition/e1b106fc-0218-4f00-9005-51047f09b157 HTTP/2.0 1424 24.399 0.0171 0.000 0.106 POST /api/condition/8fcf6377-2b56-4db8-b2ec-055b9e8b32c2 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 4536 929.559 0.2049 0.001 1.042 GET /api/trend HTTP/2.0 2246 122.249 0.0544 0.000 0.315 GET /api/isu HTTP/2.0 4614 93.948 0.0204 0.000 0.097 GET /assets/vendor.ee7444dd.js HTTP/2.0 4614 92.708 0.0201 0.000 0.174 GET /assets/favicon.d0f5f504.svg HTTP/2.0 4614 92.490 0.0200 0.000 0.097 GET /assets/index.23dac98b.js HTTP/2.0 4614 85.167 0.0185 0.000 0.103 GET /assets/index.144d8ca8.css HTTP/2.0 4538 83.943 0.0185 0.000 0.142 GET /assets/logo_orange.svg HTTP/2.0 4614 82.659 0.0179 0.000 0.109 GET /assets/logo_white.svg HTTP/2.0 4581 64.382 0.0141 0.000 0.088 GET / HTTP/2.0 1411 26.833 0.0190 0.000 0.105 POST /api/condition/cd95f7b7-e3a3-44da-81f1-13f625695774 HTTP/2.0 1401 26.733 0.0191 0.000 0.108 POST /api/condition/b6fcbcc6-1d24-4c49-848c-e3a4a4582750 HTTP/2.0 1403 26.562 0.0189 0.000 0.109 POST /api/condition/9e85a692-b83a-430b-b360-dadbcc7d0dac HTTP/2.0 1399 26.187 0.0187 0.000 0.114 POST /api/condition/7d2aac65-a3d8-49dc-adde-df4f4c48c89f HTTP/2.0 1402 26.133 0.0186 0.000 0.108 POST /api/condition/83fe807e-da60-4fce-ad5f-b60f2de7bde5 HTTP/2.0 1414 26.100 0.0185 0.000 0.108 POST /api/condition/3e57472a-5a49-40b5-a7ba-2099a19aa71c HTTP/2.0 1419 25.890 0.0182 0.000 0.107 POST /api/condition/54481207-e406-4182-82f6-add05e1bb67c HTTP/2.0 1406 25.860 0.0184 0.000 0.121 POST /api/condition/2566ffcd-5566-4387-a98b-59a83490cbb7 HTTP/2.0 1399 25.852 0.0185 0.000 0.109 POST /api/condition/bdb8bfca-0c44-48b5-b06e-935c87692da8 HTTP/2.0 1407 25.746 0.0183 0.000 0.108 POST /api/condition/cc5cf439-d12f-4fec-8bf6-7157bedca73f HTTP/2.0 1405 25.676 0.0183 0.000 0.102 POST /api/condition/05a1000c-bd64-4dec-81ee-b22187a9cadf HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.265 0.2650 0.265 0.265 GET /api/condition/d3d199b3-a6d4-431e-9d12-7567b792fee0?condition_level=info%2Cwarning%2Ccritical&end_time=1629626985 HTTP/2.0 1 0.260 0.2600 0.260 0.260 GET /api/condition/fad2f308-dafb-488b-b42e-0173b942d404?condition_level=info%2Cwarning%2Ccritical&end_time=1629960877 HTTP/2.0 1 0.252 0.2520 0.252 0.252 POST /initialize HTTP/2.0 1 0.238 0.2380 0.238 0.238 GET /api/isu/8a45b064-a5b5-4188-8aa9-16da5c4af326/graph?datetime=1629730800 HTTP/2.0 1 0.234 0.2340 0.234 0.234 GET /api/condition/2e3d053c-2324-40b0-9869-eb779ea2dce7?condition_level=info%2Cwarning%2Ccritical&end_time=1629646953 HTTP/2.0 1 0.230 0.2300 0.230 0.230 GET /api/condition/85c70fa8-3f74-45cf-8069-ec267d460093?condition_level=info%2Cwarning%2Ccritical&end_time=1630014773 HTTP/2.0 1 0.227 0.2270 0.227 0.227 GET /api/condition/e2044149-3f35-4b54-8e6f-f8bcb9e1488d?condition_level=info%2Cwarning%2Ccritical&end_time=1629634531 HTTP/2.0 1 0.227 0.2270 0.227 0.227 GET /api/condition/bcb1c110-ef9a-44e4-8afb-ede75df13f0b?condition_level=info%2Cwarning%2Ccritical&end_time=1629958730 HTTP/2.0 1 0.227 0.2270 0.227 0.227 GET /api/condition/8ef29095-8655-4e9d-ab69-dfa21a16d0c3?condition_level=warning%2Ccritical&end_time=1629781829 HTTP/2.0 1 0.225 0.2250 0.225 0.225 GET /api/isu/79c4217c-7b73-47e4-a77c-b4c13c986843/graph?datetime=1629471600 HTTP/2.0 1 0.217 0.2170 0.217 0.217 GET /api/condition/61b35a2c-8732-403a-add6-35027552354b?condition_level=info%2Cwarning%2Ccritical&end_time=1629954736 HTTP/2.0 1 0.217 0.2170 0.217 0.217 GET /api/condition/251b3c28-d9bd-4f6a-9922-176d8ec1dae3?condition_level=info%2Cwarning%2Ccritical&end_time=1629364533 HTTP/2.0 1 0.215 0.2150 0.215 0.215 GET /api/condition/cd95f7b7-e3a3-44da-81f1-13f625695774?condition_level=info%2Cwarning%2Ccritical&end_time=1629392992 HTTP/2.0 1 0.212 0.2120 0.212 0.212 GET /api/condition/754bccef-a7ce-4613-89fb-a972bcdfa772?condition_level=info%2Cwarning%2Ccritical&end_time=1629733812 HTTP/2.0 1 0.212 0.2120 0.212 0.212 GET /api/condition/cff8fbcc-e6fd-4a23-b549-289bd752e85d?condition_level=info%2Cwarning%2Ccritical&end_time=1629838936 HTTP/2.0 1 0.208 0.2080 0.208 0.208 GET /api/condition/66a17fdd-7541-4150-9354-8891b599aaa5?condition_level=info%2Cwarning%2Ccritical&end_time=1629367071 HTTP/2.0 1 0.207 0.2070 0.207 0.207 GET /api/condition/bdb8bfca-0c44-48b5-b06e-935c87692da8?condition_level=info%2Cwarning%2Ccritical&end_time=1629096181 HTTP/2.0 1 0.207 0.2070 0.207 0.207 GET /api/condition/79c4217c-7b73-47e4-a77c-b4c13c986843?condition_level=info%2Cwarning%2Ccritical&end_time=1629738619 HTTP/2.0 4536 929.559 0.2049 0.001 1.042 GET /api/trend HTTP/2.0 1 0.204 0.2040 0.204 0.204 GET /api/isu/7abe4578-2655-4662-a58e-f9a9ea7b76e2/graph?datetime=1629644400 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 4536 929.559 0.2049 0.001 1.042 GET /api/trend HTTP/2.0 2246 122.249 0.0544 0.000 0.315 GET /api/isu HTTP/2.0 135 14.513 0.1075 0.000 0.277 POST /api/isu HTTP/2.0 1 0.265 0.2650 0.265 0.265 GET /api/condition/d3d199b3-a6d4-431e-9d12-7567b792fee0?condition_level=info%2Cwarning%2Ccritical&end_time=1629626985 HTTP/2.0 1 0.260 0.2600 0.260 0.260 GET /api/condition/fad2f308-dafb-488b-b42e-0173b942d404?condition_level=info%2Cwarning%2Ccritical&end_time=1629960877 HTTP/2.0 1 0.252 0.2520 0.252 0.252 POST /initialize HTTP/2.0 176 4.665 0.0265 0.000 0.239 GET /api/isu/f50f9bda-3000-4a80-9925-87a7ab813ec8/icon HTTP/2.0 1 0.238 0.2380 0.238 0.238 GET /api/isu/8a45b064-a5b5-4188-8aa9-16da5c4af326/graph?datetime=1629730800 HTTP/2.0 1 0.234 0.2340 0.234 0.234 GET /api/condition/2e3d053c-2324-40b0-9869-eb779ea2dce7?condition_level=info%2Cwarning%2Ccritical&end_time=1629646953 HTTP/2.0 1 0.230 0.2300 0.230 0.230 GET /api/condition/85c70fa8-3f74-45cf-8069-ec267d460093?condition_level=info%2Cwarning%2Ccritical&end_time=1630014773 HTTP/2.0 1 0.227 0.2270 0.227 0.227 GET /api/condition/bcb1c110-ef9a-44e4-8afb-ede75df13f0b?condition_level=info%2Cwarning%2Ccritical&end_time=1629958730 HTTP/2.0 1 0.227 0.2270 0.227 0.227 GET /api/condition/8ef29095-8655-4e9d-ab69-dfa21a16d0c3?condition_level=warning%2Ccritical&end_time=1629781829 HTTP/2.0 1 0.227 0.2270 0.227 0.227 GET /api/condition/e2044149-3f35-4b54-8e6f-f8bcb9e1488d?condition_level=info%2Cwarning%2Ccritical&end_time=1629634531 HTTP/2.0 9 0.717 0.0797 0.020 0.227 GET /api/isu/f42fd962-6643-41e6-a601-621d8675a277/graph?datetime=1629471600 HTTP/2.0 36 1.834 0.0509 0.000 0.226 GET /api/isu/84105004-1296-4b15-a857-76afbe4bd69c/icon HTTP/2.0 1 0.225 0.2250 0.225 0.225 GET /api/isu/79c4217c-7b73-47e4-a77c-b4c13c986843/graph?datetime=1629471600 HTTP/2.0 3 0.362 0.1207 0.035 0.218 GET /api/isu/33faa1f5-8031-4e32-b8b3-6aa8017d0fb9/graph?datetime=1629903600 HTTP/2.0 1 0.217 0.2170 0.217 0.217 GET /api/condition/251b3c28-d9bd-4f6a-9922-176d8ec1dae3?condition_level=info%2Cwarning%2Ccritical&end_time=1629364533 HTTP/2.0 1 0.217 0.2170 0.217 0.217 GET /api/condition/61b35a2c-8732-403a-add6-35027552354b?condition_level=info%2Cwarning%2Ccritical&end_time=1629954736 HTTP/2.0 63 3.391 0.0538 0.000 0.216 GET /api/isu/29f3b488-3c73-4c36-a27b-62c3bb3a2662/icon HTTP/2.0 TOP 10 Slow Requests 1 1.042 GET /api/trend HTTP/2.0 2 1.042 GET /api/trend HTTP/2.0 3 1.041 GET /api/trend HTTP/2.0 4 1.041 GET /api/trend HTTP/2.0 5 1.019 GET /api/trend HTTP/2.0 6 1.016 GET /api/trend HTTP/2.0 7 1.015 GET /api/trend HTTP/2.0 8 1.015 GET /api/trend HTTP/2.0 9 1.015 GET /api/trend HTTP/2.0 10 1.010 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 100.18 QPS, 0.03x concurrency, ID 0x928E21E81CD470548A56AA26A02EF04A at byte 31870709 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 5 6111 # Exec time 16 2s 105us 45ms 300us 445us 941us 204us # Lock time 21 355ms 20us 36ms 58us 52us 552us 36us # Rows sent 9 116.02k 0 20 19.44 19.46 2.92 19.46 # Rows examine 19 137.04k 0 430 22.96 19.46 21.40 19.46 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 24.18M 663 5.10k 4.05k 4.49k 580.65 4.07k # Query size 10 1.24M 205 213 212.12 212.52 3.17 212.52 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '251b3c28-d9bd-4f6a-9922-176d8ec1dae3' AND `timestamp` < '2021-08-16 11:52:29' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20\G # Query 2: 303.02 QPS, 0.03x concurrency, ID 0xAC9E2250E1642BFE9823A9B9ECA1A419 at byte 15457650 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:54 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 16 18181 # Exec time 16 2s 6us 15ms 95us 167us 257us 103us # Lock time 21 354ms 0 5ms 19us 36us 67us 25us # Rows sent 1 17.51k 0 1 0.99 0.99 0.12 0.99 # Rows examine 1 9.92k 0 1 0.56 0.99 0.49 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 14.55M 663 891 838.91 833.10 26.39 833.10 # Query size 18 2.13M 123 123 123 123 0 123 # Boolean: # QC hit 43% yes, 56% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ###### # 10us ################################################ # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '6d69647a-b816-4540-9e60-1d43c774df94' ORDER BY timestamp DESC LIMIT 1\G # Query 3: 180.31 QPS, 0.02x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 31893504 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 9 10999 # Exec time 12 1s 6us 55ms 124us 185us 609us 113us # Lock time 19 328ms 0 54ms 29us 38us 521us 26us # Rows sent 0 10.45k 0 1 0.97 0.99 0.16 0.99 # Rows examine 1 7.15k 0 1 0.67 0.99 0.47 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 8.77M 663 891 835.86 833.10 33.21 833.10 # Query size 11 1.31M 125 125 125 125 0 125 # Boolean: # QC hit 32% yes, 67% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ### # 10us ############################### # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'a418c457-032a-4493-a599-df688070cac8' ORDER BY `timestamp` DESC LIMIT 1\G # Query 4: 30.30 QPS, 0.02x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 31900094 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1848 # Exec time 11 1s 8us 59ms 684us 2ms 2ms 113us # Lock time 4 78ms 0 50ms 42us 31us 1ms 0 # Rows sent 80 972.60k 6 1.42k 538.93 1.20k 370.85 487.09 # Rows examine 54 376.01k 0 1.42k 208.35 964.41 325.53 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 12 170.08M 1.71k 257.18k 94.24k 222.42k 65.00k 83.83k # Query size 1 209.34k 116 116 116 116 0 116 # Boolean: # QC hit 55% yes, 44% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ########################################### # 1ms ############################### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '61b35a2c-8732-403a-add6-35027552354b' ORDER BY `timestamp` ASC\G # Query 5: 217.05 QPS, 0.01x concurrency, ID 0xB5F4855605637317357023AD70B91455 at byte 73732884 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 11 13240 # Exec time 7 845ms 7us 13ms 63us 152us 283us 18us # Lock time 7 133ms 0 10ms 10us 28us 122us 0 # Rows sent 1 12.85k 0 1 0.99 0.99 0.08 0.99 # Rows examine 0 2.82k 0 1 0.22 0.99 0.41 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 24 338.09M 77 132.17k 26.15k 79.83k 24.28k 18.47k # Query size 13 1.57M 116 132 124.37 124.25 4.06 124.25 # Boolean: # QC hit 77% yes, 22% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ########### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT `image` FROM `isu` WHERE `jia_user_id` = 'heuristic_black' AND `jia_isu_uuid` = '94cb946d-d05c-43eb-b06c-df528711a115'\G # Query 6: 74.58 QPS, 0.01x concurrency, ID 0x8C2BC651CBBBF3DB41D1CAD61AA0BD68 at byte 3417757 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:54 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 4 4475 # Exec time 6 734ms 7us 7ms 164us 690us 346us 44us # Lock time 1 22ms 0 1ms 4us 23us 21us 0 # Rows sent 1 17.75k 1 15 4.06 8.91 2.74 2.90 # Rows examine 11 82.74k 0 159 18.93 124.25 41.16 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 33 452.40M 5.47k 428.70k 103.52k 283.86k 81.45k 83.83k # Query size 2 237.56k 51 57 54.36 56.92 2.95 51.63 # Boolean: # QC hit 81% yes, 18% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ################## # 1ms # # 10ms # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `character` = 'きまぐれ'\G # Query 7: 238.87 QPS, 0.01x concurrency, ID 0x88716D544EA925A1EE9114761B982E3E at byte 47618091 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:54 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 12 14332 # Exec time 6 704ms 8us 19ms 49us 80us 351us 15us # Lock time 8 150ms 0 10ms 10us 28us 170us 0 # Rows sent 1 13.99k 0 1 1.00 0.99 0.02 0.99 # Rows examine 0 2.83k 0 1 0.20 0.99 0.40 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 783.75k 50 56 56.00 54.21 0.10 54.21 # Query size 10 1.22M 89 89 89 89 0 89 # Boolean: # QC hit 79% yes, 20% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us # # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '804bc3cf-173c-49e4-82e6-1207d60f40f5' LIMIT 1\G # Query 8: 36.15 QPS, 0.01x concurrency, ID 0x20183D6FD015A9A0A6C4FB46B2683CF0 at byte 31877662 # This item is included in the report because it matches --limit. # Scores: V/M = 0.01 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 2205 # Exec time 6 679ms 7us 53ms 307us 925us 1ms 60us # Lock time 1 17ms 0 537us 7us 27us 26us 0 # Rows sent 0 10.74k 0 9 4.99 8.91 2.58 5.75 # Rows examine 9 62.09k 0 159 28.84 151.03 52.01 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 20 281.11M 501 274.25k 130.55k 233.54k 68.50k 136.54k # Query size 1 166.30k 69 85 77.23 80.10 3.67 76.28 # Boolean: # QC hit 75% yes, 24% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ####################### # 1ms #### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'priceless_cori' ORDER BY `id` DESC\G # Query 9: 454.36 QPS, 0.01x concurrency, ID 0x7EC46C3D52058132BA4D921BE7986B53 at byte 47133458 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 24 27716 # Exec time 5 644ms 4us 12ms 23us 19us 231us 11us # Lock time 0 9ms 0 2ms 0 0 10us 0 # Rows sent 2 27.07k 1 1 1 1 0 1 # Rows examine 0 233 0 1 0.01 0 0.09 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 1.48M 56 56 56 56 0 56 # Query size 15 1.78M 59 75 67.37 72.65 3.83 65.89 # Boolean: # QC hit 99% yes, 0% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ############# # 10us ################################################################ # 100us # # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'user'\G # SHOW CREATE TABLE `isucondition`.`user`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `user` WHERE `jia_user_id` = 'quizzical_visvesvaraya' LIMIT 1\G # Query 10: 112.74 QPS, 0.00x concurrency, ID 0x262764FE7CE586B417A1206082D32E11 at byte 15405147 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 6 6877 # Exec time 2 295ms 5us 11ms 42us 98us 243us 11us # Lock time 3 51ms 0 8ms 7us 30us 97us 0 # Rows sent 0 6.64k 0 1 0.99 0.99 0.11 0.99 # Rows examine 0 1.20k 0 1 0.18 0.99 0.38 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 659.02k 75 122 98.13 102.22 6.20 97.36 # Query size 7 815.60k 113 129 121.44 124.25 3.20 118.34 # Boolean: # QC hit 81% yes, 18% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ############### # 10us ################################################################ # 100us #### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT name FROM `isu` WHERE `jia_isu_uuid` = 'b2dc1bda-624d-4a70-b784-8a29ac570fa3' AND `jia_user_id` = 'boring_wescoff'\G # Query 11: 39.25 QPS, 0.00x concurrency, ID 0xC1B01223FBAA0D3FFA4AECBA98E246CC at byte 22398006 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: 2022-06-29 20:16:53 to 20:17:54 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 2394 # Exec time 2 276ms 7us 10ms 115us 214us 392us 40us # Lock time 2 44ms 0 3ms 18us 33us 96us 0 # Rows sent 0 2.26k 0 1 0.97 0.99 0.18 0.99 # Rows examine 0 1.01k 0 1 0.43 0.99 0.49 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 4 63.78M 501 132.72k 27.28k 79.83k 23.99k 19.40k # Query size 2 276.47k 110 126 118.26 118.34 3.75 112.70 # Boolean: # QC hit 53% yes, 46% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ######################################### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'quizzical_visvesvaraya' AND `jia_isu_uuid` = 'cbce7c35-2ec1-43ff-8144-14451df336ca'\G ```

cde21ae113ff574a73e1508024e117e398e8352d

karamaru-alpha commented 2 years ago

最新levelを別テーブルに 29113

12

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 5495 133.330 0.0243 0.000 0.131 GET /assets/favicon.d0f5f504.svg HTTP/2.0 5495 134.204 0.0244 0.000 0.131 GET /assets/index.23dac98b.js HTTP/2.0 5495 136.489 0.0248 0.000 0.156 GET /assets/vendor.ee7444dd.js HTTP/2.0 5495 121.584 0.0221 0.000 0.112 GET /assets/index.144d8ca8.css HTTP/2.0 5495 131.181 0.0239 0.000 0.136 GET /assets/logo_white.svg HTTP/2.0 5462 92.177 0.0169 0.000 0.112 GET / HTTP/2.0 5427 132.196 0.0244 0.000 0.136 GET /assets/logo_orange.svg HTTP/2.0 5425 916.630 0.1690 0.003 1.001 GET /api/trend HTTP/2.0 1515 141.747 0.0936 0.000 0.826 GET /api/isu HTTP/2.0 1358 27.639 0.0204 0.000 0.120 POST /api/condition/2b97ebce-4ea9-4af6-b6d5-2808fca36fc7 HTTP/2.0 1354 28.862 0.0213 0.000 0.114 POST /api/condition/b3e95a1b-9fa5-444c-88ad-af21d6e4f366 HTTP/2.0 1354 27.967 0.0207 0.000 0.119 POST /api/condition/9460e9b7-5c21-4b2e-8f97-57de97541bff HTTP/2.0 1352 28.078 0.0208 0.000 0.109 POST /api/condition/3dd48f04-d342-4bfa-846d-52d7e826719b HTTP/2.0 1352 27.554 0.0204 0.000 0.116 POST /api/condition/71a4b220-79c0-41a2-b7a3-a8caf473d448 HTTP/2.0 1351 27.545 0.0204 0.000 0.113 POST /api/condition/5526c28b-459d-48b8-8d76-3000518d6be7 HTTP/2.0 1351 28.305 0.0210 0.000 0.113 POST /api/condition/4e285e7c-a65b-47a8-96b6-d221552d6e8e HTTP/2.0 1349 27.912 0.0207 0.000 0.112 POST /api/condition/16f8f562-1544-455e-a27f-f927a4298bee HTTP/2.0 1349 27.837 0.0206 0.000 0.111 POST /api/condition/855cf880-0d8e-44aa-a1be-525f2243c285 HTTP/2.0 1346 27.766 0.0206 0.000 0.113 POST /api/condition/0bfef4f7-6934-4a0e-ba73-40f8bb4c4fd6 HTTP/2.0 1345 28.248 0.0210 0.000 0.103 POST /api/condition/12cf2214-b6d0-4a5a-a40b-80304ee37b7c HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 5425 916.630 0.1690 0.003 1.001 GET /api/trend HTTP/2.0 1515 141.747 0.0936 0.000 0.826 GET /api/isu HTTP/2.0 5495 136.489 0.0248 0.000 0.156 GET /assets/vendor.ee7444dd.js HTTP/2.0 5495 134.204 0.0244 0.000 0.131 GET /assets/index.23dac98b.js HTTP/2.0 5495 133.330 0.0243 0.000 0.131 GET /assets/favicon.d0f5f504.svg HTTP/2.0 5427 132.196 0.0244 0.000 0.136 GET /assets/logo_orange.svg HTTP/2.0 5495 131.181 0.0239 0.000 0.136 GET /assets/logo_white.svg HTTP/2.0 5495 121.584 0.0221 0.000 0.112 GET /assets/index.144d8ca8.css HTTP/2.0 5462 92.177 0.0169 0.000 0.112 GET / HTTP/2.0 1328 29.534 0.0222 0.000 0.115 POST /api/condition/48edacfd-e374-4e7f-bc63-5b2c727efa00 HTTP/2.0 1322 29.478 0.0223 0.000 0.116 POST /api/condition/521d17bd-2e83-461b-abca-81d8e2656a35 HTTP/2.0 1311 29.412 0.0224 0.000 0.116 POST /api/condition/7d566284-aaa7-4f6c-a557-de465d4c1a22 HTTP/2.0 1333 29.388 0.0220 0.000 0.116 POST /api/condition/e447b326-17e7-40c6-b302-0d5b67f5af6d HTTP/2.0 1328 29.368 0.0221 0.000 0.114 POST /api/condition/0722532d-cb63-41dc-82bd-188e87427a7b HTTP/2.0 1318 29.327 0.0223 0.000 0.109 POST /api/condition/f0adb6b0-49d0-4af5-82d8-8c1036531f08 HTTP/2.0 1343 29.308 0.0218 0.000 0.135 POST /api/condition/b877a3e8-9579-492b-a821-0b9510975665 HTTP/2.0 1314 29.255 0.0223 0.000 0.109 POST /api/condition/9d749aa4-73bf-4101-b5dc-0f9b2228260f HTTP/2.0 1321 29.205 0.0221 0.000 0.117 POST /api/condition/b3ebc073-0655-4258-a895-c079be5026cd HTTP/2.0 1325 29.151 0.0220 0.000 0.132 POST /api/condition/757a4155-9c56-4e4e-a9b2-d5fcf09ac671 HTTP/2.0 1334 29.143 0.0218 0.000 0.119 POST /api/condition/670c9da1-0b08-4b57-92d1-2b5f5577b5e0 HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.512 0.5120 0.512 0.512 GET /api/condition/521d17bd-2e83-461b-abca-81d8e2656a35?condition_level=warning%2Ccritical&end_time=1629732434 HTTP/2.0 1 0.476 0.4760 0.476 0.476 GET /api/condition/fbc333a3-a365-4468-ad2d-d104e8f0c7dd?condition_level=info%2Cwarning%2Ccritical&end_time=1629608618 HTTP/2.0 1 0.468 0.4680 0.468 0.468 GET /api/condition/5f8e29e5-cd54-4b78-b3a9-67e347db7ba7?condition_level=info%2Cwarning%2Ccritical&end_time=1629563858 HTTP/2.0 1 0.446 0.4460 0.446 0.446 GET /api/condition/9f44f7cc-db4f-4c19-bef2-f876e9f25dcc?condition_level=info%2Cwarning%2Ccritical&end_time=1629996191 HTTP/2.0 1 0.426 0.4260 0.426 0.426 GET /api/condition/f0adb6b0-49d0-4af5-82d8-8c1036531f08?condition_level=info%2Cwarning%2Ccritical&end_time=1628932489 HTTP/2.0 1 0.399 0.3990 0.399 0.399 GET /api/condition/69e1d697-b532-4b1a-a3fb-09c6f1fbfd9d?condition_level=info%2Cwarning%2Ccritical&end_time=1629249163 HTTP/2.0 1 0.397 0.3970 0.397 0.397 GET /api/condition/c5c4baf9-8fe0-4d9e-8bb6-409a3331089a?condition_level=info%2Cwarning%2Ccritical&end_time=1629722709 HTTP/2.0 1 0.389 0.3890 0.389 0.389 GET /api/condition/e031ad37-ceaa-4750-a27f-5752157a56a3?condition_level=warning%2Ccritical&end_time=1630258087 HTTP/2.0 1 0.387 0.3870 0.387 0.387 GET /api/condition/bc801865-850e-4171-b6da-acaf61a83ad9?condition_level=info%2Cwarning%2Ccritical&end_time=1629519850 HTTP/2.0 1 0.384 0.3840 0.384 0.384 GET /api/condition/176bcd34-1c25-41e4-930b-31bc7bab8510?condition_level=info%2Cwarning%2Ccritical&end_time=1629605504 HTTP/2.0 1 0.382 0.3820 0.382 0.382 GET /api/condition/5cd0727f-b159-4705-884f-2532abf08394?condition_level=info%2Cwarning%2Ccritical&end_time=1629593769 HTTP/2.0 1 0.372 0.3720 0.372 0.372 GET /api/condition/5b6bf2ac-d8ab-4e22-b91c-157be35887a4?condition_level=info%2Cwarning%2Ccritical&end_time=1629551705 HTTP/2.0 1 0.369 0.3690 0.369 0.369 GET /api/isu/5a4ea5d5-160f-4797-bbef-7732daabef04/graph?datetime=1630162800 HTTP/2.0 1 0.365 0.3650 0.365 0.365 GET /api/condition/13fb37d8-10c7-40a6-9b40-cbdcc599d734?condition_level=info%2Cwarning%2Ccritical&end_time=1629830894 HTTP/2.0 1 0.359 0.3590 0.359 0.359 GET /api/isu/03105c1b-9e27-4811-b570-d905330d71ef/graph?datetime=1629644400 HTTP/2.0 1 0.354 0.3540 0.354 0.354 GET /api/condition/13fb37d8-10c7-40a6-9b40-cbdcc599d734?condition_level=info%2Cwarning%2Ccritical&end_time=1630030864 HTTP/2.0 1 0.352 0.3520 0.352 0.352 GET /api/condition/c5d13631-2610-4833-84f7-d29fc2cc814e?condition_level=warning%2Ccritical&end_time=1630077807 HTTP/2.0 1 0.350 0.3500 0.350 0.350 GET /api/isu/7d566284-aaa7-4f6c-a557-de465d4c1a22/graph?datetime=1629298800 HTTP/2.0 1 0.343 0.3430 0.343 0.343 GET /api/isu/83f38803-1d0b-4143-9018-f28511ab5d55/graph?datetime=1629558000 HTTP/2.0 1 0.342 0.3420 0.342 0.342 GET /api/condition/6ac1b8d2-93c0-4a93-8dbb-b4a8a34e8309?condition_level=warning%2Ccritical&end_time=1630267911 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 5425 916.630 0.1690 0.003 1.001 GET /api/trend HTTP/2.0 1515 141.747 0.0936 0.000 0.826 GET /api/isu HTTP/2.0 22 2.222 0.1010 0.019 0.546 GET /api/isu/a1b0d8a7-1b7c-48f9-b71d-560b9598d4b5/icon HTTP/2.0 22 2.236 0.1016 0.016 0.515 GET /api/isu/07299534-7abd-4ecb-b449-3a6d9edd5af5/icon HTTP/2.0 1 0.512 0.5120 0.512 0.512 GET /api/condition/521d17bd-2e83-461b-abca-81d8e2656a35?condition_level=warning%2Ccritical&end_time=1629732434 HTTP/2.0 159 21.725 0.1366 0.001 0.494 POST /api/isu HTTP/2.0 111 4.062 0.0366 0.001 0.485 GET /api/isu/e447b326-17e7-40c6-b302-0d5b67f5af6d/icon HTTP/2.0 1 0.476 0.4760 0.476 0.476 GET /api/condition/fbc333a3-a365-4468-ad2d-d104e8f0c7dd?condition_level=info%2Cwarning%2Ccritical&end_time=1629608618 HTTP/2.0 1 0.468 0.4680 0.468 0.468 GET /api/condition/5f8e29e5-cd54-4b78-b3a9-67e347db7ba7?condition_level=info%2Cwarning%2Ccritical&end_time=1629563858 HTTP/2.0 1 0.446 0.4460 0.446 0.446 GET /api/condition/9f44f7cc-db4f-4c19-bef2-f876e9f25dcc?condition_level=info%2Cwarning%2Ccritical&end_time=1629996191 HTTP/2.0 107 4.878 0.0456 0.002 0.429 GET /api/isu/4e285e7c-a65b-47a8-96b6-d221552d6e8e/icon HTTP/2.0 1 0.426 0.4260 0.426 0.426 GET /api/condition/f0adb6b0-49d0-4af5-82d8-8c1036531f08?condition_level=info%2Cwarning%2Ccritical&end_time=1628932489 HTTP/2.0 293 10.190 0.0348 0.000 0.413 POST /api/signout HTTP/2.0 112 4.463 0.0398 0.001 0.409 GET /api/isu/5cd0727f-b159-4705-884f-2532abf08394/icon HTTP/2.0 1 0.399 0.3990 0.399 0.399 GET /api/condition/69e1d697-b532-4b1a-a3fb-09c6f1fbfd9d?condition_level=info%2Cwarning%2Ccritical&end_time=1629249163 HTTP/2.0 1 0.397 0.3970 0.397 0.397 GET /api/condition/c5c4baf9-8fe0-4d9e-8bb6-409a3331089a?condition_level=info%2Cwarning%2Ccritical&end_time=1629722709 HTTP/2.0 22 2.239 0.1018 0.013 0.396 GET /api/isu/978a431d-e4de-451b-a535-cd09eb463543/icon HTTP/2.0 1 0.389 0.3890 0.389 0.389 GET /api/condition/e031ad37-ceaa-4750-a27f-5752157a56a3?condition_level=warning%2Ccritical&end_time=1630258087 HTTP/2.0 1 0.387 0.3870 0.387 0.387 GET /api/condition/bc801865-850e-4171-b6da-acaf61a83ad9?condition_level=info%2Cwarning%2Ccritical&end_time=1629519850 HTTP/2.0 1 0.384 0.3840 0.384 0.384 GET /api/condition/176bcd34-1c25-41e4-930b-31bc7bab8510?condition_level=info%2Cwarning%2Ccritical&end_time=1629605504 HTTP/2.0 TOP 10 Slow Requests 1 1.001 GET /api/trend HTTP/2.0 2 1.001 GET /api/trend HTTP/2.0 3 1.001 GET /api/trend HTTP/2.0 4 1.000 GET /api/trend HTTP/2.0 5 0.999 GET /api/trend HTTP/2.0 6 0.909 GET /api/trend HTTP/2.0 7 0.896 GET /api/trend HTTP/2.0 8 0.893 GET /api/trend HTTP/2.0 9 0.893 GET /api/trend HTTP/2.0 10 0.892 GET /api/trend HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 106.67 QPS, 0.09x concurrency, ID 0x2F41D2845C2FE2CBFD50AB76F51B65D9 at byte 2642639 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 8 6400 # Exec time 35 6s 9us 37ms 876us 3ms 2ms 84us # Lock time 12 181ms 0 8ms 28us 49us 162us 0 # Rows sent 2 25.25k 1 17 4.04 7.70 2.30 3.89 # Rows examine 56 630.53k 0 366 100.89 363.48 128.27 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 50 648.26M 5.61k 416.68k 103.72k 222.42k 71.25k 79.83k # Query size 11 896.00k 140 146 143.36 143.84 3 136.99 # Boolean: # QC hit 53% yes, 46% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ####################### # 1ms #################################### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # SHOW TABLE STATUS FROM `isucondition` LIKE 'latest_isu_level'\G # SHOW CREATE TABLE `isucondition`.`latest_isu_level`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT a.*, b.level, b.timestamp FROM `isu` a JOIN `latest_isu_level` b ON a.jia_isu_uuid = b.jia_isu_uuid WHERE a.`character` = 'やんちゃ'\G # Query 2: 78.12 QPS, 0.03x concurrency, ID 0x928E21E81CD470548A56AA26A02EF04A at byte 24718966 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 6 4687 # Exec time 11 2s 108us 26ms 379us 725us 883us 224us # Lock time 17 253ms 20us 10ms 53us 57us 208us 40us # Rows sent 9 88.50k 0 20 19.33 19.46 3.16 19.46 # Rows examine 8 99.35k 0 388 21.71 19.46 16.88 19.46 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 18.49M 663 5.10k 4.04k 4.49k 626.37 4.07k # Query size 12 971.38k 205 213 212.22 212.52 3.00 212.52 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################################################################ # 1ms ## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '5526c28b-459d-48b8-8d76-3000518d6be7' AND `timestamp` < '2021-08-15 10:48:30' AND `level` IN ('critical', 'info', 'warning') ORDER BY `timestamp` DESC LIMIT 20\G # Query 3: 125.20 QPS, 0.03x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 2669302 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 10 7512 # Exec time 11 2s 5us 21ms 230us 403us 818us 131us # Lock time 18 267ms 0 14ms 35us 44us 214us 30us # Rows sent 0 7.11k 0 1 0.97 0.99 0.17 0.99 # Rows examine 0 5.54k 0 1 0.76 0.99 0.43 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 5.99M 663 891 835.82 833.10 34.47 833.10 # Query size 11 916.99k 125 125 125 125 0 125 # Boolean: # QC hit 22% yes, 77% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################### # 100us ################################################################ # 1ms ## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '5cd0727f-b159-4705-884f-2532abf08394' ORDER BY `timestamp` DESC LIMIT 1\G # Query 4: 24.18 QPS, 0.02x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 61994182 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1451 # Exec time 8 1s 7us 29ms 901us 3ms 2ms 113us # Lock time 1 28ms 0 3ms 19us 38us 89us 0 # Rows sent 79 715.31k 6 1.34k 504.81 1.14k 347.00 420.77 # Rows examine 26 300.98k 0 1.34k 212.41 964.41 321.82 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 9 126.26M 1.76k 242.27k 89.10k 201.74k 61.05k 76.03k # Query size 2 164.37k 116 116 116 116 0 116 # Boolean: # QC hit 53% yes, 46% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ##################################### # 1ms ################################# # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '4566ec10-9d1d-46fc-b8e1-693acb71f6c5' ORDER BY `timestamp` ASC\G # Query 5: 239.40 QPS, 0.02x concurrency, ID 0x88716D544EA925A1EE9114761B982E3E at byte 13080960 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 19 14364 # Exec time 8 1s 8us 19ms 87us 93us 561us 19us # Lock time 16 238ms 0 14ms 16us 33us 186us 0 # Rows sent 1 14.02k 0 1 1.00 0.99 0.02 0.99 # Rows examine 0 4.37k 0 1 0.31 0.99 0.46 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 785.48k 50 56 56.00 54.21 0.13 54.21 # Query size 15 1.22M 89 89 89 89 0 89 # Boolean: # QC hit 68% yes, 31% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '03105c1b-9e27-4811-b570-d905330d71ef' LIMIT 1\G # Query 6: 151.33 QPS, 0.02x concurrency, ID 0xB5F4855605637317357023AD70B91455 at byte 24381137 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 12 9080 # Exec time 7 1s 8us 28ms 135us 194us 785us 26us # Lock time 11 157ms 0 8ms 17us 33us 172us 0 # Rows sent 0 8.80k 0 1 0.99 0.99 0.08 0.99 # Rows examine 0 3.07k 0 1 0.35 0.99 0.47 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 18 232.73M 77 132.17k 26.25k 83.83k 25.11k 17.59k # Query size 14 1.08M 116 129 124.39 124.25 3.60 124.25 # Boolean: # QC hit 64% yes, 35% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ####################### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT `image` FROM `isu` WHERE `jia_user_id` = 'dazzling_carver' AND `jia_isu_uuid` = 'f25d395e-b7cb-41da-be8f-6e195b3ee399'\G # Query 7: 24.70 QPS, 0.01x concurrency, ID 0x20183D6FD015A9A0A6C4FB46B2683CF0 at byte 46839061 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 1482 # Exec time 5 830ms 10us 30ms 560us 1ms 1ms 89us # Lock time 3 45ms 0 8ms 30us 31us 345us 0 # Rows sent 0 7.34k 0 9 5.07 8.91 2.60 5.75 # Rows examine 6 75.24k 0 183 51.99 174.84 67.67 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 15 191.70M 501 340.54k 132.46k 283.86k 78.08k 112.33k # Query size 1 111.91k 69 82 77.32 80.10 3.75 76.28 # Boolean: # QC hit 61% yes, 38% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ####################################### # 1ms ################# # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'priceless_banach' ORDER BY `id` DESC\G # Query 8: 329.98 QPS, 0.01x concurrency, ID 0x7EC46C3D52058132BA4D921BE7986B53 at byte 13080647 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 26 19799 # Exec time 4 673ms 5us 18ms 34us 23us 340us 12us # Lock time 2 30ms 0 7ms 1us 0 70us 0 # Rows sent 2 19.33k 1 1 1 1 0 1 # Rows examine 0 288 0 1 0.01 0 0.12 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 1.06M 56 56 56 56 0 56 # Query size 16 1.27M 59 72 67.42 69.19 3.27 65.89 # Boolean: # QC hit 98% yes, 1% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ######## # 10us ################################################################ # 100us # # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'user'\G # SHOW CREATE TABLE `isucondition`.`user`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `user` WHERE `jia_user_id` = 'priceless_banach' LIMIT 1\G # Query 9: 86.85 QPS, 0.01x concurrency, ID 0x262764FE7CE586B417A1206082D32E11 at byte 41430026 # Scores: V/M = 0.00 # Time range: 2022-06-30 21:03:30 to 21:04:30 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 7 5211 # Exec time 2 465ms 5us 18ms 89us 125us 579us 13us # Lock time 5 75ms 0 11ms 14us 33us 171us 0 # Rows sent 0 5.02k 0 1 0.99 0.99 0.11 0.99 # Rows examine 0 1.37k 0 1 0.27 0.99 0.44 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 506.03k 75 116 99.44 112.70 6.29 97.36 # Query size 7 618.03k 113 126 121.45 124.25 3.78 118.34 # Boolean: # QC hit 71% yes, 28% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ####### # 10us ################################################################ # 100us ########## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT name FROM `isu` WHERE `jia_isu_uuid` = '9598c748-982b-4314-ba26-290f09f0b6fa' AND `jia_user_id` = 'intelligent_shirley'\G ```

246da81f4ec6b8fb323582ed8cfcc95b0548944c

karamaru-alpha commented 2 years ago

nginxで静的配信 20360

13

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 11541 947.068 0.0821 0.000 0.451 GET /api/trend HTTP/2.0 1175 38.875 0.0331 0.000 0.290 GET /api/isu HTTP/2.0 947 6.852 0.0072 0.000 0.194 POST /api/condition/b6fdd2e9-2fae-4e90-a68d-df7f7561edfc HTTP/2.0 931 6.655 0.0071 0.000 0.158 POST /api/condition/fd11f898-7dd0-4383-a21a-cf918003b11b HTTP/2.0 930 7.179 0.0077 0.000 0.209 POST /api/condition/654c675e-a162-4f4b-92f1-880a76e9f171 HTTP/2.0 928 6.753 0.0073 0.000 0.166 POST /api/condition/6f7a9c5c-3c00-4382-8103-fe3f96896855 HTTP/2.0 926 6.500 0.0070 0.000 0.126 POST /api/condition/a7e2ff12-7e54-4b0e-a183-8dc81a5faf10 HTTP/2.0 924 7.317 0.0079 0.000 0.192 POST /api/condition/cf7535f4-0995-4d15-85ee-2f7be1d4e97f HTTP/2.0 924 7.021 0.0076 0.000 0.142 POST /api/condition/e552258f-3c1c-4a1d-9488-adfd25b9769b HTTP/2.0 923 7.661 0.0083 0.000 0.221 POST /api/condition/729fc769-810a-4392-81fa-0491f178dd2b HTTP/2.0 923 6.987 0.0076 0.000 0.149 POST /api/condition/823c597f-d39f-48ae-a097-5bfb04d7bdb4 HTTP/2.0 923 7.132 0.0077 0.000 0.202 POST /api/condition/234aa0f3-7cba-4aa6-bee7-f77b709e3c2f HTTP/2.0 923 7.464 0.0081 0.000 0.282 POST /api/condition/470d0ac3-9e59-46d3-8d8d-0f466f855076 HTTP/2.0 923 7.106 0.0077 0.000 0.177 POST /api/condition/03416413-8f9d-4189-8299-6087e47ce0e1 HTTP/2.0 922 6.217 0.0067 0.000 0.117 POST /api/condition/256d43f7-d030-4cfe-9044-fdb9ea7b95a3 HTTP/2.0 922 7.741 0.0084 0.000 0.162 POST /api/condition/849d6457-8052-48c9-beb0-2c523bff4e05 HTTP/2.0 921 6.947 0.0075 0.000 0.277 POST /api/condition/5b26c883-f4b8-4c1f-993a-62d0c9d15f1d HTTP/2.0 919 8.256 0.0090 0.000 0.336 POST /api/condition/b98558ca-ef92-4c57-8179-4fb6ec8b8381 HTTP/2.0 918 7.627 0.0083 0.000 0.319 POST /api/condition/001065ec-6198-4aed-8693-61e2fdf5b159 HTTP/2.0 917 7.532 0.0082 0.000 0.243 POST /api/condition/8ca1d281-585c-4fa6-ba4d-4efe6c2c3634 HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 11541 947.068 0.0821 0.000 0.451 GET /api/trend HTTP/2.0 206 43.479 0.2111 0.000 0.684 POST /api/isu HTTP/2.0 1175 38.875 0.0331 0.000 0.290 GET /api/isu HTTP/2.0 892 8.323 0.0093 0.000 0.305 POST /api/condition/b0e19eb5-ada1-40b8-97f7-2231cce26899 HTTP/2.0 919 8.256 0.0090 0.000 0.336 POST /api/condition/b98558ca-ef92-4c57-8179-4fb6ec8b8381 HTTP/2.0 910 8.183 0.0090 0.000 0.197 POST /api/condition/5601c8dc-64bd-485c-b3be-cd1c8724ce7a HTTP/2.0 790 8.135 0.0103 0.000 0.383 POST /api/condition/fe9b0bea-dea8-4d74-ae31-11d43429ecb8 HTTP/2.0 899 7.788 0.0087 0.000 0.222 POST /api/condition/f7c6949d-dc5c-429f-8d2d-f00f9ee82ac3 HTTP/2.0 907 7.755 0.0086 0.000 0.411 POST /api/condition/d24f8b1e-d8e8-4a35-91e7-547cd931ad26 HTTP/2.0 922 7.741 0.0084 0.000 0.162 POST /api/condition/849d6457-8052-48c9-beb0-2c523bff4e05 HTTP/2.0 900 7.723 0.0086 0.000 0.220 POST /api/condition/f7287278-3517-44d8-92d9-f626c7b78f7a HTTP/2.0 902 7.702 0.0085 0.000 0.209 POST /api/condition/07f51ae5-a46f-4c5a-8d43-48af9625f776 HTTP/2.0 923 7.661 0.0083 0.000 0.221 POST /api/condition/729fc769-810a-4392-81fa-0491f178dd2b HTTP/2.0 918 7.627 0.0083 0.000 0.319 POST /api/condition/001065ec-6198-4aed-8693-61e2fdf5b159 HTTP/2.0 913 7.601 0.0083 0.000 0.274 POST /api/condition/3e5829e7-4980-45e8-b695-23398a412d13 HTTP/2.0 900 7.577 0.0084 0.000 0.134 POST /api/condition/99d744ed-6f4e-4889-85ff-8a45c4cda494 HTTP/2.0 908 7.558 0.0083 0.000 0.222 POST /api/condition/fae7801c-085d-489d-ad4c-cce87955d7e1 HTTP/2.0 917 7.532 0.0082 0.000 0.243 POST /api/condition/8ca1d281-585c-4fa6-ba4d-4efe6c2c3634 HTTP/2.0 911 7.509 0.0082 0.000 0.205 POST /api/condition/6888923f-d9d3-4262-b120-427518152bcb HTTP/2.0 897 7.496 0.0084 0.000 0.145 POST /api/condition/a6688277-b75a-4860-bca7-04d7cfe4ffe8 HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.282 0.2820 0.282 0.282 POST /initialize HTTP/2.0 1 0.280 0.2800 0.280 0.280 GET /api/condition/fd11f898-7dd0-4383-a21a-cf918003b11b?condition_level=info%2Cwarning%2Ccritical&end_time=1629903674 HTTP/2.0 1 0.272 0.2720 0.272 0.272 GET /api/condition/8ae52811-bba0-4480-89a8-038dfed72d36?condition_level=info%2Cwarning%2Ccritical&end_time=1629772978 HTTP/2.0 1 0.270 0.2700 0.270 0.270 GET /api/condition/01b0ab4c-f09c-433e-8fe8-e6c6f588abbe?condition_level=info%2Cwarning%2Ccritical&end_time=1629923525 HTTP/2.0 1 0.269 0.2690 0.269 0.269 GET /api/isu/c60c4873-102b-4cd0-8ac0-5b3ac4011c01/graph?datetime=1629644400 HTTP/2.0 1 0.258 0.2580 0.258 0.258 GET /api/condition/616c74f9-aa3f-4fcd-8ad4-aabf36babec3?condition_level=info%2Cwarning%2Ccritical&end_time=1629465744 HTTP/2.0 1 0.245 0.2450 0.245 0.245 GET /api/condition/8ae52811-bba0-4480-89a8-038dfed72d36?condition_level=info%2Cwarning%2Ccritical&end_time=1629820800&start_time=1629817200 HTTP/2.0 1 0.225 0.2250 0.225 0.225 GET /api/isu/fb92f454-8dbd-4163-a7e8-41aca13d28cb/graph?datetime=1629903600 HTTP/2.0 206 43.479 0.2111 0.000 0.684 POST /api/isu HTTP/2.0 1 0.208 0.2080 0.208 0.208 GET /api/condition/8285a8e6-ed45-42ad-b4b5-9ab477abac40?condition_level=info%2Cwarning%2Ccritical&end_time=1629095128 HTTP/2.0 1 0.207 0.2070 0.207 0.207 GET /api/isu/a6ea4609-3583-4a42-a350-a8762e00d84e/graph?datetime=1629817200 HTTP/2.0 1 0.198 0.1980 0.198 0.198 GET /api/isu/506fa2d9-59c2-49e0-90ee-1f1184be504c/graph?datetime=1629644400 HTTP/2.0 1 0.196 0.1960 0.196 0.196 GET /api/condition/e35aa2f9-b5fc-4a6a-aa75-80f5f7db3d1a?condition_level=info%2Cwarning%2Ccritical&end_time=1630030812 HTTP/2.0 1 0.190 0.1900 0.190 0.190 GET /api/condition/41ed9676-3a05-4a71-ad5b-2122275777c6?condition_level=info%2Cwarning%2Ccritical&end_time=1629876159 HTTP/2.0 1 0.184 0.1840 0.184 0.184 GET /api/isu/d7f3c731-a3e5-4f5d-858b-3a1fe4caac20/graph?datetime=1629212400 HTTP/2.0 1 0.183 0.1830 0.183 0.183 GET /api/condition/d55c9eb5-0f5a-4cdc-9809-00244643091e?condition_level=info%2Cwarning%2Ccritical&end_time=1629655076 HTTP/2.0 1 0.183 0.1830 0.183 0.183 GET /api/isu/64680d77-7e72-48f6-a295-cd983044c7f6/graph?datetime=1629817200 HTTP/2.0 1 0.179 0.1790 0.179 0.179 GET /api/condition/7f804b33-3abb-41a3-b99d-c989229ecdf9?condition_level=info%2Cwarning%2Ccritical&end_time=1629185426 HTTP/2.0 1 0.178 0.1780 0.178 0.178 GET /api/isu/07f51ae5-a46f-4c5a-8d43-48af9625f776/graph?datetime=1629212400 HTTP/2.0 1 0.177 0.1770 0.177 0.177 GET /api/condition/09a30385-0754-46ba-93e7-5a1c34de4666?condition_level=info%2Cwarning%2Ccritical&end_time=1629574678 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 206 43.479 0.2111 0.000 0.684 POST /api/isu HTTP/2.0 91 1.900 0.0209 0.000 0.490 POST /api/condition/c2935b65-2e55-4848-8d2a-5d13558f694f HTTP/2.0 104 2.363 0.0227 0.000 0.488 POST /api/condition/5c7896db-dfb4-4baf-9084-3dde5029ee8f HTTP/2.0 67 1.024 0.0153 0.000 0.483 POST /api/condition/8519123c-e23a-48b5-97d0-efd9c1b4d690 HTTP/2.0 220 3.431 0.0156 0.000 0.471 POST /api/condition/6badb6c3-02ab-44c4-8dcd-d74af2c5a700 HTTP/2.0 913 7.399 0.0081 0.000 0.466 POST /api/condition/0cb3b39d-79f2-4337-9ea3-e1edcf653fd5 HTTP/2.0 392 4.422 0.0113 0.000 0.465 POST /api/condition/6e282a5e-30eb-49fd-97b6-5335d5796d98 HTTP/2.0 11541 947.068 0.0821 0.000 0.451 GET /api/trend HTTP/2.0 907 7.755 0.0086 0.000 0.411 POST /api/condition/d24f8b1e-d8e8-4a35-91e7-547cd931ad26 HTTP/2.0 89 2.123 0.0239 0.000 0.402 POST /api/condition/e640cfab-cf1f-4f66-9c48-b38cdf79f0ed HTTP/2.0 229 3.533 0.0154 0.000 0.384 POST /api/condition/f17968a3-c42f-44ee-9328-a3010508bb85 HTTP/2.0 202 3.568 0.0177 0.000 0.383 POST /api/condition/e8eb45a1-7fbf-4ba8-929a-b34245e5e0f8 HTTP/2.0 790 8.135 0.0103 0.000 0.383 POST /api/condition/fe9b0bea-dea8-4d74-ae31-11d43429ecb8 HTTP/2.0 643 6.916 0.0108 0.000 0.381 POST /api/condition/b6037b1d-4119-48d2-a127-c262037e30f6 HTTP/2.0 258 3.747 0.0145 0.000 0.375 POST /api/condition/14c15c89-6a55-4c8e-85d1-acc56c6af157 HTTP/2.0 47 1.141 0.0243 0.001 0.363 GET /api/isu/78ba141a-4863-4744-a5af-5a643339fd5d/icon HTTP/2.0 49 1.121 0.0229 0.000 0.362 GET /api/isu/7eb9d102-9fd7-4d43-a641-a0fb38060e5c/icon HTTP/2.0 133 2.123 0.0160 0.000 0.340 POST /api/condition/0cf24cf0-a949-4f17-b404-6b001ca08b90 HTTP/2.0 919 8.256 0.0090 0.000 0.336 POST /api/condition/b98558ca-ef92-4c57-8179-4fb6ec8b8381 HTTP/2.0 18 0.709 0.0394 0.006 0.322 GET /api/isu/f07503ed-05e8-457e-a14f-ad034e3642a2/icon HTTP/2.0 TOP 10 Slow Requests 1 0.684 POST /api/isu HTTP/2.0 2 0.651 POST /api/isu HTTP/2.0 3 0.531 POST /api/isu HTTP/2.0 4 0.528 POST /api/isu HTTP/2.0 5 0.519 POST /api/isu HTTP/2.0 6 0.499 POST /api/isu HTTP/2.0 7 0.491 POST /api/isu HTTP/2.0 8 0.490 POST /api/condition/c2935b65-2e55-4848-8d2a-5d13558f694f HTTP/2.0 9 0.488 POST /api/isu HTTP/2.0 10 0.488 POST /api/condition/5c7896db-dfb4-4baf-9084-3dde5029ee8f HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 353.75 QPS, 0.29x concurrency, ID 0x2F41D2845C2FE2CBFD50AB76F51B65D9 at byte 58640262 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 30 21225 # Exec time 55 17s 11us 50ms 822us 4ms 2ms 60us # Lock time 19 506ms 0 13ms 23us 57us 177us 0 # Rows sent 15 92.63k 1 15 4.47 8.91 2.42 3.89 # Rows examine 81 1.49M 0 450 73.75 346.17 125.51 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 83 2.32G 5.61k 391.20k 114.53k 233.54k 66.42k 101.89k # Query size 37 2.90M 140 146 143.36 143.84 3 136.99 # Boolean: # QC hit 71% yes, 28% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ################################################################ # 100us ########## # 1ms ##################### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # SHOW TABLE STATUS FROM `isucondition` LIKE 'latest_isu_level'\G # SHOW CREATE TABLE `isucondition`.`latest_isu_level`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT a.*, b.level, b.timestamp FROM `isu` a JOIN `latest_isu_level` b ON a.jia_isu_uuid = b.jia_isu_uuid WHERE a.`character` = 'なまいき'\G # Query 2: 119.43 QPS, 0.04x concurrency, ID 0xB5F4855605637317357023AD70B91455 at byte 44708118 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 10 7166 # Exec time 7 2s 7us 29ms 318us 972us 1ms 80us # Lock time 14 378ms 0 29ms 52us 47us 544us 19us # Rows sent 1 6.95k 0 1 0.99 0.99 0.08 0.99 # Rows examine 0 3.64k 0 1 0.52 0.99 0.50 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 6 180.01M 77 132.17k 25.72k 79.83k 24.33k 18.47k # Query size 10 865.31k 116 131 123.65 124.25 3.80 118.34 # Boolean: # QC hit 47% yes, 52% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ######################################### # 1ms ##### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT `image` FROM `isu` WHERE `jia_user_id` = 'mystifying_bhaskara' AND `jia_isu_uuid` = 'bd385922-67ab-44c4-90dd-f58dcead3788'\G # Query 3: 98.03 QPS, 0.04x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 53772309 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 8 5882 # Exec time 6 2s 6us 48ms 375us 1ms 1ms 131us # Lock time 14 370ms 0 12ms 62us 69us 395us 30us # Rows sent 0 5.50k 0 1 0.96 0.99 0.20 0.99 # Rows examine 0 4.35k 0 1 0.76 0.99 0.43 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 4.68M 663 891 833.45 833.10 38.66 833.10 # Query size 9 718.02k 125 125 125 125 0 125 # Boolean: # QC hit 22% yes, 77% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################### # 100us ################################################################ # 1ms ##### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '09a30385-0754-46ba-93e7-5a1c34de4666' ORDER BY `timestamp` DESC LIMIT 1\G # Query 4: 48.83 QPS, 0.03x concurrency, ID 0x928E21E81CD470548A56AA26A02EF04A at byte 59065318 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 4 2930 # Exec time 6 2s 131us 46ms 656us 2ms 2ms 247us # Lock time 10 265ms 22us 46ms 90us 119us 886us 42us # Rows sent 9 54.06k 0 20 18.89 19.46 4.09 19.46 # Rows examine 3 61.37k 0 350 21.45 19.46 15.76 19.46 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 11.32M 663 5.10k 3.96k 4.49k 784.73 4.07k # Query size 7 606.82k 205 213 212.08 212.52 3.23 212.52 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################################################################ # 1ms ###### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '0ea8ad12-bbb0-4c54-8fef-c170f4339cf5' AND `timestamp` < '2021-08-18 00:26:21' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20\G # Query 5: 146.23 QPS, 0.03x concurrency, ID 0x88716D544EA925A1EE9114761B982E3E at byte 57735840 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 12 8774 # Exec time 5 2s 9us 42ms 199us 348us 1ms 73us # Lock time 20 549ms 0 28ms 62us 60us 546us 25us # Rows sent 1 8.56k 0 1 1.00 0.99 0.02 0.99 # Rows examine 0 5.55k 0 1 0.65 0.99 0.47 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 479.80k 50 56 56.00 54.21 0.12 54.21 # Query size 9 762.58k 89 89 89 89 0 89 # Boolean: # QC hit 35% yes, 64% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ############### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '09a30385-0754-46ba-93e7-5a1c34de4666' LIMIT 1\G # Query 6: 19.20 QPS, 0.03x concurrency, ID 0x20183D6FD015A9A0A6C4FB46B2683CF0 at byte 25169825 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1152 # Exec time 5 2s 9us 28ms 1ms 7ms 3ms 690us # Lock time 1 38ms 0 10ms 32us 47us 291us 21us # Rows sent 0 5.74k 0 9 5.11 8.91 2.64 5.75 # Rows examine 4 91.08k 0 228 80.96 202.40 75.37 84.10 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 5 148.61M 501 373.34k 132.10k 233.54k 70.83k 143.37k # Query size 1 86.57k 69 84 76.95 80.10 3.43 76.28 # Boolean: # QC hit 42% yes, 57% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ####################################################### # 1ms ########################################################### # 10ms #### # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'gifted_meninsky' ORDER BY `id` DESC\G # Query 7: 18.75 QPS, 0.02x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 52751921 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1125 # Exec time 3 1s 9us 46ms 1ms 4ms 3ms 176us # Lock time 1 30ms 0 4ms 26us 44us 142us 0 # Rows sent 67 397.05k 6 1.06k 361.40 793.42 252.12 299.03 # Rows examine 9 186.10k 0 1.06k 169.39 755.64 246.82 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 2 69.84M 1.71k 185.38k 63.57k 143.37k 43.85k 54.03k # Query size 1 127.44k 116 116 116 116 0 116 # Boolean: # QC hit 50% yes, 49% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us #################################### # 1ms ################################# # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '3d28dd71-2910-45b4-b8a6-0966683e73c0' ORDER BY `timestamp` ASC\G # Query 8: 55.30 QPS, 0.02x concurrency, ID 0x262764FE7CE586B417A1206082D32E11 at byte 34209977 # Scores: V/M = 0.01 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 4 3318 # Exec time 3 1s 5us 25ms 349us 1ms 2ms 76us # Lock time 9 236ms 0 21ms 71us 54us 688us 22us # Rows sent 0 3.20k 0 1 0.99 0.99 0.12 0.99 # Rows examine 0 1.69k 0 1 0.52 0.99 0.50 0.99 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 322.22k 75 119 99.44 102.22 5.49 97.36 # Query size 4 390.82k 113 128 120.61 124.25 2.91 118.34 # Boolean: # QC hit 46% yes, 53% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ##### # 10us ################################################################ # 100us ######################## # 1ms #### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT name FROM `isu` WHERE `jia_isu_uuid` = '001065ec-6198-4aed-8693-61e2fdf5b159' AND `jia_user_id` = 'serene_elion'\G # Query 9: 247.60 QPS, 0.01x concurrency, ID 0x7EC46C3D52058132BA4D921BE7986B53 at byte 56831162 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:10:21 to 13:11:21 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 21 14856 # Exec time 2 838ms 5us 20ms 56us 76us 462us 14us # Lock time 2 68ms 0 20ms 4us 0 201us 0 # Rows sent 2 14.51k 1 1 1 1 0 1 # Rows examine 0 403 0 1 0.03 0 0.16 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 812.44k 56 56 56 56 0 56 # Query size 12 967.60k 59 74 66.69 69.19 3.34 65.89 # Boolean: # QC hit 97% yes, 2% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ### # 10us ################################################################ # 100us ## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'user'\G # SHOW CREATE TABLE `isucondition`.`user`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `user` WHERE `jia_user_id` = 'quirky_turing' LIMIT 1\G ```

1427bcab18159f0b3d49d93110b4107538a49220

karamaru-alpha commented 2 years ago

trendをproxyCache 26037

14

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 14277 16.034 0.0011 0.000 0.168 GET /api/trend HTTP/2.0 1975 20.326 0.0103 0.000 0.081 GET /api/isu HTTP/2.0 1418 4.616 0.0033 0.000 0.076 POST /api/condition/b7fb7ab8-053d-4dbf-a0e7-537d0c6b704d HTTP/2.0 1403 4.876 0.0035 0.000 0.047 POST /api/condition/4f6a83f4-952b-49a3-bbb1-d902812020d1 HTTP/2.0 1403 4.745 0.0034 0.000 0.067 POST /api/condition/60e5a49e-6d14-4130-aba3-acd2b73b93f7 HTTP/2.0 1401 5.063 0.0036 0.000 0.049 POST /api/condition/bb8edc1d-6d9e-4912-b262-2d1b3e44f8d2 HTTP/2.0 1400 4.598 0.0033 0.000 0.045 POST /api/condition/c633f1ea-0b9b-4798-83dc-2e2c7aa52d5b HTTP/2.0 1398 5.114 0.0037 0.000 0.056 POST /api/condition/606ebe52-7438-41db-8ba4-583b3672e262 HTTP/2.0 1396 5.309 0.0038 0.000 0.049 POST /api/condition/baccf587-23a8-4b08-98f0-7e1943b14ca4 HTTP/2.0 1396 4.970 0.0036 0.000 0.060 POST /api/condition/46b71474-d361-4ece-86d1-d6d630433df0 HTTP/2.0 1395 4.829 0.0035 0.000 0.062 POST /api/condition/2319c987-0439-4ade-9ebc-6b70c07caad7 HTTP/2.0 1395 5.110 0.0037 0.000 0.071 POST /api/condition/ce968a52-9562-4a90-a87b-1d8506823800 HTTP/2.0 1395 4.891 0.0035 0.000 0.078 POST /api/condition/f23903c3-2c54-4ec0-a192-f7e8824082f2 HTTP/2.0 1394 4.731 0.0034 0.000 0.051 POST /api/condition/9356ecea-a074-4832-b9e4-43a1c77ea34a HTTP/2.0 1393 4.872 0.0035 0.000 0.083 POST /api/condition/042eb7fa-46de-4bcf-b053-274056260257 HTTP/2.0 1391 5.046 0.0036 0.000 0.073 POST /api/condition/3e9fd770-4d77-437c-956e-9c6ec39d9922 HTTP/2.0 1390 5.323 0.0038 0.000 0.070 POST /api/condition/3dad2755-33c4-4e77-999b-0678f1990793 HTTP/2.0 1390 4.748 0.0034 0.000 0.046 POST /api/condition/78b5a565-1bbd-4530-b6d2-b35efdce43b0 HTTP/2.0 1388 5.273 0.0038 0.000 0.075 POST /api/condition/606b58dd-3529-45be-b896-b8270f8ba824 HTTP/2.0 1388 4.857 0.0035 0.000 0.062 POST /api/condition/e5df9300-5aef-450f-b3f4-8b7f2264398a HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 1975 20.326 0.0103 0.000 0.081 GET /api/isu HTTP/2.0 14277 16.034 0.0011 0.000 0.168 GET /api/trend HTTP/2.0 73 6.639 0.0909 0.000 0.186 POST /api/isu HTTP/2.0 1387 6.062 0.0044 0.000 0.075 POST /api/condition/8c14cbe9-dba8-4a17-a391-c4ff9749bd7d HTTP/2.0 1375 6.003 0.0044 0.000 0.076 POST /api/condition/1b0466a9-ebfd-4bec-8a26-f802ae492b2c HTTP/2.0 1360 5.963 0.0044 0.000 0.058 POST /api/condition/57341811-673f-442d-bff9-197cf7671d9b HTTP/2.0 1376 5.916 0.0043 0.000 0.065 POST /api/condition/743a792f-e9fc-4187-87cc-5d8414b5d194 HTTP/2.0 1380 5.855 0.0042 0.000 0.068 POST /api/condition/114021e4-e203-4682-a485-860b90a1da67 HTTP/2.0 1380 5.820 0.0042 0.000 0.068 POST /api/condition/b63aa1da-03d1-4615-9db5-eb2f2889e2bf HTTP/2.0 1384 5.742 0.0041 0.000 0.094 POST /api/condition/f19886d7-c71e-4882-9c0c-a8398c56dce0 HTTP/2.0 1378 5.733 0.0042 0.000 0.061 POST /api/condition/e5372fb4-0187-4067-bcca-a743e8c616cb HTTP/2.0 1377 5.719 0.0042 0.000 0.088 POST /api/condition/dd740e8d-7fa2-4d83-9ea4-0015d5852437 HTTP/2.0 1385 5.695 0.0041 0.000 0.076 POST /api/condition/0b34a4fc-cd6e-4946-bd0b-b05c0c67e837 HTTP/2.0 1382 5.648 0.0041 0.000 0.082 POST /api/condition/3ec09571-060c-4c65-b8ae-0e634108f4c3 HTTP/2.0 1373 5.607 0.0041 0.000 0.049 POST /api/condition/8e90adf8-dcd7-47f1-a24d-c6b0d56bfb48 HTTP/2.0 1375 5.573 0.0041 0.000 0.076 POST /api/condition/be525d45-f6a3-441d-8eab-00c047f9a5b4 HTTP/2.0 1375 5.533 0.0040 0.000 0.076 POST /api/condition/5280783c-9f3d-4714-838d-1f3b647bf723 HTTP/2.0 1384 5.532 0.0040 0.000 0.076 POST /api/condition/2a6047d0-72f1-4964-badd-ed40d992e626 HTTP/2.0 1379 5.474 0.0040 0.000 0.053 POST /api/condition/9ba2557e-79d2-4452-8749-5843b3ab8b88 HTTP/2.0 1378 5.363 0.0039 0.000 0.060 POST /api/condition/e99693e2-0660-4e47-a004-2f3461c637e9 HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.276 0.2760 0.276 0.276 POST /initialize HTTP/2.0 73 6.639 0.0909 0.000 0.186 POST /api/isu HTTP/2.0 1 0.084 0.0840 0.084 0.084 GET /api/isu/d9b45796-c456-4b6b-a1b5-432590f54bd5/graph?datetime=1630162800 HTTP/2.0 1 0.074 0.0740 0.074 0.074 GET /api/condition/19a42fa7-9998-4281-b897-d134c4452ebe?condition_level=info%2Cwarning%2Ccritical&end_time=1630024590 HTTP/2.0 1 0.074 0.0740 0.074 0.074 GET /api/isu/9f384da1-93a1-44a5-b9e0-ecdb117e3ba7/graph?datetime=1629990000 HTTP/2.0 1 0.072 0.0720 0.072 0.072 GET /api/isu/606b58dd-3529-45be-b896-b8270f8ba824/graph?datetime=1629990000 HTTP/2.0 1 0.070 0.0700 0.070 0.070 GET /api/isu/46b71474-d361-4ece-86d1-d6d630433df0/graph?datetime=1629644400 HTTP/2.0 1 0.068 0.0680 0.068 0.068 GET /api/condition/78b5a565-1bbd-4530-b6d2-b35efdce43b0?condition_level=info%2Cwarning%2Ccritical&end_time=1629947095 HTTP/2.0 1 0.067 0.0670 0.067 0.067 GET /api/condition/dd740e8d-7fa2-4d83-9ea4-0015d5852437?condition_level=info%2Cwarning%2Ccritical&end_time=1630195554 HTTP/2.0 1 0.066 0.0660 0.066 0.066 GET /api/condition/76a4d2fe-c79e-442d-b629-1d639e8c4749?condition_level=info%2Cwarning%2Ccritical&end_time=1629538854 HTTP/2.0 1 0.066 0.0660 0.066 0.066 GET /api/isu/606ebe52-7438-41db-8ba4-583b3672e262/graph?datetime=1629385200 HTTP/2.0 1 0.065 0.0650 0.065 0.065 GET /api/isu/57341811-673f-442d-bff9-197cf7671d9b/graph?datetime=1629903600 HTTP/2.0 1 0.064 0.0640 0.064 0.064 GET /api/isu/3ec09571-060c-4c65-b8ae-0e634108f4c3/graph?datetime=1629903600 HTTP/2.0 1 0.064 0.0640 0.064 0.064 GET /api/condition/3dad2755-33c4-4e77-999b-0678f1990793?condition_level=info%2Cwarning%2Ccritical&end_time=1630018822 HTTP/2.0 1 0.062 0.0620 0.062 0.062 GET /api/isu/9aa5933d-9fad-47b1-821c-2629c97f76a6/graph?datetime=1629903600 HTTP/2.0 1 0.062 0.0620 0.062 0.062 GET /api/condition/195c732f-a4ed-4d84-ae49-33bb3e037b8d?condition_level=info%2Cwarning%2Ccritical&end_time=1630217866 HTTP/2.0 1 0.061 0.0610 0.061 0.061 GET /api/condition/4faf4b62-fd71-4591-908c-b2dfa1e7c17d?condition_level=info%2Cwarning%2Ccritical&end_time=1629812978 HTTP/2.0 1 0.061 0.0610 0.061 0.061 GET /api/isu/3dad2755-33c4-4e77-999b-0678f1990793/graph?datetime=1629903600 HTTP/2.0 1 0.060 0.0600 0.060 0.060 GET /api/condition/5280783c-9f3d-4714-838d-1f3b647bf723?condition_level=info%2Cwarning%2Ccritical&end_time=1630090195 HTTP/2.0 1 0.057 0.0570 0.057 0.057 GET /api/condition/46b71474-d361-4ece-86d1-d6d630433df0?condition_level=info%2Cwarning%2Ccritical&end_time=1630091344 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 1 0.276 0.2760 0.276 0.276 POST /initialize HTTP/2.0 73 6.639 0.0909 0.000 0.186 POST /api/isu HTTP/2.0 14277 16.034 0.0011 0.000 0.168 GET /api/trend HTTP/2.0 1374 5.335 0.0039 0.000 0.116 POST /api/condition/a4e036c4-8487-42a9-bbdb-5844330b2cfe HTTP/2.0 415 1.749 0.0042 0.000 0.115 POST /api/condition/8dc3f21f-4c5b-4237-8234-013cbd1f9424 HTTP/2.0 1384 5.742 0.0041 0.000 0.094 POST /api/condition/f19886d7-c71e-4882-9c0c-a8398c56dce0 HTTP/2.0 1378 4.619 0.0034 0.000 0.091 POST /api/condition/88976731-7da7-4eef-811b-fb04e8083eb1 HTTP/2.0 1377 5.719 0.0042 0.000 0.088 POST /api/condition/dd740e8d-7fa2-4d83-9ea4-0015d5852437 HTTP/2.0 1375 5.265 0.0038 0.000 0.087 POST /api/condition/ff0c95a1-4459-4b5b-81f5-8fceb0ae396c HTTP/2.0 1 0.084 0.0840 0.084 0.084 GET /api/isu/d9b45796-c456-4b6b-a1b5-432590f54bd5/graph?datetime=1630162800 HTTP/2.0 1387 5.288 0.0038 0.000 0.083 POST /api/condition/4faf4b62-fd71-4591-908c-b2dfa1e7c17d HTTP/2.0 1393 4.872 0.0035 0.000 0.083 POST /api/condition/042eb7fa-46de-4bcf-b053-274056260257 HTTP/2.0 1382 5.648 0.0041 0.000 0.082 POST /api/condition/3ec09571-060c-4c65-b8ae-0e634108f4c3 HTTP/2.0 1975 20.326 0.0103 0.000 0.081 GET /api/isu HTTP/2.0 288 1.842 0.0064 0.000 0.081 GET /api/isu/1b0466a9-ebfd-4bec-8a26-f802ae492b2c/icon HTTP/2.0 393 2.060 0.0052 0.000 0.080 POST /api/condition/19a42fa7-9998-4281-b897-d134c4452ebe HTTP/2.0 1395 4.891 0.0035 0.000 0.078 POST /api/condition/f23903c3-2c54-4ec0-a192-f7e8824082f2 HTTP/2.0 1418 4.616 0.0033 0.000 0.076 POST /api/condition/b7fb7ab8-053d-4dbf-a0e7-537d0c6b704d HTTP/2.0 1375 5.533 0.0040 0.000 0.076 POST /api/condition/5280783c-9f3d-4714-838d-1f3b647bf723 HTTP/2.0 1375 6.003 0.0044 0.000 0.076 POST /api/condition/1b0466a9-ebfd-4bec-8a26-f802ae492b2c HTTP/2.0 TOP 10 Slow Requests 1 0.276 POST /initialize HTTP/2.0 2 0.186 POST /api/isu HTTP/2.0 3 0.182 POST /api/isu HTTP/2.0 4 0.182 POST /api/isu HTTP/2.0 5 0.176 POST /api/isu HTTP/2.0 6 0.173 POST /api/isu HTTP/2.0 7 0.168 GET /api/trend HTTP/2.0 8 0.165 GET /api/trend HTTP/2.0 9 0.165 GET /api/trend HTTP/2.0 10 0.163 POST /api/isu HTTP/2.0 ```
slow-log ``` sudo /home/isucon/webapp/slow.sh /var/log/mysql/slow-query.log # Query 1: 68.92 QPS, 0.02x concurrency, ID 0x928E21E81CD470548A56AA26A02EF04A at byte 45343911 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 5 4204 # Exec time 20 2s 109us 10ms 358us 657us 492us 260us # Lock time 32 253ms 23us 4ms 60us 84us 104us 44us # Rows sent 9 79.88k 0 20 19.46 19.46 2.94 19.46 # Rows examine 20 103.55k 0 519 25.22 49.17 27.10 19.46 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 16.49M 663 5.10k 4.02k 4.27k 570.59 4.07k # Query size 11 869.70k 205 213 211.84 212.52 3.56 212.52 # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us # 100us ################################################################ # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '2319c987-0439-4ade-9ebc-6b70c07caad7' AND `timestamp` < '2021-08-26 12:59:45' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20\G # Query 2: 191.64 QPS, 0.02x concurrency, ID 0x8155B89FFD74A9D523D19AC409FD97AF at byte 47577881 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 15 11690 # Exec time 19 1s 5us 19ms 121us 260us 400us 40us # Lock time 34 272ms 0 14ms 23us 47us 166us 0 # Rows sent 1 11.22k 0 1 0.98 0.99 0.13 0.99 # Rows examine 1 5.54k 0 1 0.49 0.99 0.50 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 1 9.32M 663 891 836.09 833.10 29.03 833.10 # Query size 18 1.39M 125 125 125 125 0 125 # Boolean: # QC hit 50% yes, 49% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ##### # 10us ################################################################ # 100us ############################################################## # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '1b0466a9-ebfd-4bec-8a26-f802ae492b2c' ORDER BY `timestamp` DESC LIMIT 1\G # Query 3: 20.56 QPS, 0.02x concurrency, ID 0x5F580A12ADA1633C9634298BE5BD9422 at byte 35237041 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 1 1254 # Exec time 16 1s 7us 25ms 945us 3ms 2ms 287us # Lock time 3 27ms 0 637us 21us 54us 28us 25us # Rows sent 81 692.68k 10 1.52k 565.63 1.20k 398.07 487.09 # Rows examine 65 330.53k 0 1.52k 269.91 1.09k 363.80 38.53 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 13 119.58M 2.22k 273.59k 97.65k 211.82k 68.92k 83.83k # Query size 1 142.05k 116 116 116 116 0 116 # Boolean: # QC hit 46% yes, 53% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ######################################################### # 1ms ######################################################### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu_condition'\G # SHOW CREATE TABLE `isucondition`.`isu_condition`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'a7aacc37-39fc-4510-9d3a-d5807ef0e7e2' ORDER BY `timestamp` ASC\G # Query 4: 224.26 QPS, 0.01x concurrency, ID 0xB5F4855605637317357023AD70B91455 at byte 50596922 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 18 13680 # Exec time 9 671ms 7us 10ms 49us 125us 230us 18us # Lock time 5 45ms 0 2ms 3us 27us 25us 0 # Rows sent 1 13.27k 0 1 0.99 0.99 0.08 0.99 # Rows examine 0 1023 0 1 0.07 0.99 0.26 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 39 348.47M 77 132.17k 26.08k 88.02k 26.31k 18.47k # Query size 21 1.61M 116 133 123.74 124.25 4.07 118.34 # Boolean: # QC hit 91% yes, 8% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ##### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT `image` FROM `isu` WHERE `jia_user_id` = 'isucon' AND `jia_isu_uuid` = '3dad2755-33c4-4e77-999b-0678f1990793'\G # Query 5: 408.85 QPS, 0.01x concurrency, ID 0x7EC46C3D52058132BA4D921BE7986B53 at byte 1177115 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 33 24940 # Exec time 7 548ms 5us 6ms 21us 26us 104us 13us # Lock time 1 9ms 0 5ms 0 0 31us 0 # Rows sent 2 24.36k 1 1 1 1 0 1 # Rows examine 0 76 0 1 0.00 0 0.05 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 1.33M 56 56 56 56 0 56 # Query size 20 1.59M 59 76 66.64 69.19 3.45 65.89 # Boolean: # QC hit 99% yes, 0% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ### # 10us ################################################################ # 100us # # 1ms # # 10ms # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'user'\G # SHOW CREATE TABLE `isucondition`.`user`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `user` WHERE `jia_user_id` = 'fervent_chebyshev' LIMIT 1\G # Query 6: 7.08 QPS, 0.01x concurrency, ID 0x2F41D2845C2FE2CBFD50AB76F51B65D9 at byte 50529522 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:01 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 0 425 # Exec time 7 514ms 15us 18ms 1ms 3ms 2ms 761us # Lock time 2 22ms 0 2ms 52us 84us 105us 40us # Rows sent 0 1.35k 1 7 3.26 5.75 1.58 2.90 # Rows examine 9 49.72k 0 194 119.79 192.76 58.00 84.10 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 3 35.15M 5.61k 261.70k 84.68k 192.13k 62.05k 62.55k # Query size 0 59.50k 140 146 143.36 143.84 3 136.99 # Boolean: # QC hit 5% yes, 94% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # 10us ###### # 100us ################################################################ # 1ms ################################### # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # SHOW TABLE STATUS FROM `isucondition` LIKE 'latest_isu_level'\G # SHOW CREATE TABLE `isucondition`.`latest_isu_level`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT a.*, b.level, b.timestamp FROM `isu` a JOIN `latest_isu_level` b ON a.jia_isu_uuid = b.jia_isu_uuid WHERE a.`character` = 'すなお'\G # Query 7: 129.33 QPS, 0.01x concurrency, ID 0x88716D544EA925A1EE9114761B982E3E at byte 2365208 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:01 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 10 7760 # Exec time 5 396ms 7us 9ms 51us 98us 275us 20us # Lock time 4 36ms 0 1ms 4us 31us 24us 0 # Rows sent 0 7.58k 0 1 1.00 0.99 0.02 0.99 # Rows examine 0 881 0 1 0.11 0.99 0.31 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 424.36k 50 56 56.00 54.21 0.10 54.21 # Query size 8 674.45k 89 89 89 89 0 89 # Boolean: # QC hit 88% yes, 11% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ### # 1ms # # 10ms # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '9356ecea-a074-4832-b9e4-43a1c77ea34a' LIMIT 1\G # Query 8: 31.64 QPS, 0.01x concurrency, ID 0x20183D6FD015A9A0A6C4FB46B2683CF0 at byte 24227111 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 1930 # Exec time 4 345ms 7us 11ms 178us 725us 462us 76us # Lock time 0 7ms 0 843us 3us 28us 24us 0 # Rows sent 1 11.42k 0 20 6.06 8.91 2.26 5.75 # Rows examine 2 14.36k 0 97 7.62 80.10 23.47 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 33 299.98M 501 646.78k 159.16k 312.96k 82.19k 150.54k # Query size 1 144.02k 69 86 76.41 76.28 3.79 76.28 # Boolean: # QC hit 90% yes, 9% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us ########################### # 1ms ## # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'stoic_wilbur' ORDER BY `id` DESC\G # Query 9: 34.08 QPS, 0.00x concurrency, ID 0xC1B01223FBAA0D3FFA4AECBA98E246CC at byte 6138316 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 2 2079 # Exec time 3 228ms 8us 14ms 109us 247us 586us 23us # Lock time 2 22ms 0 500us 10us 47us 23us 0 # Rows sent 0 1.94k 0 1 0.96 0.99 0.20 0.99 # Rows examine 0 465 0 1 0.22 0.99 0.41 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 6 53.43M 501 132.73k 26.32k 88.02k 26.35k 18.47k # Query size 3 238.54k 110 127 117.49 118.34 4.13 112.70 # Boolean: # QC hit 74% yes, 25% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us # # 10us ################################################################ # 100us #################### # 1ms # # 10ms # # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT * FROM `isu` WHERE `jia_user_id` = 'serene_burnell' AND `jia_isu_uuid` = '46b71474-d361-4ece-86d1-d6d630433df0'\G # Query 10: 80.67 QPS, 0.00x concurrency, ID 0x262764FE7CE586B417A1206082D32E11 at byte 41308110 # Scores: V/M = 0.00 # Time range: 2022-07-03 13:23:00 to 13:24:01 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= # Count 6 4921 # Exec time 2 188ms 6us 6ms 38us 125us 182us 12us # Lock time 3 24ms 0 2ms 4us 33us 36us 0 # Rows sent 0 4.72k 0 1 0.98 0.99 0.13 0.99 # Rows examine 0 449 0 1 0.09 0.99 0.29 0 # Rows affecte 0 0 0 0 0 0 0 0 # Bytes sent 0 480.41k 75 122 99.97 112.70 7.06 97.36 # Query size 7 580.02k 113 130 120.69 118.34 2.05 118.34 # Boolean: # QC hit 89% yes, 10% no # String: # Databases isucondition # Hosts localhost # Users isucon # Query_time distribution # 1us ######## # 10us ################################################################ # 100us ###### # 1ms # # 10ms # 100ms # 1s # 10s+ # Tables # SHOW TABLE STATUS FROM `isucondition` LIKE 'isu'\G # SHOW CREATE TABLE `isucondition`.`isu`\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT name FROM `isu` WHERE `jia_isu_uuid` = '4f6a83f4-952b-49a3-bbb1-d902812020d1' AND `jia_user_id` = 'hopeful_solomon'\G ```

e9ce96edf2fc4ff7aadfe9dbf6e304739597174a

karamaru-alpha commented 2 years ago

dbを別サーバーに/conf追加 27125

15

16

kataribe ``` sudo cat /var/log/nginx/access.log | kataribe -f /home/isucon/webapp/kataribe.toml Top 20 Sort By Count Count Total Mean Min Max Request 14770 45.370 0.0031 0.000 0.240 GET /api/trend HTTP/2.0 2027 63.233 0.0312 0.000 0.275 GET /api/isu HTTP/2.0 1479 4.669 0.0032 0.000 0.101 POST /api/condition/245f032e-906d-4107-9f03-f30dfa6b4f11 HTTP/2.0 1468 4.561 0.0031 0.000 0.100 POST /api/condition/102d7f41-1555-44e6-bc73-839e8cbda5ce HTTP/2.0 1468 4.480 0.0031 0.000 0.064 POST /api/condition/c7c02979-e27f-4e82-8603-6d615a2da3a9 HTTP/2.0 1460 3.997 0.0027 0.000 0.056 POST /api/condition/dac57146-7a34-4c72-aa4e-fd4739278362 HTTP/2.0 1460 4.264 0.0029 0.000 0.042 POST /api/condition/fa53344f-bd72-480f-a61f-7926b02a8962 HTTP/2.0 1458 4.211 0.0029 0.000 0.079 POST /api/condition/a0b6deb6-5680-41ad-9187-d75fb0f9411b HTTP/2.0 1456 4.295 0.0029 0.000 0.060 POST /api/condition/963885b9-1bf1-4d4c-bed3-10d22bb44f9c HTTP/2.0 1455 4.410 0.0030 0.000 0.085 POST /api/condition/4774c3c1-05e9-4f84-a2a1-850ba0f7f3bf HTTP/2.0 1455 5.052 0.0035 0.000 0.100 POST /api/condition/cc2bb7dd-c35b-4652-85b6-4212c15aa0cc HTTP/2.0 1454 4.910 0.0034 0.000 0.100 POST /api/condition/a17abb2b-bbdb-49c7-8eb7-669fee886671 HTTP/2.0 1454 4.932 0.0034 0.000 0.100 POST /api/condition/5dbfe64d-c3b6-409a-b808-cb8c0430705a HTTP/2.0 1453 4.514 0.0031 0.000 0.061 POST /api/condition/4d449885-8a4b-41d4-a679-16585bfb577b HTTP/2.0 1453 5.598 0.0039 0.000 0.057 POST /api/condition/91674504-dddc-447b-9747-d8130e9691a5 HTTP/2.0 1453 4.932 0.0034 0.000 0.101 POST /api/condition/cf711a10-39e9-4faa-b288-4fe5e43d775b HTTP/2.0 1452 4.990 0.0034 0.000 0.058 POST /api/condition/bd4f5f26-ce50-4232-9bf0-5afd04cc0d6a HTTP/2.0 1452 4.397 0.0030 0.000 0.100 POST /api/condition/44cdd1a5-7fc4-47bd-92ae-739a812c3f59 HTTP/2.0 1451 4.590 0.0032 0.000 0.111 POST /api/condition/c49a52e7-e05d-4147-a0de-00dc1e01b622 HTTP/2.0 1451 4.181 0.0029 0.000 0.063 POST /api/condition/8f1e61b5-7c87-45fd-812e-75753a928b0c HTTP/2.0 Top 20 Sort By Total Count Total Mean Min Max Request 2027 63.233 0.0312 0.000 0.275 GET /api/isu HTTP/2.0 14770 45.370 0.0031 0.000 0.240 GET /api/trend HTTP/2.0 73 7.495 0.1027 0.000 0.177 POST /api/isu HTTP/2.0 1449 5.755 0.0040 0.000 0.064 POST /api/condition/674dbec1-732b-45f4-8d9a-176843e11ced HTTP/2.0 1434 5.608 0.0039 0.000 0.060 POST /api/condition/80ac7185-8e60-4995-92dc-aee1133656e6 HTTP/2.0 1453 5.598 0.0039 0.000 0.057 POST /api/condition/91674504-dddc-447b-9747-d8130e9691a5 HTTP/2.0 1441 5.543 0.0038 0.000 0.114 POST /api/condition/537ba036-5475-4066-9117-b896a2183432 HTTP/2.0 978 5.509 0.0056 0.000 0.205 POST /api/auth HTTP/2.0 1438 5.454 0.0038 0.000 0.057 POST /api/condition/84fec216-e143-426a-b90b-7ad5e24ac594 HTTP/2.0 1449 5.367 0.0037 0.000 0.079 POST /api/condition/7ca1d9c6-0a0b-4673-847b-b727fbe816cc HTTP/2.0 1433 5.336 0.0037 0.000 0.100 POST /api/condition/d45076d9-3b45-4011-b890-6b60ab160daf HTTP/2.0 1444 5.309 0.0037 0.000 0.057 POST /api/condition/d64d37bf-b21e-41da-a2ed-bccf40767abe HTTP/2.0 1441 5.253 0.0036 0.000 0.085 POST /api/condition/eacce99f-2e7a-46f5-af15-e6b83644ae61 HTTP/2.0 1447 5.224 0.0036 0.000 0.112 POST /api/condition/b2585205-fd9e-4f83-9083-2d4ef46673d6 HTTP/2.0 1430 5.214 0.0036 0.000 0.100 POST /api/condition/3c7e3b57-8b6c-4da4-8363-11e3960881e8 HTTP/2.0 1435 5.204 0.0036 0.000 0.052 POST /api/condition/912c1c21-793c-48db-a449-1edc6360d14f HTTP/2.0 1432 5.120 0.0036 0.000 0.101 POST /api/condition/bf9d0ef0-e857-4f52-a15a-ea8589428d6f HTTP/2.0 1433 5.071 0.0035 0.000 0.060 POST /api/condition/0c835d3d-819c-406d-96a3-8c4a3fcfe67b HTTP/2.0 1455 5.052 0.0035 0.000 0.100 POST /api/condition/cc2bb7dd-c35b-4652-85b6-4212c15aa0cc HTTP/2.0 1445 5.036 0.0035 0.000 0.100 POST /api/condition/fcc99f26-ecd0-4224-82a6-cc337a7f24bd HTTP/2.0 Top 20 Sort By Mean Count Total Mean Min Max Request 1 0.838 0.8380 0.838 0.838 POST /initialize HTTP/2.0 1 0.157 0.1570 0.157 0.157 GET /api/isu/5b2a1fea-35d2-4342-be04-4fb64cc37789/graph?datetime=1629298800 HTTP/2.0 1 0.146 0.1460 0.146 0.146 GET /api/condition/ea2331dc-12fb-4ebb-80ff-036294163f55?condition_level=info%2Cwarning%2Ccritical&end_time=1628539200&start_time=1628535600 HTTP/2.0 1 0.132 0.1320 0.132 0.132 GET /api/condition/b95ee8bc-4a8e-4036-9677-3c1e326f76da?condition_level=info%2Cwarning%2Ccritical&end_time=1630320913 HTTP/2.0 1 0.129 0.1290 0.129 0.129 GET /api/condition/44cdd1a5-7fc4-47bd-92ae-739a812c3f59?condition_level=info%2Cwarning%2Ccritical&end_time=1630039230 HTTP/2.0 1 0.128 0.1280 0.128 0.128 GET /api/condition/3c73c613-1ed5-4925-8f97-223b45542941?condition_level=info%2Cwarning%2Ccritical&end_time=1630200976 HTTP/2.0 1 0.128 0.1280 0.128 0.128 GET /api/condition/84c0d027-bb99-40ba-8b63-9c067084effb?condition_level=info%2Cwarning%2Ccritical&end_time=1630111796 HTTP/2.0 2 0.250 0.1250 0.024 0.226 GET /api/isu/9df99d1f-d90b-4fee-9eb9-fd23d5f4c5aa/graph?datetime=1629298800 HTTP/2.0 2 0.215 0.1075 0.000 0.215 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab/graph?datetime=1629385200 HTTP/2.0 1 0.103 0.1030 0.103 0.103 GET /api/condition/3c73c613-1ed5-4925-8f97-223b45542941?condition_level=warning%2Ccritical&end_time=1629194781 HTTP/2.0 73 7.495 0.1027 0.000 0.177 POST /api/isu HTTP/2.0 1 0.094 0.0940 0.094 0.094 GET /api/condition/cc2bb7dd-c35b-4652-85b6-4212c15aa0cc?condition_level=warning%2Ccritical&end_time=1630322024 HTTP/2.0 1 0.093 0.0930 0.093 0.093 GET /api/condition/fa53344f-bd72-480f-a61f-7926b02a8962?condition_level=info%2Cwarning%2Ccritical&end_time=1629182427 HTTP/2.0 1 0.085 0.0850 0.085 0.085 GET /api/condition/eacce99f-2e7a-46f5-af15-e6b83644ae61?condition_level=info%2Cwarning%2Ccritical&end_time=1628524800&start_time=1628521200 HTTP/2.0 1 0.077 0.0770 0.077 0.077 GET /api/condition/b2585205-fd9e-4f83-9083-2d4ef46673d6?condition_level=info%2Cwarning%2Ccritical&end_time=1628834111 HTTP/2.0 1 0.074 0.0740 0.074 0.074 GET /api/isu/674dbec1-732b-45f4-8d9a-176843e11ced/graph?datetime=1629730800 HTTP/2.0 1 0.074 0.0740 0.074 0.074 GET /api/condition/0c835d3d-819c-406d-96a3-8c4a3fcfe67b?condition_level=warning%2Ccritical&end_time=1629285892 HTTP/2.0 1 0.074 0.0740 0.074 0.074 GET /api/isu/fe53152f-01ac-4eef-be16-001c770a9edd/graph?datetime=1629817200 HTTP/2.0 1 0.072 0.0720 0.072 0.072 GET /api/isu/537ba036-5475-4066-9117-b896a2183432/graph?datetime=1629903600 HTTP/2.0 1 0.072 0.0720 0.072 0.072 GET /api/condition/7220ba70-905c-4089-9e6a-5a4f86c65f25?condition_level=info%2Cwarning%2Ccritical&end_time=1629741743 HTTP/2.0 Top 20 Sort By Maximum(100 Percentile) Count Total Mean Min Max Request 1 0.838 0.8380 0.838 0.838 POST /initialize HTTP/2.0 2027 63.233 0.0312 0.000 0.275 GET /api/isu HTTP/2.0 14770 45.370 0.0031 0.000 0.240 GET /api/trend HTTP/2.0 6 0.312 0.0520 0.009 0.238 GET /api/isu/ea2331dc-12fb-4ebb-80ff-036294163f55/graph?datetime=1628521200 HTTP/2.0 2 0.250 0.1250 0.024 0.226 GET /api/isu/9df99d1f-d90b-4fee-9eb9-fd23d5f4c5aa/graph?datetime=1629298800 HTTP/2.0 2 0.215 0.1075 0.000 0.215 GET /api/isu/cab99f63-bb3a-4648-b6df-376396f2c7ab/graph?datetime=1629385200 HTTP/2.0 40 0.712 0.0178 0.004 0.215 GET /api/isu/5b2a1fea-35d2-4342-be04-4fb64cc37789 HTTP/2.0 978 5.509 0.0056 0.000 0.205 POST /api/auth HTTP/2.0 73 7.495 0.1027 0.000 0.177 POST /api/isu HTTP/2.0 210 4.027 0.0192 0.005 0.161 GET /api/isu/d45076d9-3b45-4011-b890-6b60ab160daf/icon HTTP/2.0 208 2.613 0.0126 0.003 0.159 GET /api/isu/44cdd1a5-7fc4-47bd-92ae-739a812c3f59/icon HTTP/2.0 210 2.835 0.0135 0.003 0.157 GET /api/isu/1fa5c585-abd4-4555-95b5-8123af160a18/icon HTTP/2.0 1 0.157 0.1570 0.157 0.157 GET /api/isu/5b2a1fea-35d2-4342-be04-4fb64cc37789/graph?datetime=1629298800 HTTP/2.0 278 3.570 0.0128 0.003 0.155 GET /api/isu/3d75e929-5fdf-4f7d-a933-9edec5477744/icon HTTP/2.0 210 2.899 0.0138 0.004 0.155 GET /api/isu/63a4904f-75c7-489b-9c2c-9291f19459a2/icon HTTP/2.0 210 3.505 0.0167 0.003 0.155 GET /api/isu/31007748-fc26-4041-83c0-b88558b8e864/icon HTTP/2.0 210 2.847 0.0136 0.003 0.153 GET /api/isu/c49a52e7-e05d-4147-a0de-00dc1e01b622/icon HTTP/2.0 278 3.565 0.0128 0.003 0.152 GET /api/isu/4774c3c1-05e9-4f84-a2a1-850ba0f7f3bf/icon HTTP/2.0 278 4.709 0.0169 0.004 0.149 GET /api/isu/963885b9-1bf1-4d4c-bed3-10d22bb44f9c/icon HTTP/2.0 279 3.434 0.0123 0.004 0.149 GET /api/isu/3c73c613-1ed5-4925-8f97-223b45542941/icon HTTP/2.0 TOP 10 Slow Requests 1 0.838 POST /initialize HTTP/2.0 2 0.275 GET /api/isu HTTP/2.0 3 0.272 GET /api/isu HTTP/2.0 4 0.240 GET /api/trend HTTP/2.0 5 0.240 GET /api/trend HTTP/2.0 6 0.240 GET /api/trend HTTP/2.0 7 0.239 GET /api/trend HTTP/2.0 8 0.238 GET /api/isu/ea2331dc-12fb-4ebb-80ff-036294163f55/graph?datetime=1628521200 HTTP/2.0 9 0.238 GET /api/trend HTTP/2.0 10 0.232 GET /api/trend HTTP/2.0 ```
karamaru-alpha commented 2 years ago

drop消す 82190

17

log ``` Top 20 Sort By Total Count Total Mean Min Max Request 12237 24.614 0.0020 0.000 0.670 GET /api/trend HTTP/2.0 1435 21.659 0.0151 0.001 0.103 POST /api/condition/ab4ca074-9f1c-4175-8e2e-eb763dc8f9de HTTP/2.0 1415 21.644 0.0153 0.001 0.115 POST /api/condition/6ff29bb7-391d-460b-b809-cdf83b2d4c17 HTTP/2.0 ``` ``` SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'dbea30f7-9adf-45e2-9fbb-4bf1e5d7bb55' ORDER BY `timestamp` ASC SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '8f405ff7-4d21-472e-affa-ec2f279e0a75' AND `timestamp` < '2021-08-10 23:07:59' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20 SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = 'e3b43b22-006b-4e07-a51c-a85cfe216417' LIMIT 1 ```
karamaru-alpha commented 2 years ago

graphを1日のみに 121538

https://github.com/karamaru-alpha/isucon11-qualify-re/pull/18

log ``` 533 15.867 0.0298 0.000 0.079 GET /api/isu HTTP/2.0 12392 15.688 0.0013 0.000 0.232 GET /api/trend HTTP/2.0 1476 12.662 0.0086 0.001 0.052 POST /api/condition/a54a8ebb-ee9e-458d-8c04-6ab67f74fc64 HTTP/2.0 1478 12.443 0.0084 0.002 0.065 POST /api/condition/4e44f59f-21b5-4970-afc0-4c7b37c23521 HTTP/2.0 1502 12.320 0.0082 0.002 0.053 POST /api/condition/7bea77a4-5909-47dc-8f17-bb24f6af25ab HTTP/2.0 1489 12.251 0.0082 0.001 0.071 POST /api/condition/d2c02cc4-4a0c-437b-bb02-3ea597ca78fa HTTP/2.0 1484 12.073 0.0081 0.001 0.055 POST /api/condition/d4ca55f3-9571-4b33-b69b-f8b2be2c5651 HTTP/2.0 1487 12.063 0.0081 0.001 0.048 POST /api/condition/4cf65319-1eb1-4ffe-8e87-e8fe69be77eb HTTP/2.0 1487 12.056 0.0081 0.001 0.054 POST /api/condition/f88d94aa-6620-47ea-9bf3-95e15f8ce485 HTTP/2.0 1473 11.996 0.0081 0.001 0.062 POST /api/condition/b7082c2f-844e-4bd6-8a92-bb4df794f20e HTTP/2.0 1489 11.871 0.0080 0.001 0.057 POST /api/condition/297b310e-6574-4904-b8d8-a516a0a11ad6 HTTP/2.0 1489 11.833 0.0079 0.001 0.057 POST /api/condition/77ea6a73-444d-4812-a7f9-c0dfb91a6d4c HTTP/2.0 1493 11.740 0.0079 0.001 0.046 POST /api/condition/d0d491ca-f0d9-4129-9135-62bb711bc6c8 HTTP/2.0 1485 11.708 0.0079 0.001 0.040 POST /api/condition/0a2afe67-9568-449d-8102-7eec3f9c6f33 HTTP/2.0 1482 11.657 0.0079 0.001 0.052 POST /api/condition/42d972d1-2482-4b7f-b426-1e368c73d4f5 HTTP/2.0 1491 11.642 0.0078 0.001 0.058 POST /api/condition/d0a12bbf-5e1b-4216-a87b-619bbfeaf31e HTTP/2.0 1488 11.572 0.0078 0.001 0.051 POST /api/condition/8b06fcb8-f3c4-433b-b451-177dc6a404b7 HTTP/2.0 1472 11.494 0.0078 0.001 0.052 POST /api/condition/92ce50a4-2279-4ec5-a82e-f19b7c7cb078 HTTP/2.0 1494 11.488 0.0077 0.001 0.055 POST /api/condition/349e45de-abc7-4a08-b8a3-064d8c735c22 HTTP/2.0 1492 11.486 0.0077 0.002 0.050 POST /api/condition/4b60cb16-8a4d-4cad-a76d-e452c6c07087 HTTP/2.0 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '4cf65319-1eb1-4ffe-8e87-e8fe69be77eb' AND `timestamp` < '2021-08-12 05:35:59' AND `level` IN ('critical', 'info', 'warning') ORDER BY `timestamp` DESC LIMIT 20 SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = '349e45de-abc7-4a08-b8a3-064d8c735c22' LIMIT 1 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'f88d94aa-6620-47ea-9bf3-95e15f8ce485' AND `timestamp` BETWEEN '2021-08-20' AND '2021-08-21' ORDER BY `timestamp` ASC ```
karamaru-alpha commented 2 years ago

trend 120378

12387  15.277  0.0012  0.000  0.217  GET /api/trend HTTP/2.0
 1490  13.653  0.0092  0.001  0.058  POST /api/condition/4088b8c8-e440-41c5-89f6-f0257728d597 HTTP/2.0
 1485  13.243  0.0089  0.001  0.058  POST /api/condition/0bde5702-296e-47a7-a505-9212fd0290eb HTTP/2.0
 1480  13.203  0.0089  0.001  0.052  POST /api/condition/47fd9db0-a000-4715-97c6-aee48bc4bcf7 HTTP/2.0

SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'f30fc490-cde6-4777-93b6-e356f81709ba' AND `timestamp` < '2021-08-15 13:41:58' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20
SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = 'e4117922-e403-4ffe-9b82-fc7fe9441afb' LIMIT 1
karamaru-alpha commented 2 years ago

isuをオンメモリに 144898

19 #20

log ``` 12459 14.640 0.0012 0.000 0.203 GET /api/trend HTTP/2.0 1484 12.710 0.0086 0.001 0.046 POST /api/condition/c294e6c2-28ce-4336-b5b0-fa810acf5632 HTTP/2.0 1495 12.482 0.0083 0.002 0.055 POST /api/condition/1bd1372f-d68c-4209-92c9-a6fa0e927be3 HTTP/2.0 1488 12.463 0.0084 0.001 0.045 POST /api/condition/8900f727-3560-4aa9-8801-2afed4dd0e07 HTTP/2.0 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '83a793e1-9f68-43f9-94d2-dd6d4c9fc7a2' AND `timestamp` < '2021-08-25 01:49:14' AND `level` IN ('warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20 SELECT 1 FROM `isu` WHERE `jia_isu_uuid` = 'f6b2f833-bb39-47be-957c-455a349cc77f' LIMIT 1 ```
karamaru-alpha commented 2 years ago

Isuをオンメモリに2 169058

21

log ``` 784 10.047 0.0128 0.000 0.036 GET /api/isu HTTP/2.0 12538 9.641 0.0008 0.000 0.155 GET /api/trend HTTP/2.0 1490 4.146 0.0028 0.000 0.051 POST /api/condition/5817bb79-1925-4709-a7a1-823cadde1368 HTTP/2.0 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '31faaf19-a83f-40eb-8719-355a70fc4b7b' AND `timestamp` < '2021-08-22 22:37:30' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = '62469ab3-d081-4b52-b1f2-880707d0adb8' AND `timestamp` BETWEEN '2021-08-23' AND '2021-08-24' ORDER BY `timestamp` ASC SELECT a.*, b.timestamp, b.is_sitting, b.`condition`, b.message, b.level FROM `isu` a LEFT JOIN `latest_isu_condition` b ON a.jia_isu_uuid = b.jia_isu_uuid WHERE a.`jia_user_id` = 'wonderful_lalande' ORDER BY a.`id` DESC ```
karamaru-alpha commented 2 years ago

imageをINVISIBLEに 156326

22

log ``` 12847 6.498 0.0005 0.000 0.123 GET /api/trend HTTP/2.0 736 6.321 0.0086 0.000 0.035 GET /api/isu HTTP/2.0 1496 4.987 0.0033 0.000 0.041 POST /api/condition/fdf2649a-4b73-40cc-8b4d-31c05fc0598e HTTP/2.0 1491 4.861 0.0033 0.000 0.031 POST /api/condition/6cfede90-ca07-46b1-9c03-b09141c4b4f6 HTTP/2.0 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'e88f3e29-116c-4f75-af21-84c514623c7f' AND `timestamp` < '2021-08-22 05:11:58' AND `level` IN ('info', 'warning', 'critical') ORDER BY `timestamp` DESC LIMIT 20 SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = 'b1e968ac-6695-48f8-b699-948168941cb9' AND `timestamp` BETWEEN '2021-08-18' AND '2021-08-19' ORDER BY `timestamp` ASC ```
karamaru-alpha commented 2 years ago

isu3をDB用に。isu_conditionのみを扱う 163986

23

Top 20 Sort By Total
Count  Total    Mean    Min    Max  Request
  804  6.359  0.0079  0.000  0.039  GET /api/isu HTTP/2.0
 1496  4.525  0.0030  0.000  0.036  POST /api/condition/f878135c-e01c-434d-b31b-a5bae38b0bc2 HTTP/2.0
  949  4.444  0.0047  0.000  0.028  POST /api/auth HTTP/2.0
 1509  4.190  0.0028  0.000  0.040  POST /api/condition/fe197fdc-7786-458f-ad18-665144e76d48 HTTP/2.0
 1491  4.098  0.0027  0.000  0.029  POST /api/condition/ff12225b-b93f-4237-adaf-607f7a9e34ec HTTP/2.0
 1493  3.974  0.0027  0.000  0.035  POST /api/condition/5b1fd477-022a-4457-b95f-befe215d9b4e HTTP/2.0
 1486  3.914  0.0026  0.000  0.042  POST /api/condition/3852c34f-3447-48f6-8b0e-629576c08f00 HTTP/2.0
 1491  3.877  0.0026  0.000  0.030  POST /api/condition/21053492-84e3-4d20-bdba-0735c644304e HTTP/2.0
   58  3.851  0.0664  0.000  0.106  POST /api/isu HTTP/2.0
karamaru-alpha commented 2 years ago

UnixDomainSocket & goccyJsonに差し替え 174881

24

同VMに置いてるbenchMarkerがCPU食いすぎてこれ以上無理そう。予選ボーダーには十分届く状態。 社会人予選Border: 106094