Question

I have a multicore processor on my windows 2012 server. I'm planning to add a background thread to my the aps.net application running on that server. Can i expect my application to use more then one core of the cpu? Meaning the page request are served with one core and the background thread get an other core of the cpu. If not how can i otherwise achieve this goal? many thanks in advance

B

Was it helpful?

Solution

IIS will spread the processing of requests across all available cores (unless configured otherwise by specifying a processor affinity). Hence ASP.NET will also makes full use of all processor cores. If you intention is to spin up a new thread/Task during your application start in global.asax then yes, this will be scheduled to run on an available core. Keep in mind though that this background process will be killed/re-launched on application pool recycling.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top