Many instances of sql express use all the same cpu?

Sql Server Express has the following major hardware limitations that has a consequence on performance:

  • 1 CPU

  • 1GB of memory

My question is: if on a multicore machine many instances of sql server express are running, which processor does each instance use?

Example: Dual Core - 4 Sql server express instances (SS1, SS2, SS3, SS4)

what happens?

SS1 - Core1

SS2 - Core2

SS3 - Core1

SS4 - Core2

?

Or all the instances use the same cpu (Core1)?

If not, how does the Sql Server Express instance choose the Core to use?


Solution 1:

Technically SQL Server Express does not use one CPU, it uses one SOS Scheduler. Meaning it has only one active thread in the process at any moment (one worker has the one scheduler for himself, until it yields), ignoring some special threads like DAC. This SOS scheduler does not make any enforcing of the CPU to run on, that is left to the OS, so the SQL Express never 'chooses' a core to use. W/o any manual intervention, 4 SQL Express instances running in parallel will be scheduled by the OS each on a separate core. Things can be enforced by use of the affinity mask option.