This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
第三回予選
のにれん edited this page Sep 1, 2015
·
14 revisions
ec2-54-64-37-118.ap-northeast-1.compute.amazonaws.com
/home/isucon
以下にソース。
-
perl
Result: SUCCESS RawScore: 1116.3 Fails: 0 Score: 1116.3
-
ruby 実装に変更
Result: SUCCESS
RawScore: 2445.8
Fails: 0
Score: 2445.8
mysql> show full columns from memos;
+------------+------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+------------+------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+---------+
| id | int(11) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
| user | int(11) | NULL | NO | | NULL | | select,insert,update,references | |
| content | text | utf8_general_ci | YES | | NULL | | select,insert,update,references | |
| is_private | tinyint(4) | NULL | NO | | 0 | | select,insert,update,references | |
| created_at | datetime | NULL | NO | | NULL | | select,insert,update,references | |
| updated_at | timestamp | NULL | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | select,insert,update,references | |
+------------+------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+---------+
6 rows in set (0.00 sec)
mysql> show full columns from users;
+-------------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-------------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
| id | int(11) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
| username | varchar(255) | utf8_general_ci | NO | UNI | NULL | | select,insert,update,references | |
| password | varchar(255) | utf8_general_ci | NO | | NULL | | select,insert,update,references | |
| salt | varchar(255) | utf8_general_ci | NO | | NULL | | select,insert,update,references | |
| last_access | datetime | NULL | YES | | NULL | | select,insert,update,references | |
+-------------+--------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
5 rows in set (0.00 sec)
- tmux
- zsh
###lastcat's work
- サーバーをnginxに変更
- バックエンドとの通信をunixドメインソケットに
- worker processを4に
- コンテンツのgzip圧縮
- スロークエリを眺める
- indexつける
- クエリキャッシュつける
- initスクリプトを書く (
sudo isucon3 benchmark --init /home/isucon/init.sh
で実行) - スロークエリをOFFSET大量読み込んでたので直そうとして
trigger
をつかって別テーブルつくろうとしたけどinitではtrigger
効いてなかったことがわかって諦めた
- configを起動時に一度だけ読むように