タグ

2008年12月4日のブックマーク (3件)

  • compiler - Vidar Hokstad V2.0 Rubyでコンパイラを書くチュートリアル

    (To follow my compiler related posts, either subscribe to my main RSS feed, or the compiler specific one ) Back in March 2008 I started publishing a series on how to write a compiler in Ruby, bottom up, that is, starting with the code generator and working my way up instead of the more traditional approach of writing the parser first. Here are the parts I've published on my blog so far. (The bits

    korin
    korin 2008/12/04
  • writevによるパケット最適化

    について書くはずだったんだけど何を書くのかわすれた! とりあえず基礎的なことについてまとめておく。 バイナリはunstrippedなものを使用 できれば-gオプションこみでコンパイルしておく。 coredumpを吐くようにbashを設定 ulimit組み込みコマンドを使用 ulimit -c unlimited 実行&落とす! (core dumped)の文字を確認。core.PIDという名でコアダンプができてるハズ gdbでデバッグ gdb バイナリ コアファイルあとはスタックを解析するなり変数の値を確認するなりお好きにどうぞ! メモ connect() EINPROGRESSを確認 write待ちする→起こされる つながってる! 小さいwrite(2)を大量に呼んでいると、予想以上に細かいパケットがちまちま送信されてしまい、スループットの低下につながることがある。 writev(2)を

    writevによるパケット最適化
    korin
    korin 2008/12/04
  • TCP_CORK: More than you ever wanted to know

    TCP_CORK: More than you ever wanted to know Christopher Baus | 06 Apr 2005 I previously mentioned the leakiness of Unix's file metaphor. The leak often becomes a gushing torrent when trying to bump up performance. TCP_CORK is yet another example. Before I get into the details of TCP_CORK and the problem it addresses, I want to point out that this is a Linux only option, although variants exist on

    TCP_CORK: More than you ever wanted to know
    korin
    korin 2008/12/04