Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

ASP.NET + Web Connection Performance

$
0
0
ASP.NET + Web Connection Performance
ASP.NET
ASP.NET + Web Connection Performance
Apr. 24, 2013
07:01 pm
3RP14SBDOShow this entire thread in new window
Gratar Image based on email address
From:Joel Leach
To:All
I've had my fill of COM and threads for now, so I'm playing with the Web Connection demo to get a feel for what it might be like to use it in conjunction with ASP.NET. There's a lot more to WC than its function as a pool manager for Fox servers, so I'm interested in that stuff as well. My first task is to find out what kind of hit I'll take forwarding Fox requests from ASP.NET to WC, and I've put together a little test. Here's a very simple function I added to wwdemo.prg:

Function JoelTest Response.Write("This is a test.")EndFunc

Here is the code in an ASP.NET Web Form button click:

System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start();string baseUri = "http://localhost/wconnect_demo/JoelTest.wwd";for (int i = 0; i < 10; i++) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseUri); request.Method = "GET"; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream());string page = reader.ReadToEnd(); reader.Close(); response.Close(); } sw.Stop();this.lblResponse.Text = "Total WC time: " + sw.ElapsedMilliseconds.ToString() + "<br>";

The times for each request were all over the map, so I ran 10 back to back. The average was roughly 200-250ms per request. There are quite a few caveats I realize:

1. This is the demo version.
2. It is a single WC instance.
3. It is operating in file mode.
4. This isn't a raw throughput test. I'm only sending one request at a time.
5. I don't know how much of the time is on the .NET side.
6. This is my desktop development computer, and my hardware is showing its age.
7. It's entirely possible I have something configured wrong.

All things considered, 250ms isn't bad, but I'm wondering if I should expect better. There may be a flaw in my test. I also did a little testing with Microsoft's Stress Tool directly against the WC server. If I pump up the threads, I can get about 55 requests per second. If I use only one thread, it drops to 4-5 requests per second, consistent with my test from ASP.NET. So again, we're not talking about throughput, I'm just trying to get an indication of how long an average individual request takes to process.

EDIT: I just had a thought. I wonder if I'm hitting a file polling interval here. Since I'm only sending one request at a time, WC can only process as fast as the file system updates. If I send multiple requests through the Stress Tool then WC can process more requests/second because it sees more files between intervals. I imagine that issues mostly goes away in COM mode.

Thanks,

Joel


Viewing all articles
Browse latest Browse all 10393

Trending Articles