GithubHelp home page GithubHelp logo

isucon / isucon6-qualify Goto Github PK

View Code? Open in Web Editor NEW
69.0 10.0 56.0 67.06 MB

License: MIT License

Makefile 0.85% Go 50.33% Perl 4.59% Shell 2.11% Nginx 0.73% JavaScript 8.46% HTML 7.68% PHP 6.16% CSS 0.03% Python 4.47% Ruby 4.66% Scala 9.92%

isucon6-qualify's Introduction

ISUCON6 予選リポジトリ

レギュレーションは Regulation.md に書かれています。

リポジトリ内容

  • bench/ ベンチマーカー及びワーカー
  • cmd/isupam/ スパムチェッカーisupamのソースコード
  • cmd/importpages/ Wikipediaデータインポーター
  • db/ 競技用のMySQL初期データのSQL
  • portal/ 競技用ポータルのソースコード
  • provisioning/ Asure deployに利用したansible playbook
  • tools/ 問題作成時に利用したスクリプト群
  • webapp/ 予選用各言語参考実装ファイル等

利用したデータについて

キーワードデータ

日本語版Wikipediaの2016年7月1日時点のdumpデータを利用しています。

日本語版Wikipediaのライセンスに準じ、以下の文書素材は CC-BY-SA 3.0(https://creativecommons.org/licenses/by-sa/3.0/)に従って公開されています。

  • db/isuda_entry.sql
  • bench/isucon6q/data/ng.json
  • bench/isucon6q/data/ok.json
  • bench/isucon6q/data/init.json
  • bench/isucon6q/data/year.json

これらのファイルは、 cmd/importpages/ と tools/ 以下のスクリプトファイルを用いて生成されました。利用されているデータの二次利用元のURLは URLs.txt に記載されています。

スパムワード一覧

以下のサイトの放送禁止用語一覧を利用しました。公開にあたりサイト管理者の許諾を得ています。

http://monoroch.net/kinshi/
http://monoroch.net/kinshi/kinshi.csv

isucon6-qualify's People

Contributors

songmu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

isucon6-qualify's Issues

ベンチマーカーのコネクションリーク

https://github.com/isucon/isucon6-qualify/blob/master/bench/cli.go#L70
ここで scenario 関数を実行するたびに NewSession() していて、

https://github.com/isucon/isucon6-qualify/blob/master/bench/checker/session.go#L46
ここで Session ごとに Transport を作ってしまっているのですが、 Transport はコネクションプールに
なっているので、 Session & Transport を GC 任せに破棄すると、その Transport に
残っている http クライアントのコネクションが開放されずにベンチマーカー終了まで
残ってしまうように見えます。

そのため、アプリ側のチューニングが進むと、ベンチマーカー側が too many open files になったり、
ポートが枯渇したりして、スコアが上がらなくなります。

回避策としては、

  1. 一つの大きめの Transport を用意し、全部の Session で共有する
  2. どうしても Session 間で Transport を共有したくない場合は、 scenario の終了後 (Transportがもう利用されてない状態で) CloseIdleConnections を呼ぶことで、 keep-alive しているコネクションを開放してやる

Go の想定している使い方としては 1 の方がおすすめですが、それだと1つのTCPコネクションを
通して複数のユーザーのhttpリクエストが送られてくることになるので、多数のブラウザからの
(ロードバランサーなどを介さない)接続をエミュレートしたいなら 2 の方が近くなります。

ビルド成果物の取得ができないため、Ansible実行に失敗する

予選中は、ビルド成果物をisucon6qimage.blob.core.windows.net以下に配置していたが、競技後の運営アカウントの廃棄に伴い、存在しないドメインであるisucon6qimage.example.comに書き変えた。現在では、Ansible実行時にビルド成果物を取得できなくなっている。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.