awakia / isucon4

Isuconの練習
0 stars 0 forks source link

スコアの推移 #12

Open awakia opened 9 years ago

awakia commented 9 years ago

ここに何をやったらどう上がったかみたいなものも、主要なものはまとめていきましょう!! @izumin5210 @koudaiii @dtan4

初期

workload数: スコア

1: success:5765 fail:1 score:1246 2: success:8955 fail:1 score:1936 4: success:10900 fail:0 score:2357 8: success:10860 fail:0 score:2350 16: success:10409 fail:35 score:2263

dtan4 commented 9 years ago

Nginx worker_processes 1 -> worker_processes 6

4: success:11370 fail:0 score:2457 8: 取得できず

koudaiii commented 9 years ago

純粋にIndex貼ってみた

三倍!!!

+ mysql -h 127.0.0.1 -P 3306 -u root isu4_qualifier -e 'alter table login_log add index ip (ip), add index user_id (user_id);'
07:04:11 type:info  message:check banned ips and locked users report
07:04:11 type:fail  reason:Get http://localhost/report: dial tcp: lookup localhost: no such host    message:Report checking is failed. Do not send score.
07:04:11 type:score success:30393   fail:76700  score:6588
koudaiii commented 9 years ago

failが増えたため、受け付けれる数を増やす・local portの数を増やすを元に設定を変えた。

[root@isucon4-qualifier-dtan4 ~]# cat /etc/sysctl.conf 
net.ipv4.tcp_max_tw_buckets = 2000000
net.ipv4.ip_local_port_range = 10000 65000
net.core.somaxconn = 32768
net.core.netdev_max_backlog = 8192
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 10
[isucon@isucon4-qualifier-dtan4 ~]$ ./benchmarker b --workload 4
07:27:20 type:info  message:!!! DEBUG MODE !!! DEBUGE MODE !!!
07:27:20 type:info  message:launch benchmarker
07:27:20 type:warning   message:Result not sent to server because API key is not set
07:27:20 type:info  message:init environment
07:27:25 type:info  message:run benchmark workload: 4
07:28:25 type:info  message:finish benchmark workload: 4
07:28:30 type:info  message:check banned ips and locked users report
07:28:31 type:report    count:banned ips    value:168
07:28:31 type:report    count:locked users  value:2974
07:28:31 type:debug incomplete_ip:127.1.0.214   reported:true
07:28:31 type:debug incomplete_ip:127.1.1.118   reported:true
07:28:31 type:info  message:Result not sent to server because API key is not set
07:28:31 type:score success:48550   fail:0  score:10488
[isucon@isucon4-qualifier-dtan4 ~]$ 
koudaiii commented 9 years ago

unix socketに変更とcssまわりをCacheした

[isucon@isucon4-qualifier-dtan4 ~]$ ./benchmarker b --workload 4
08:29:24 type:info  message:!!! DEBUG MODE !!! DEBUGE MODE !!!
08:29:24 type:info  message:launch benchmarker
08:29:24 type:warning   message:Result not sent to server because API key is not set
08:29:24 type:info  message:init environment
08:29:29 type:info  message:run benchmark workload: 4
08:30:29 type:info  message:finish benchmark workload: 4
08:30:34 type:info  message:check banned ips and locked users report
08:30:35 type:report    count:banned ips    value:167
08:30:35 type:report    count:locked users  value:2986
08:30:35 type:debug incomplete_ip:127.1.0.89    reported:true
08:30:35 type:debug incomplete_ip:127.1.0.184   reported:true
08:30:35 type:debug incomplete_ip:127.1.1.31    reported:true
08:30:35 type:info  message:Result not sent to server because API key is not set
08:30:35 type:score success:50500   fail:0  score:10910
dtan4 commented 9 years ago

unicorn -E production

Unicorn (Rack) を Production で動作させた

[isucon@isucon4-qualifier-dtan4 ~]$ ./benchmarker bench --workload 4
09:04:44 type:info      message:!!! DEBUG MODE !!! DEBUGE MODE !!!
09:04:44 type:info      message:launch benchmarker
09:04:44 type:warning   message:Result not sent to server because API key is not set
09:04:44 type:info      message:init environment
09:04:49 type:info      message:run benchmark workload: 4
09:05:49 type:info      message:finish benchmark workload: 4
09:05:54 type:info      message:check banned ips and locked users report
09:05:55 type:report    count:banned ips        value:259
09:05:55 type:report    count:locked users      value:3166
09:05:55 type:debug     incomplete_user:ameridw reported:true
09:05:55 type:info      message:Result not sent to server because API key is not set
09:05:55 type:score     success:65990   fail:0  score:14256
[isucon@isucon4-qualifier-dtan4 ~]$ ./benchmarker bench --workload 8
09:07:14 type:info      message:!!! DEBUG MODE !!! DEBUGE MODE !!!
09:07:14 type:info      message:launch benchmarker
09:07:14 type:warning   message:Result not sent to server because API key is not set
09:07:14 type:info      message:init environment
09:07:19 type:info      message:run benchmark workload: 8
09:08:19 type:fail      reason:Request cancelled because benchmark finished (1min)      method:GET      uri:/stylesheets/isucon-bank.css
09:08:19 type:fail      reason:Request cancelled because benchmark finished (1min)      method:GET      uri:/stylesheets/bootflat.min.css
09:08:19 type:fail      reason:Request cancelled because benchmark finished (1min)      method:GET      uri:/images/isucon-bank.png
09:08:19 type:info      message:finish benchmark workload: 8
09:08:24 type:info      message:check banned ips and locked users report
09:08:25 type:report    count:banned ips        value:142
09:08:25 type:report    count:locked users      value:3252
09:08:25 type:debug     incomplete_ip:127.1.1.194       reported:true
09:08:25 type:debug     incomplete_ip:127.1.2.74        reported:true
09:08:25 type:debug     incomplete_ip:127.1.2.149       reported:true
09:08:25 type:debug     incomplete_user:alyshm  reported:true
09:08:25 type:debug     incomplete_user:jordy_klocko    reported:true
09:08:25 type:info      message:Result not sent to server because API key is not set
09:08:25 type:score     success:75427   fail:3  score:16298
koudaiii commented 9 years ago

むー最高が16298で終了した