catatsuy / isucon10_q_pra

0 stars 0 forks source link

最初にやること #1

Open catatsuy opened 3 years ago

catatsuy commented 3 years ago

インフラ担当

アプリケーション担当1

アプリケーション担当2

meihei3 commented 3 years ago

DBスキーマ一覧

CREATE TABLE `chair` (
  `id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  `description` varchar(4096) NOT NULL,
  `thumbnail` varchar(128) NOT NULL,
  `price` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `depth` int(11) NOT NULL,
  `color` varchar(64) NOT NULL,
  `features` varchar(64) NOT NULL,
  `kind` varchar(64) NOT NULL,
  `popularity` int(11) NOT NULL,
  `stock` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `estate` (
  `id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  `description` varchar(4096) NOT NULL,
  `thumbnail` varchar(128) NOT NULL,
  `address` varchar(128) NOT NULL,
  `latitude` double NOT NULL,
  `longitude` double NOT NULL,
  `rent` int(11) NOT NULL,
  `door_height` int(11) NOT NULL,
  `door_width` int(11) NOT NULL,
  `features` varchar(64) NOT NULL,
  `popularity` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
meihei3 commented 3 years ago

各テーブルのサイズ

+------------+--------+------------+----------+---------+----------+
| table_name | engine | table_rows | total_mb | data_mb | index_mb |
+------------+--------+------------+----------+---------+----------+
| estate     | InnoDB |      29637 |       14 |      14 |        0 |
| chair      | InnoDB |      29746 |       13 |      13 |        0 |
+------------+--------+------------+----------+---------+----------+
sakushin774 commented 3 years ago

alp実行コマンド

sudo cat /var/log/nginx/access.log | alp ltsv -m "^/api/estate/\d+","^/api/estate/req_doc/\d+","^/api/chair/\d+","^/api/chair/buy/\d+","/api/recommended_estate/\d+" --sort=sum --reverse --filters 'Time > TimeAgo("5m")'  | notify_slack -snippet -filetype txt
sakushin774 commented 3 years ago
isucon@ip-172-31-6-47:~$ grep "cpu MHz" /proc/cpuinfo | sort -u
cpu MHz     : 2299.988
isucon@ip-172-31-6-47:~$ grep "cpu core" /proc/cpuinfo | sort -u
cpu cores   : 2
isucon@ip-172-31-6-47:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           3.8G        548M        765M        828K        2.6G        3.0G
Swap:            0B          0B          0B