yoshiki shiota
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # ISUCON10(2020/08/01) ## memo - 夏期講習資料 - https://speakerdeck.com/rosylilly/isucon-xia-qi-jiang-xi-2020 - レギュレーション - http://isucon.net/archives/54753430.html - 過去問置き場 - https://github.com/matsuu/vagrant-isucon ## 今日やること - 何を決めるか洗い出す - 洗い出しものを決める - 当日までどう過ごすかスケジュールを組む - レギュレーション読む ### 何を決めるか - ISUCONの目標 - 打倒CTOチーム - 技術では勝てなさそう - レギュレーション - 役割分担 - DXを高めて倒す - 当日どうするかを決める - 役割 - 計測 - 当日までのスケジュール - 過去問のやる日程 - 当日のやる場所 - 集まる方向で - 利用する言語 - Ruby - 作業領域 - 開始から50分何をするか - よくやる作業手順が手元にある - 全員の言語バージョンが揃っている - 全員の手元のミドルウェアのバージョンが揃っている - 情報共有の仕方が決まっている - デプロイが1コマンドで実行できるようになっている - ロールバックが確実にできることになっている - メンバー間のHRTが確保されている ### 洗い出しものを決める #### ISUCONの目標 - 打倒CTOチーム - 技術では勝てなさそう - レギュレーション - 役割分担 - DXを高めて倒す #### 当日どうするかを決める - 役割 - よっち - インフラ - [インフラ何するん?](https://qiita.com/ihsiek/items/11106ce7a13e09b61547) - [計測系](https://qiita.com/kopug/items/51e0ed4dfa4e20aa64ce) - あだっち、トミー - アプリ - DB - 計測 - masterマージに走らせると嬉しい #### 当日までのスケジュール - 8/1 - キックオフ - 8/9 - 過去問1回目(isucon8) - 8/22 - 過去問2回目(isucon9) - 9/12(当日) #### 当日のやる場所 - 集まる方向で - 塩田家 - 予想外の自体があれば自宅でリモート #### 利用する言語 - Ruby #### 開始から50分何をするか - よっち - ドキュメントを読む・インフラ整備 - あだっち - 手元で開発が進むようにする - トミー - アプリコード読む・とりあえずベンチ実行 #### よくやる作業手順が手元にある #### 全員の言語バージョンが揃っている - ruby - 2.7.0 #### 全員の手元のミドルウェアのバージョンが揃っている - ローカルにインストールする方向で - mysql - `mysql Ver 8.0.19 for osx10.14 on x86_64 (Homebrew)` - nginx - `Version: 1.14.0-0ubuntu1.7` #### 情報共有の仕方 - discordとgithubの連携 - 計測依頼 - 計測結果 - https://github.com/SamSaffron/flamegraph - コンフリクトについて - レビュー部屋 - ボトルネック共有部屋 #### デプロイが1コマンドで実行できるようになっている - 塩田の宿題 #### ロールバックが確実にできることになっている - コミット単位を細かく切る - (共有の目的のため)大きくなる場合はレビューを入れる #### メンバー間のHRTが確保されている #### ローカルの計測方法 - rack-mini-profiler - newrelic ### レギュレーション読む ### memo ### shiota - sshのファイル設定 - remoteのisuconユーザーへのアクセス - githubからpull - pullから実行までのスクリプトをかく - result.jsonにいるのを投げる - bash_profileに記述しててもsuだと反応しない ### adacchi - 開発環境を合わせる - ruby-versionを合わせるのに手が空く - アプリのコードを読む - 手順書作ったけど、あれでよかった? - 開発環境を作ったあとのアクションに悩んだ - ここを決めたい - 今回はnewrelic導入 - よっちタスクで予選のマニュアルを読むがあったけど引き受けてもよかった? ### tommy - ベンチ実行 - よっちさんがどこまでやってるか確認しとけばよかった - ベンチ実行のあとのアクションに悩んだ - 実行中の暇な時間はどうしようか - 今回はマニュアル読む - アプリのコードを読む(途中) ## 決まったこと - yothio - 最初の1時間でインフラ専念 - アプリケーションが動くようにする - コマンド1発でデプロイできるようにする - git pullしてから、pumaのリスタートまで - ローカルからスクリプト一度で行う - sshのconfigを配布する - 最初のベンチはtommy,途中のベンチはyothio - adacchi - ローカルでの開発環境構築手順作成 - rubyのインストール - dataの初期化 - bundlerのバージョン合わせる - 起動コマンドを叩く - 終わったら予選のマニュアルを読む - 要点をまとめる - 加点・減点・禁止事項の共有 - tommy - ベンチが動くか確認 - 問題の切り分けのため - newrelicの導入 - ベンチを回す - newrelic・ベンチ結果を共有して問題箇所を洗い出す ### 最初の1時間後で何やったか - yothio - GithubにIssue登録しベンチ結果を流した - アンシブル流して、webサーバを複数台立てようとした - 途中で目的を見失ってやめた - DBの設定を一部変更 - SSHのconfigを変更に挑戦した - sqldumpを渡した - adacchi - NewRelicでベンチが取れなかった - ベンチマークから下記を調査しようと進めた - user - イベント - `/`の調査をした - `get_events`→`get_event`にリクエストが飛んでいるのを確認 - 両方ともN+1が走ってた - `get_event`のN+1を解消しようとした - SQLは完成した - コードに落とせなかった - 初期データの取得に手間取った - goの環境が整ってなかったため - tommy - NewRelicからベンチが取れなかった - あんまりわからんかったからコードを読んでた - SQLの記述方法を少し理解 - MySqlの記法を調べた - 初期データを入れるように行動した --- - tommy - やること - Sinatoraのインプット - SequelProの使い方を理解するこ --- # 2020/08/22 ## 感想 - adacchi - 最初の1時間でやるべきことは実施できた - tommy - mysql2が嫌いになった - yocchi - 冗長な作業とかはあったけど、やりたいことはできた - comment - newrelicでどこが重いかなど判断できればよかった ## 最初の1時間でやったこと - adacchi - レポジトリ作成まで予選マニュアルを読む - 要点はまとめられたはず - ローカルでの初期データの作成、データベースの初期化、アプリの実行までの手順書作成 - 細かい作業で.ruby-versionの作成,push - mysql2のversion設定,push - アプリのコードを読み始めることができた - tommy - ベンチ実行 - 実行してから挙動把握して、よっちさんにパス - 並行してドキュメント軽く見る - リポジトリ作成後、落としてNewRelicを入れる準備 - 入れるところまでDONE、push - そこからの挙動確認がこれから - mysql2のバージョンの確認 - yocchi - 接続コマンド共有 - ブラウザ確認 - サーバー側のruby-versionあげる - リポジトリ作成 - discordと連携 - nginxの設定を見て、ベンチが実行できるように変更 - 503 Bad Gateway解消 - リクエストタイムアウト問題に対して - nginx側の時間を伸ばせないか?調査中 - 静的ファイルをキャッシュできないか?調査中 ### 次の時にやること - tommyの初動を変更する - adacchiの開発環境作成が整うまではベンチ実行・アプリのコード読む - またnewrelicの導入手順だけ作成して置いて、ローカル確認せずにMR作成する ## 感想 - adacchi - お前と俺は一緒だよ。 - tommy - 「パスワードが漏洩しました。」 - yocchi - タイムアウトが出るとスコアが伸びる...? ### 何したか? - adacchi - https://github.com/yothio/isu_7_practice/pull/5 - GET /fetchの処理を改修 - ベンチで`新着件数が正しくありません`と出て絶望した - tommy - newRelicのymlファイルを発掘して導入 - ランダム文字列の生成が毎度Newしていたので、`SecureRandom`で出すように変更(手元では早くなったけど、どうなんだろう) - /loginの箇所にて、`SELECT *`で全部取得していたところあったので、調査。 - yocchi - mysqlでindexにkeyを貼った - ベンチの実行(スコア伸びた 6000→8000) - レスポンスをgzipで送るように変更 - nginx側でコンテンツキャッシュを有効化調査 - git の省略コマンド - 21 - https://try.newrelic.com/rs/412-MZS-894/images/Get%20Ready%20for%20ISUCON10-2%20-%202020-07-30.pdf # 2020/09/12 ## TODO ### アプリ + DB - [ ] N+1の解消 - [ ] インスタンスキャッシュ(@hoge ||= fuga)できるか - [ ] DBインデックス - [ ]

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully