私は、単一のマシンでのクライアントサーバー通信に netty nio を使用しています。
同じクライアント/サーバー プログラムは、特定の Windows 2003 マシンを除いて、多くのサーバーで正常に動作します。
サーバーが実行されていないときにクライアントが接続を試みると (予想どおり、タイムアウト後に例外が発生します)、サーバーでの割り込みの数が劇的に増加します。
通常、割り込みの数 (Windows パフォーマンス GUI で表示) は平均 300/秒です。クライアントが接続を試みると、割り込みは約 1000/s に達します。
クライアントが再接続を試みない場合でも、クライアントが実行されている限り、割り込み/秒は高いままであり、接続できるようになると高いままになります。
クライアントが最初の試行でサーバーに接続できる場合、これは発生しません。
割り込み回数が増えると、サーバー クロックが大幅にずれます。
何が起こっているのか、それを回避する方法についてのアイデアや提案はありますか?
読んだ後: http://blogs.technet.com/b/markrussinovich/archive/2008/04/07/3031251.aspx
KernRate を実行すると、次の結果が得られます。
クライアントが接続を試みるとき:
P0 K 0:00:00.015 ( 0.2%) U 0:00:00.031 ( 0.4%) I 0:00:07.265 (99.4%) DPC
0:00:00.000 ( 0.0%) Interrupt 0:00:00.000 ( 0.0%)
Interrupts= 6117, Interrupt Rate= 837/sec.
Context Switches , 307153, 42004/sec.
System Calls , 404125, 55265/sec.
Page Faults , 1050, 144/sec.
I/O Read Operations , 143, 20/sec.
I/O Write Operations , 386, 53/sec.
I/O Other Operations , 1407, 192/sec.
I/O Read Bytes , 14712, 103/ I/O
I/O Write Bytes , 49575, 128/ I/O
I/O Other Bytes , 182356, 130/ I/O
Module Hits msec %Total Events/Sec
intelppm 11144 7311 97 % 38106962
ntoskrnl 196 7311 1 % 670222
hal 69 7311 0 % 235945
win32k 53 7311 0 % 181233
ramirr2 6 7311 0 % 20517
afd 2 7311 0 % 6839
tcpip 2 7311 0 % 6839
Ntfs 1 7311 0 % 3419
bxvbdx 1 7311 0 % 3419
クライアント プロセスが実行されていない場合:
P0 K 0:00:00.015 ( 0.3%) U 0:00:00.000 ( 0.0%) I 0:00:04.546 (99.7%) DPC
0:00:00.000 ( 0.0%) Interrupt 0:00:00.000 ( 0.0%)
Interrupts= 2213, Interrupt Rate= 485/sec.
Total Avg. Rate
Context Switches , 9398, 2060/sec.
System Calls , 29104, 6379/sec.
Page Faults , 2158, 473/sec.
I/O Read Operations , 130, 28/sec.
I/O Write Operations , 273, 60/sec.
I/O Other Operations , 619, 136/sec.
I/O Read Bytes , 12029, 93/ I/O
I/O Write Bytes , 37754, 138/ I/O
I/O Other Bytes , 92840, 150/ I/O
Module Hits msec %Total Events/Sec
intelppm 7208 4561 99 % 39508879
ntoskrnl 20 4561 0 % 109625
win32k 10 4561 0 % 54812
hal 4 4561 0 % 21925
ramirr2 3 4561 0 % 16443
tcpip 3 4561 0 % 16443
Ntfs 1 4561 0 % 5481
-- ロン