{"id":24923161,"url":"https://github.com/doarakko/isucon13","last_synced_at":"2025-03-28T11:17:17.583Z","repository":{"id":258534010,"uuid":"870577361","full_name":"Doarakko/isucon13","owner":"Doarakko","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-08T14:51:38.000Z","size":629,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T07:03:46.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Doarakko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T09:43:53.000Z","updated_at":"2024-12-08T14:51:42.000Z","dependencies_parsed_at":"2024-10-26T17:21:37.366Z","dependency_job_id":null,"html_url":"https://github.com/Doarakko/isucon13","commit_stats":null,"previous_names":["doarakko/isucon13"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fisucon13","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fisucon13/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fisucon13/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fisucon13/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doarakko","download_url":"https://codeload.github.com/Doarakko/isucon13/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246017722,"owners_count":20710240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T11:36:41.191Z","updated_at":"2025-03-28T11:17:17.561Z","avatar_url":"https://github.com/Doarakko.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# isucon13\n\n## Manual\n\n- [本選当日マニュアル](https://github.com/isucon/isucon13/blob/main/docs/cautionary_note.md)\n- [アプリケーションマニュアル](https://github.com/isucon/isucon13/blob/main/docs/isupipe.md)\n- [コード](https://github.com/isucon/isucon13)\n\n## Rules\n\n- 1つの修正ごとにブランチを切ってベンチマークを実行する\n- ブランチ名はアルファベット・数字のみで記号は含めない\n- 以下を PR に添付する\n  - ベンチマークの実行結果\n  - スロークエリの解析結果\n  - アクセスログの解析結果\n\n## Getting Started\n\n### GitHub issue の作成\n\n各種手順を Todo リストにしたテンプレートを用意しているためそちらを利用する\n\n### ssh\n\n各種コマンドは isucon ユーザーで SSH 接続する想定で作られています。\nisucon ユーザーで SSH できるように、以下を参考に公開鍵を登録してください。\nhttps://isucon-workshop.trap.show/text/chapter-2/2-EnterServerAndSomeSetting.html\n\n#### local host\n\n```sh\ncd ~/.ssh\nssh-keygen -t ed25519 -f isucon13\ncat ~/.ssh/isucon13.pub\n\u003cpublic key\u003e\n```\n\n`~/.ssh/config`\n\n```\nHost isucon13\n  HostName ec2-18-179-36-166.ap-northeast-1.compute.amazonaws.com\n  User isucon\n  IdentityFile ~/.ssh/isucon13.pub\n```\n\n#### remote host\n\n```sh\necho \"\u003cpublic key\u003e\" \u003e\u003e ~/.ssh/authorized_keys\n```\n\n### GitHub\n\nhttps://isucon-workshop.trap.show/text/chapter-3/0-Github.html\n\n### 秘伝のタレを配置\n\n- `Makefile`\n  - 各種変数を更新\n    - `BIN_NAME`\n    - `SERVICE_NAME`\n    - `MYSQL_DB_NAME`\n  - ベンチ実行コマンドを更新\n- `setup.sh`\n- `deploy.sh`\n  - 接続する SSH ユーザ名を更新\n- `config/alp.yml`\n\n### Setup tools\n\n- MySQL・nginx の設定ファイルをホームディレクトリ下にコピー\n- alp\n- pt-query-digest\n- pprof\n\n```sh\nssh isucon13\nmake setup\n```\n\n### MySQL・nginx の設定ファイルをGit管理\n\n`make setup` 実行後に行うこと\n\n```sh\ngit add mysql/* nginx/*\ngit commit -m \"add MySQL and nginx config files\"\ngit push origin main\n```\n\n### MySQL のスロークエリのログを有効にする\n\nhttps://isucon-workshop.trap.show/text/chapter-3/1-SlowQueryLog.html\n\n### nginx のアクセスログのフォーマットを変更する\n\nhttps://isucon-workshop.trap.show/text/chapter-3/2-AccessLog.html\n\n### New Relic\n\n```sh\ncp /home/isucon/webapp/go/.env.example /home/isucon/webapp/go/.env\nsudo systemctl restart isupipe-go.service\n```\n\nhttps://newrelic.com/jp/blog/how-to-relic/isucon-go-agent\n\n\n### pprof\n\nhttps://isucon-workshop.trap.show/text/chapter-3/3-pprof.html\n\n## Usage\n\n### ssh\n\n```sh\nssh isucon13\n```\n\n### DB 接続\n\n```sh\nssh isucon13\nmake mysql\n```\n\n### ベンチマーク実行\n\n```sh\nssh isucon13\nmake bench\n```\n\n### スロークエリの解析\n\n```sh\nssh isucon13\nmake slowq\n```\n\n### アクセスログの解析\n\n```sh\nssh isucon13\nmake alp\n```\n\n### デプロイ\n\nメインブランチ\n\n```sh\nmake deploy\n```\n\n特定ブランチ\n\n```sh\nmake deploy-\u003cbranch name\u003e\n```\n\n以下がデプロイ対象で、リスタートも自動で行なっているため追加作業は不要\n\n- アプリケーション\n- `nginx.conf`\n- `mysqld.cnf`\n\n### サービスステータスの確認\n\n```sh\nssh isucon13\nmake check-service-status\n```\n\n### サービスログの確認\n\n```sh\nssh isucon13\nmake watch-service-log\n```\n\n## Hints\n\n### CPU 使用率・メモリ使用率等の確認\n\nリアルタイムで更新されるため基本的に常に起動しておく\n\n```sh\nssh isucon13\ntop\n```\n\n### nginx のアクセスログから特定のリクエストを抽出\n\n```sh\nssh isucon13\nsudo grep -E \"/api/user/.+/icon\" /var/log/nginx/access.log\nsudo zgrep -E \"/api/user/.+/icon\" /var/log/nginx/access.log.gz\n```\n\n## References\n\n- [ISUCON初心者向け講習会](https://isucon-workshop.trap.show/)\n- [matsuu/aws-isucon](https://github.com/matsuu/aws-isucon)\n- [south37/00_timeline.md](https://gist.github.com/south37/d4a5a8158f49e067237c17d13ecab12a)\n- [ISUCON入門以前_ISUNARABE_LT#1](https://speakerdeck.com/sadnessojisan/isuconru-men-yi-qian-isunarabe-lt-number-1)\n- [壁を感じたISUCON12本戦](https://poyo.hatenablog.jp/entry/2022/08/28/191329)\n- [ISUCON予選突破を支えたオペレーション技術](https://blog.yuuk.io/entry/web-operations-isucon)\n- [Linuxサーバにログインしたらいつもやっているオペレーション](https://blog.yuuk.io/entry/linux-server-operations)\n- [ISUCON4 予選でアプリケーションを変更せずに予選通過ラインを突破するの術](https://kazeburo.hatenablog.com/entry/2014/10/14/170129)\n- [ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版](https://www.slideshare.net/slideshow/isucon-summerclass2014action2final/38224673)\n- [ISUCONの勝ち方 YAPC::Asia Tokyo 2015](https://www.slideshare.net/slideshow/isucon-yapcasia-tokyo-2015/51993443)\n- [ISUCON予選突破を支えるオペレーション技術 / Web Operations about ISUCON](https://speakerdeck.com/yuukit/web-operations-about-isucon)\n- [Ansible playbooks for isucon](https://github.com/pddg/isu12f)\n- [[ISUCON用] 複数台同時デプロイスクリプト(Golang)](https://qiita.com/momotaro98/items/694000dfb736d0316441)\n- [MEMORYストレージエンジンでMySQLのパフォーマンスをあげよう](https://qiita.com/hirose-ma/items/c4a10d31a47a5421bb9c)\n- [traP-isucon-newbie-handson2022](https://github.com/oribe1115/traP-isucon-newbie-handson2022)\n- [matsuu/kataribe](https://github.com/matsuu/kataribe)\n- [jpr5/ngrep](https://github.com/jpr5/ngrep/)\n- [netdata/netdata](https://github.com/netdata/netdata)\n- [単独のサーバーの「負荷」の正体を突き止める](https://tetsuyai.hatenablog.com/entry/20120105/1325750731)\n- [MySQLのストレージエンジンについて](https://qiita.com/ishishow/items/280a9d049b8f7bcbc14a)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoarakko%2Fisucon13","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoarakko%2Fisucon13","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoarakko%2Fisucon13/lists"}