C言語でネットワークプログラムを実装する際のメモ。動作環境はLinux系OSを対象としている。 TCPのkeep-aliveオプション ソケットを開く際に、TCPのkeep-aliveオプションを設定するとアイドル状態が続いた際に、プローブパケットを送出し、通信相手との接続を確認し維持しようとする。逆にプローブパケットにACKが帰ってこないと通信相手との切断を検出できることとなる。 デフォルトではアイドル状態が7200秒=2時間経た後、プローブパケットを75秒間隔で9回送信する。プローブパケットに対するACKの応答がないと、通信相手がいなくなったと判断し、アイドル状態の通信を終了する。 つまり、アイドル状態に入ってから、7200秒+75x9秒=7875秒 = 131.25秒 = 2時間11分経過すると通信を終了する。なお、SO_KEEPALIVE ソケットオプションが有効になっていないと
Post navigation ← Previous Home > Web関連 > 開発 > Linux > Linuxカーネルチューニングのメモ Linuxカーネルチューニングのメモ サーバー向けにLinuxカーネルのチューニングを行った際のメモです。 設定内容 今回行った /etc/sysctl.conf の設定内容は書きの通りです。 各パラメータの説明はコメントとして残しておきます。 # 共有メモリの最大サイズ。サーバーの搭載メモリ(1GB)に合わせて変更 kernel.shmmax = 1073741824 # システム全体の共有メモリ・ページの最大数 kernel.shmall = 262144 # システム全体のプロセス数の上限 kernel.threads-max = 1060863 # システム全体のファイルディスクリプタの上限 fs.file-max = 5242880
Quite often in the course of troubleshooting and tuning things I find myself thinking about the following Linux kernel settings: net.core.netdev_max_backlog net.ipv4.tcp_max_syn_backlog net.core.somaxconn Other than fs.file-max, net.ipv4.ip_local_port_range, net.core.rmem_max, net.core.wmem_max, net.ipv4.tcp_rmem, and net.ipv4.tcp_wmem, they seems to be the important knobs to mess with when you ar
$ dmesg ....... possible SYN flooding on port xxx. Sending cookies. possible SYN flooding on port xxx. Sending cookies. possible SYN flooding on port yyy. Sending cookies. possible SYN flooding on port yyy. Sending cookies. possible SYN flooding on port xxx. Sending cookies. possible SYN flooding on port xxx. Sending cookies. possible SYN flooding on port xxx. Sending cookies. Cause This could be
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く