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

ISUCON6本選の裏話 @ ISUCON6裏話Night

ISUCON6本選の裏話 @ ISUCON6裏話Night

Atsushi Takayama

November 23, 2016
Tweet

More Decks by Atsushi Takayama

Other Decks in Technology

Transcript

  1. ෛՙΛ͔͚Δ ࠷ॳʹNຊͷίωΫγϣϯΛுΔ 5ඵޙʹ৽ͨʹ N - (a + b) ຊͷ઀ଓΛࢼΈΔ
 a:

    ·ཱͩ֬͞Ε͍ͯͳ͍ίωΫγϣϯ਺
 b: طʹ੾அࡁΈͷίωΫγϣϯ਺
 N = N + N - (a + b) ͱ͢Δ ҎԼϧʔϓ ʢ͜Εͩͱݱࡏཱ͍֬ͯ͠ΔίωΫγϣϯ਺ͱಉ͡਺ͷίωΫγϣϯΛ5ඵ ͝ͱʹషΖ͏ͱͯ͠ɺͲΕ͚ͩ࠷దԽͯ͠΋Too many connections͕ग़Δͱ ຊબޙʹࢦఠ͞Εͨʣ
  2. ͜Ε·ͰͷϕϯνϚʔΧʔ ISUCON4: Go, ISUCON5: Java ͍ͣΕ΋࠶ར༻Λߟ͑ΒΕ͍ͯͨΑ͏Ͱ͕͢ɺϑϧεΫϥονͨ͘͠ ͳΔͷ͕ϓϩάϥϚʔͷਓ৘ ISUCON6: Go ࣾ಺ISUCONͷͱ͖ʹcatatsuy͕࡞ͬͨ΋ͷ͕ϕʔε

    ISUCON6༧બ΋͜ͷ࣮૷Λ౿ऻ͍ͯͨ͠ ࣾ಺ISUCONͷϕϯνϚʔΧʔ͸͚ͬ͜͏ྑ͔͕ͬͨɺ͍͔ͭ͘ؾʹ ೖΒͳ͍ͱ͜Ζ͕͋ͬͨͷͰɺ࣮͸ຊબʹ޲͚ͯ·ͨ࠶࣮૷ͨ͠
  3. ch1 := makeChan(10) ch2 := makeChan(2) timeoutCh := time.After(60* time.Second)

    L: for { select { case <-ch1: go func() { scenario.LoadIndexPage(origins) time.Sleep(500 * time.Millisecond) ch1 <- struct{}{} }() case <-ch2: go func() { scenario.DrawOnRandomRoom(origins) time.Sleep(500 * time.Millisecond) ch2 <- struct{}{} }() case <-timeoutCh: break L } }