I'm working on a desktop where respnsiveness is extremely important. When the app is running, it is receiving and sending out streams of data. It is also updating the display for the user.
We also have a background timer (System.Threading.Timer) that runs every second and logs some statistics to a file using log4net.
The garbage collection is configured to be the default gcConcurrent=true, gcServer=false. The resulting LatencyMode is "Interactive". The app is running on Windows Server 2008 on a 4 core machine with 8 Gb RAM. There is plenty of free memory.
Once in a while the app becomes unresponsive for up to 10 seconds. The GUI freezes up, but the most interesting thing is that the Timer stops firing! When the "freeze" is over, the missed timer events are processed in rapid succession. The Timer callback is very lightweight and does very minimal logging - 1 line.
The question is - what could cause the freezing?