We are using 6 iFrames on our page. They fetch data from couple of external web services and an internal WCF service and display the data. There is a separate aspx page built for each of the iFrames. From our perf monitoring we found out that at any point only two threads are executing in parallel. Not all 6 threads get executed. What can probably be cause for this? Is there any restriction that more than 2 threads can't be created in parallel? Is there any configuration where I can change this?
问题:
回答1:
This is true of IE6
and IE7
. Nothing to do with DNS. To simulate this, run three or more downloads simultaneously in IE and you will find that only two at a time are executed, the rest will wait. Different case with Firefox, which I believe is 6 - worth checking.
回答2:
Most web browsers set limits on the amount of threads that will be used concurrently for rendering elements. I believe the default is 2 for many web browsers. So what you are seeing is correct, the browser itself is only requesting 2 objects at a time.
回答3:
Most browsers will only make two requests at a time from each domain.
If the requests aren't session-less, only one requests at a time from each user is handled by the server, other requests from the same user are queued.
回答4:
IIS has an upper limit on the number of concurrent threads it will execute, the rest will get queued until the first two are finished. A phenomenon I've run into as well when using callbacks.
回答5:
If you make your iframes point to different DNS then the browser should parallelize them all.
See here: http://www.websiteoptimization.com/speed/tweak/parallel/
回答6:
I had this problem too. You might be hitting a session lock in ASP.NET.
In short set EnableSessionState in the @ Page directive to ReadOnly.
I found it from this answer which deserves the credit:- IIS Express 7.5 not processing requests concurrently