At around 200 connections, my CPU usage reaches 100%. What's weird is that the server process itself "only" takes 20%. The remaining 80% are in the "SYSTEM" process. I have no idea why. At first i thought i was transfering too much data, but no. Don't tell me that 2000 packets of 50 bytes each can bring Windows XP to its knees.
I profiled the code, it seems 60% of the CPU time is spent in a kernel module called "amdk8.sys" in an unknown function. Then around 8% in "hal.dll", in a function called "HalMakeBeep". Now that's really weird. I don't hear any beep, and i'm not playing any sound.. Around 10% in various functions of "fwdrv.sys". The rest in my code. Huh ?
If anybody has suggestions, or knows what these modules do ("amdk8.sys, hal.dll and fwdrv.sys")...
amdk8.sys is the Windows driver for the CPU
hal.dll is Window's library for interfacing hardware (the Hardware Abstraction Layer)
fwdrv.sys seems to be a driver for some firewall programs...are you running a third party firewall?