Skip to content

Instantly share code, notes, and snippets.

@yappo
Created October 7, 2013 06:24
Show Gist options
  • Save yappo/31066784e4b246b4bc94 to your computer and use it in GitHub Desktop.
Save yappo/31066784e4b246b4bc94 to your computer and use it in GitHub Desktop.
ぶっちゅぶちゅ!
09:18 < gfx> hi
09:18 <@Yappo> hi
09:21 < gfx> さっそくですが、遅刻します(ヽ´ω`)
09:21 <@Yappo> といれでばりゅーだすのこころみてる
10:46 < gfx> ssh-rsa (censored)
10:49 <@kamipo> いまの時点まででやったこと
10:49 <@kamipo> percona-toolkitいれた
10:49 <@kamipo> apacheをnginxに入れ替えた
10:54 <@kamipo> Host isucon3
10:54 <@kamipo> HostName (censored)
10:54 <@kamipo> User isucon
10:59 <@kamipo> webapp以下をgit pushした https://github.com/kamipo/isucon3
11:04 <@Yappo> o
11:04 <@Yappo> ssh-dss (censored)
11:06 <@Yappo> https://gist.github.com/yappo/(censored)
11:18 <@kamipo> sudo supervisorctl status
11:18 <@kamipo> sudo supervisorctl restart isucon_perl
11:42 <@kamipo> SELECT /* /home/isucon/webapp/perl/lib/Isucon3/Web.pm line 132 */ * FROM memos WHERE is_private=0 ORDER BY created_at DESC, id DESC LIMIT 100 OFFSET 19600\G
11:45 <@kamipo> SELECT /* /home/isucon/webapp/perl/lib/Isucon3/Web.pm line 140 */ username FROM users WHERE id='213'\G
11:46 <@kamipo> SELECT /* /home/isucon/webapp/perl/lib/Isucon3/Web.pm line 107 */ count(*) FROM memos WHERE is_private=0\G
11:46 <@kamipo> SELECT /* /home/isucon/webapp/perl/lib/Isucon3/Web.pm line 267 */ * FROM memos WHERE user='131' ORDER BY created_at\G
11:47 <@kamipo> SELECT /* /home/isucon/webapp/perl/lib/Isucon3/Web.pm line 217 */ id, content, is_private, created_at, updated_at FROM memos WHERE user='164' ORDER BY created_at DESC\G
12:41 <@Yappo> git clone isucon3:/home/isucon/webapp
12:41 <@Yappo> cd isucon3
12:41 <@Yappo> git push origin topic-oreore
12:50 < gfx> . ~/.bashrc したらpromptにcurrent branchだすようにしたよ。
12:55 <@Yappo> git push origin topic-yappo-users-cache
13:12 < gfx> TODO: order byの created_at DESC, を消す
13:17 <@Yappo> やったら
13:17 <@Yappo> Result: SUCCESS
13:17 <@Yappo> RawScore: 3828.3
13:17 <@Yappo> Fails: 0
13:17 <@Yappo> Score: 3828.3
14:30 <@kamipo> https://gist.github.com/kamipo/12c12cba963feb4b9028
15:16 <@kamipo> INSERT INTO public_memos_count(max_id, count) SELECT MAX(id), COUNT(*) FROM public_memos;
15:16 <@Yappo> sudo isucon3 benchmark --init /home/isucon/webapp/perl/scripts/benchmark-init.pl
15:24 <@kamipo> sprintf("SELECT memos.* FROM public_memos JOIN memos ON public_memos.memo_id=memos.id WHERE public_memos.id <= (SELECT max_id FROM public_memos_count) - %d ORDER BY public_memos.id DESC LIMIT 10 0", $page * 100)
15:58 < gfx> scp -r isucon3:/home/isucon/webapp/perl/nytprof .
16:49 <@Yappo> cat ~/access.log | awk '{ print $6 " " $7 }' | sort | uniq -c | sort -r | less
17:17 <@Yappo> sudo isucon3 benchmark --init /home/isucon/webapp/perl/scripts/benchmark-init.pl --workload 2
17:29 -!- Netsplit *.net <-> *.split quits: gfx
18:17 <@Yappo> 86dc840f1c3c5f04aee026c3c8b7741c7e0f49bc
18:28 <@Yappo> cat ~/kamipo/init.sql | mysql -uisucon isucon; ./perl/scripts/benchmark-init.pl; sudo isucon3 test
18:28 <@Yappo> cd webapp; cat ~/kamipo/init.sql | mysql -uisucon isucon; ./perl/scripts/benchmark-init.pl; sudo isucon3 test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment