Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > concurrent connections

Reply
Thread Tools

concurrent connections

 
 
=?Utf-8?B?c3RlcGhlbg==?=
Guest
Posts: n/a
 
      04-24-2004
Hello, I am using ASP.NET as a streaming engine for mp3 and ogg files over HTTP. Basically, the asp.net page sets it's mime content type to audio/mp3 and i write out the file to the stream. We will be having anywhere from 50 to 300 users streaming at once (as well as standard asp.net web pages served). We will be using IIS6, and was wondering if we needed to increase the number of worker threads in machine.config to handle this, or if it is ready to go as is? Or will creating a web garden help? Or any thoughts in general how IIS6 will react to this
Thanks
-Stephen
 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      04-24-2004
Chances are you'll be using all the threads in the thread pool but
have very little CPU activity. You could increase the number of
threads in the thread pool by modifying machine.config, but this would
be one of those situations where you might benefit from managing your
own threads and implementing an asynchronous HTTP handler
(IHttpAsyncHandler). Fritz Onion has written a very good article
explaining how to do this in detail:
http://msdn.microsoft.com/msdnmag/is...g/default.aspx

HTH,

--
Scott
http://www.OdeToCode.com

On Sat, 24 Apr 2004 13:16:03 -0700, "stephen"
<(E-Mail Removed)> wrote:

>Hello, I am using ASP.NET as a streaming engine for mp3 and ogg files over HTTP. Basically, the asp.net page sets it's mime content type to audio/mp3 and i write out the file to the stream. We will be having anywhere from 50 to 300 users streaming at once (as well as standard asp.net web pages served). We will be using IIS6, and was wondering if we needed to increase the number of worker threads in machine.config to handle this, or if it is ready to go as is? Or will creating a web garden help? Or any thoughts in general how IIS6 will react to this?
>Thanks.
>-Stephen


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-27-2004
Hi Stephen,

As for maxWorkderThreads setting in the <processModel>, it is per CPU
based, that means if the "maxWorkerThreads" setting is 25, then if the
machine is single cpu based, then 25 is the limitation for the ASP.NET
runtime to accept the comming requests concurrently. If 2 cpus, that'll be
50. Here is the <processModel> setting's description in MSDN:

#<processModel> Element
http://msdn.microsoft.com/library/en...cessmodelSecti
on.asp?frame=true

Also, the <processModel> setting is somewhat specified to IIS5 and on a
IIS6 based machine(Win2k3), there is another asp.net process isolation
setting called Application Pool setting. So we have multi-choice if using
IIS6, here are the referenceon IIS6's application isolation mode:

#IIS 6.0 Application Isolation Modes
http://msdn.microsoft.com/library/en...0applicationis
olationmodes.asp?frame=true

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


 
Reply With Quote
 
=?Utf-8?B?c3RlcGhlbg==?=
Guest
Posts: n/a
 
      04-27-2004
Thank you for the response. I think I have a grasp on the number of worker threads set by default. What do you think of my original inquiry though, regarding using ASP.NET as a streaming engine for large amounts of users. Could I keep 300 conccurent connections open for minutes at a time while also handling regular short page requests with serious performance problems? If so, what changes would I need to make to my ASP.NET or IIS 6 configuration?

Thanks again
--Stephe


----- Steven Cheng[MSFT] wrote: ----

Hi Stephen

As for maxWorkderThreads setting in the <processModel>, it is per CPU
based, that means if the "maxWorkerThreads" setting is 25, then if the
machine is single cpu based, then 25 is the limitation for the ASP.NET
runtime to accept the comming requests concurrently. If 2 cpus, that'll be
50. Here is the <processModel> setting's description in MSDN

#<processModel> Elemen
http://msdn.microsoft.com/library/en...ocessmodelSect
on.asp?frame=tru

Also, the <processModel> setting is somewhat specified to IIS5 and on a
IIS6 based machine(Win2k3), there is another asp.net process isolation
setting called Application Pool setting. So we have multi-choice if using
IIS6, here are the referenceon IIS6's application isolation mode

#IIS 6.0 Application Isolation Mode
http://msdn.microsoft.com/library/en...60applicationi
olationmodes.asp?frame=tru

Hope also helps. Thanks

Regards

Steven Chen
Microsoft Online Suppor

Get Secure! www.microsoft.com/securit
(This posting is provided "AS IS", with no warranties, and confers no
rights.

Get Preview at ASP.NET whidbe
http://msdn.microsoft.com/asp.net/whidbey/default.asp



 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      04-27-2004
It depends on the hardware also, because the maxWorkerThreads setting
in machine.config specifies threads per cpu. I believe you'd be better
off increasing the thread pool instead of going the web garden route,
but this is one of those situations where you really need to do some
load testing to tweak your application for your environment.

Also, once the threads are maxed, ASP.NET will not deny requests, it
will start to queue them. The requestQueueLimit is also in
machine.config. Once the queue is full, then ASP.NET will deny
requests with a 503 status.

HTH,

On Mon, 26 Apr 2004 12:56:04 -0700, "stephen"
<(E-Mail Removed)> wrote:

>Thanks Scott.
>So, if by default asp.net is set to 20 maxWorkerThreads does that mean that if I am streaming 20 mp3 files over HTTP, then if I had user number 21 request a stream while the others are streaming, ASP.NET would deny the request?
>If so, should I just go ahead and increase the number of maxThreads to the max number of possible concurrent users I want, or should I put the application in a webgarden and increase the number of worker processes?
>
>Thanks.
>
>
>
>
> ----- Scott Allen wrote: -----
>
> Chances are you'll be using all the threads in the thread pool but
> have very little CPU activity. You could increase the number of
> threads in the thread pool by modifying machine.config, but this would
> be one of those situations where you might benefit from managing your
> own threads and implementing an asynchronous HTTP handler
> (IHttpAsyncHandler). Fritz Onion has written a very good article
> explaining how to do this in detail:
> http://msdn.microsoft.com/msdnmag/is...g/default.aspx
>
> HTH,
>
> --
> Scott
> http://www.OdeToCode.com
>
> On Sat, 24 Apr 2004 13:16:03 -0700, "stephen"
> <(E-Mail Removed)> wrote:
>
> >Hello, I am using ASP.NET as a streaming engine for mp3 and ogg files over HTTP. Basically, the asp.net page sets it's mime content type to audio/mp3 and i write out the file to the stream. We will be having anywhere from 50 to 300 users streaming at once (as well as standard asp.net web pages served). We will be using IIS6, and was wondering if we needed to increase the number of worker threads in machine.config to handle this, or if it is ready to go as is? Or will creating a web garden help? Or any thoughts in general how IIS6 will react to this?
> >Thanks.
> >-Stephen

>
>


--
Scott
http://www.OdeToCode.com
 
Reply With Quote
 
=?Utf-8?B?c3RlcGhlbg==?=
Guest
Posts: n/a
 
      04-27-2004
Really, I would think this scenario is quite common, as it is very similar to a large download site that pumps out the download files through script. No matter what middleware they are using, the must allow for a very large amount of concurrent connections. In my instance, I am pumping out the 3-10MB files through ASP.NET, and the client is doing all the buffering itself to stream the file. Lets say I'm running on a dual-zeon with 3GB of RAM. To handle 300 conccurrent connections would it simply work to increase my maxWorkThreads and maxIOThreads in machine.config to 300 (150 per proc)?
 
Reply With Quote
 
=?Utf-8?B?c3RlcGhlbg==?=
Guest
Posts: n/a
 
      04-28-2004
I've read everything that has been recommended and I spent a majority of the date using the stress test tool that comes with VS.net 2003. In one page i tested, i had a thread.sleep in there for anywhere from 2-60 seconds to simulate an open connection where it would be streaming a file to the client. Then i actually tried running it against my code that writes the media file to the response stream. The later got very good performance results (running locally). I have concerns about this asp.net counter "\\ALIEN-1\ASP.NET Applications\Pipeline Instance Count\__Total__" because it shows up after the test is run as 10. Which would mean only 10 concurrent connections from what I read, which is bad bad bad, since I need to keep hundreds of connections open as they stream files to users. (I also tried changing my maxWorkerThreads from 20 to 100,300,500 to test performance. The results where flaky, so I haven't detailed it much here

Should I be concerned about that counter I mentioned, and will that indicate I will not be able to keep hundreds of connections open? I'm feeling a little frustrated that I can't figure this out, but I'm just not able to know for sure with my tests. I really just need to know how I can make sure my configuration is correct to handle all these connections being open for minutes at a time as they stream. Thanks for the help
-Stephen
 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-29-2004
Hi Stephen,

As for the best practice on this issue, I'm currently consulting some
further experts and I'll update you as soon as I've got any new infos.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

 
Reply With Quote
 
=?Utf-8?B?c3RlcGhlbg==?=
Guest
Posts: n/a
 
      04-29-2004
Thank you very much Steven. I appreciate your help as this will go into production this summer and my testing as not proved to me the best way.

-Stephen
 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      05-03-2004
Hi Stephen,

Sorry for keeping you wait for so long time. I've just got some suggestions
from some other solutoin integrated engineers. Here are their original
messsage:

================================================== =====================

I would have him run ACT on two remote machines to stress his web
application. Running it locally could impact the number of actual requests
per second. Also increasing the maxWorkerThreads count will introduce more
context switching which could have a negative impact on performance. Have
him run the same test with 20, 25, 50, 75 threads and see which number
gives him the best performance. For an idea of how many IIS connections he
is seeing have him check the Web Service objectí»s Current Connections
counter. Also monitor the aspnet requests queued, request execution time,
and requests rejected. Other good counters would be the w3wp.exe processor
time, private bytes and virtual bytes.

================================================== ======================

Hope helps. Good Luck!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pix 501 and Concurrent VPN Connections jaylucasaustin.rr.com Cisco 3 01-29-2006 10:29 PM
problems locating the concurrent EDU.oswego.cs.dl.util.concurrent package Pep Java 6 08-16-2005 07:26 AM
Re: [Twisted-Python] Limiting number of concurrent client connections Jp Calderone Python 0 06-28-2005 02:10 PM
PIX 501, concurrent connections. gooofoofs Cisco 1 04-14-2005 08:07 AM
Tomcat/JSP - multiple concurrent connections from same client Joe Java 0 10-22-2003 01:00 PM



Advertisments