Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ISUCON夏期講習2017 講義編 / isucon summer school 1

ISUCON夏期講習2017 講義編 / isucon summer school 1

FUJIWARA Shunichiro

August 25, 2017
Tweet

More Decks by FUJIWARA Shunichiro

Other Decks in Technology

Transcript

  1. ISUCON શઓ੷ ISUCON 1 - ༏উ (@songmu @sugyan) ISUCON 2

    - ༏উ (@songmu @typester) ! ISUCON 3 - ग़୊ ISUCON 4 - 3Ґ (@acidlemon @handlename) ISUCON 5 - ༏উ (@songmu @sugyan) ISUCON 6 - ४༏উ (@moshisora990 @kasari)
  2. ISUCON 1,2 - ઌணॱຊબظ ༧બͳ͠ ઌணॱͰਃ͠ࠐΜͩνʔϜ͕ࢀՃͰ͖Δ (20νʔϜ) ISUCON 1 ༏উ৆ۚ10ສԁ

    ͓୊: blogͷίϝϯτཝ ग़୊: Livedoor1 ISUCON 2 ༏উ৆ۚ30ສԁ ͓୊: νέοτൢചαΠτ ग़୊: NHN Japan1 1 ͲͪΒ΋ݱ LINE
  3. ISUCON 3,4 - ༧બϩʔΧϧϕϯνظ ༧બɺֶੜ࿮͕Ͱ͖ͨ ༧બ͸ AWS ্ͷΠϯελϯεΛ֤νʔϜ͕1୆ىಈ ϕϯνϚʔΫ͸Πϯελϯε্ͷϓϩάϥϜ(Go੡όΠφϦ)͕ localhost

    ʹର࣮ͯ͠ߦ ISUCON 3 ༏উ৆ۚ100ສԁ(Ҏޙಉ͡) ͓୊: Nopaste / ը૾౤ߘSNS ग़୊: ΧϠοΫ ISUCON 4 ͓୊: ͍͢͜Μۜߦ / ಈը޿ࠂ഑৴ ग़୊: Cookpad
  4. ISUCON 5,6 - ༧બϦϞʔτϕϯνظ ༧બ͸ GCP(5) Azure(6) ্ͷΠϯελϯεΛ֤͕ࣗىಈ ϕϯνϚʔΫ͸ӡӦ͕༻ҙͨ͠Πϯελϯε͕ ֤ࣗͷΠϯελϯεʹର࣮ͯ͠ߦ

    ISUCON 5 ͓୊: SNS(mixiతͳ) / ϚΠΫϩαʔϏε ग़୊: Treasure Data ISUCON 6 ͓୊: ΩʔϫʔυࣗಈϦϯΫ / ͓ֆ͔͖ڞ༗αΠτ ग़୊: ͸ͯͳ(༧બ) pixiv(ຊબ)
  5. શϓϩάϥϚʔ͕஌Δ΂͖ϨΠςϯγʔ਺3 nano sec L1Ωϟογϡࢀর 0.5 ෼ذ༧ଌࣦഊ 5 L2Ωϟογϡࢀর 7 MutexͷϩοΫͱΞϯϩοΫ

    25 ϝΠϯϝϞϦʔࢀর 100 Zippy[Snappy]ʹΑΔ1KBͷѹॖ 3,000 1GbpsωοτϫʔΫӽ͠ʹ2KBΛૹ৴ 20,000 ϝϞϦʔ͔Β࿈ଓͨ͠1MBͷྖҬͷಡΈग़͠ 250,000 ಉҰσʔληϯλʔ಺ʹ͓͚Δϥ΢ϯυτϦοϓ 500,000 0.5 msec σΟεΫγʔΫ 10,000,000 10 msec σΟεΫ͔Β࿈ଓͨ͠1MBͷྖҬͷಡΈग़͠ 20,000,000 20 msec ύέοτΛΧϦϑΥϧχΞ→Φϥϯμ→ΧϦϑΥ ϧχΞͱૹΔ 150,000,000 150 msec 3 http://norvig.com/21-days.html#answers
  6. ͨͱ͑͹ 1 HTTP ϦΫΤετΛ10msͰฦ٫͢Δ 1ճ͋ͨΓ ճ਺ ߹ܭ LL ͷ HTTP

    αʔόͰ Hello World 0.5ms 1 0.5ms ηογϣϯ؅ཧͷͨΊʹ Redis ʹΫΤϦ 0.5ms 1 0.5ms DBʹରͯ͠5ճΫΤϦΛൃߦ 1ms 5 5ms ςϯϓϨʔτΛϨϯμϦϯ ά 3ms 1 3ms 10 ms/req = 100 req/sec (1ฒྻ) ͪͳΈʹ ISUCON 1 ͷ༏উείΞ͸ 1500 req/sec ૬౰