Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Optimize ASP and IIS by Decoupling Long-running Requests : Page 2

Lengthy Web requests, such as those that process and format complex reports, tie up threads from the ASP thread pool. When the number of ASP requests exceeds the number of available threads, you'll see a dramatic slowdown in response time. To solve the problem, you have to make your ASP pages run faster. And to do that you need to decouple the background request processing from the requesting ASP thread. Here's how.


advertisement
The ASP Thread Pool
IIS manages the ASP thread pool separately from the ATQ. The IIS metabase property ASPProcessorThreadMax specifies the number of threads per processor allocated for use by ASP. The default value is 25 threads per processor. The default setting allows 25 ASP scripts to execute simultaneously on a single-processor machine, 50 scripts on a dual-processor machine, etc. You can modify this value to allow even more scripts to execute, although Microsoft recommends a maximum value of 100 threads per processor. In my experience, any setting greater than 30-50 threads can begin to cause problems (see Table 1).

Table 1: The table shows the average number of responses per second for IIS as the number of processors, the number of available threads (as defined in the metabase) and the length of time required to process each response vary. The figures were calculated using the formula:  (60 sec/min / x sec/request * thread) * y threads/processor * z processors.

Seconds per Request

1 Processor



2 Processors

3 Processors

4 Processors

0.1

15000

30000

45000

60000

0.15

10000

20000

30000

40000

0.2

7500

15000

22500

30000

0.25

6000

12000

18000

24000

0.5

3000

6000

9000

12000

0.75

2000

4000

6000

8000

1

1500

3000

4500

6000

5

300

600

900

1200

10

150

300

450

600

15

100

200

300

400

30

50

100

150

200

45

33

67

100

133

60

25

50

75

100

90

17

33

50

67

120

13

25

38

50


From Table 1, you can easily see that with the default setting, IIS is capable of tremendous request capacity. Many images and concise ASP scripts complete in a quarter of a second or less. However, the chart also illustrates that long running requests can severely limit IIS's throughput. From this chart, it's obvious that one primary goal for a scalable Web site is to reduce the amount of time spent processing each request.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date