Note that there are some explanatory texts on larger screens.

plurals
  1. POTuning a WCF File Server
    text
    copied!<p>I'm tuning a server and need some guidance. This server provides the following features:</p> <ol> <li>an ASPX page with a DB call that is downloaded approximately every 3 minutes by several thousand machines</li> <li>a simple ASP.NET admin web site used by a tiny number of people but that must be highly available</li> <li>a WCF service that provides file synchronization to another several thousand clients using BasicHttpBinding and Streamed messages.</li> </ol> <p>When an update is available to the file-sync clients (#3), they swarm the server clamoring for their new data. Without aggressive throttling they eat up all available ASP.NET worker threads and cause #1 and #2 to hang. This, as the kids say, sux0rs.</p> <p>I've reproduced this problem on a 4-proc server. With a test client creating 100 simultaneous downloads, I see that 48 downloads are running simultaneously; in perfmon I see the remainder queueing up in ASP.NET->Requests In Application Queue. This jibes with the "12 concurrent threads per CPU" default setting described <a href="http://msdn.microsoft.com/en-us/library/ms998549.aspx#scalenetchapt06_topic8" rel="nofollow noreferrer">in this article</a>. CPU and memory look fine; it's really just shuttling bytes with no processing.</p> <p>As I see it, there are a couple of things I could do, possibly in concert.</p> <ol> <li>Up the maxIOThreads and maxWorkerThreads in machine.config</li> <li>Set up a web garden</li> <li>Redo the client so downloads are handled directly instead of via WCF (eg link directly to the file instead of streaming it in a message).</li> </ol> <p>My questions:</p> <ul> <li>Aside from trial and error, what are good guidelines for increasing the number of threads given that each is going to be in use for a pretty long time with low CPU/memory usage? If I go this route, how do I ensure the task switching for the increased number of threads doesn't overwhelm the system and cause more problems?</li> <li>Would a web garden help in this situation?</li> <li>Will I see much better performance if I get the download out of WCF and let IIS handle it entirely?</li> </ul> <p>Best, roufamatic</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload