Does the ASP.net page on IIS use multi-core processors?

I have an ASP.net page that runs a script that takes 1 second to 10 minutes to run depending on the parameters passed to it.

My question is if the server is multi-core, will this script automatically use all processors or is it compressed by one.

Thanks for any help

+3
source share
3 answers

No, the page will only work on one core.

IIS uses multiple threads to process requests, but for each request, it uses only one thread.

If you want the code to use more than one core, you must run the themes yourself.

+2

, / . , ( , ).

, , / , ( ).

+2

ASP.NET . . , CPU/Core. ASP.NET. .

: ? 1] , ASP.NET? 2] , script?

If you create an asynchronous long page, then each thread will immediately return to the ASP.NET thread pool, which will dramatically increase the performance of your site. This solves problem 1.

Read the advanced parallel task library extensions to find out how you can more efficiently use all the cores for long-term tasks. Most tasks can be divided into subtasks, which can work in parallel. This solves problem 2.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1753695/


All Articles