473,395 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

concurrent connections

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
Nov 18 '05 #1
9 2784
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"
<st*****@newsgroups.nospam> 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


Nov 18 '05 #2
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
Nov 18 '05 #3
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

Nov 18 '05 #4
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"
<st*****@newsgroups.nospam> 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"
<st*****@newsgroups.nospam> 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
Nov 18 '05 #5
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)?
Nov 18 '05 #6
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
Nov 18 '05 #7
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

Nov 18 '05 #8
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
Nov 18 '05 #9
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

Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sebastian | last post by:
Hi all ! Does someone know how many concurrent connections 2005 Express can accommodate ? The limit on MSDE was 5 before performance drops considerably. Thanks for your help. Sebastian
11
by: Durai | last post by:
Hi All, I tested "concurrent testing" in MySQL. It works fine. But I couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I used the PHP script to update table( one script...
1
by: Krysa | last post by:
Access 2K, DAO, split front end and back end; back end on server. Regarding max of 255 concurrent users. Is it really users, or connections? How would a user have more than one connection to same...
2
by: Steven Blair | last post by:
Hi, I have Server application which handles a single conenction froma client. I want this program to accept concurrent connections. Anyone help me out ? I am using a TcpListener object. I...
3
by: Animesh | last post by:
Hi All, I have a lexical analyzer in flex/bison associated with a lot of custom C function calls linking to external programs which uses quite a lot of global variables and data structures. The...
3
by: em | last post by:
hi, i can't make more than two concurrent requests to a php script - i mean when i make say 20 simultaneous requests then two first execute but 18 remaining are waiting for them, then the next two...
1
by: Jay Douglas | last post by:
Sorry for the cross post but I was hoping between developers and systems ppl I can get answer to this question. I've searched; found issues similar to mine but the solutions are not working. My...
3
by: zom | last post by:
I have a need to have three plus frames with concurrent connections to a web server, and all of them able to communicate with the parent page. To overcome the 2 concurrent connections limit I used...
0
by: contactme | last post by:
Hi, Is it possible to open concurrent connections using Net::IMAP::Simple library ? My IMAP server allows 4 connections per ip, so I am having following problems while using Net::IMAP::Simple and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.