My C# program is receiving a lot of data via multiple sockets and it appears that I have problems that the TCP cache on the Windows Kernel is getting overloaded.
This can be seen by the following results from the tcpdump from the server:
18:02:18.963370 IP xxxx > yyyy.zzz: . ack 10017011 win 0
Which data structure/strategy would you use to cache the read data to avoid the overload on C#?
I am currently working with a delegate for every socket in a seperate thread which is called after every read record, but this seems to be a problem, so that I might need to split it into two threads.
Or should I look at tweaking the TCP parameters on the Windows side? I am using Windows 7.
Are there any books for the kernel optimization?
I was really blindsided that the program got slower even though the load is around 20-25 % for the full machine and 50-60 % on the highest loaded core.