Why can't Visual Studio run on multiple cores? 25% CPU

I am running Visual Studio 2008 with an outdated MS test environment. The problem is that it sends my processor 100% (well, 25% to the quad-core processor).

My question is: why does Visual Studio not work on multiple cores? Of course, M $ should have enough handle for streaming processing to make it work.

+6
visual-studio-2008 visual-studio
source share
8 answers

My VS2008 runs on all 4 processors. Just set this environment / project flag.

/ MP

(It can be installed in the C / C ++ settings, Advanced. In the project settings)

Edit: The MP flag can also take a number, for example. / MP 2, which means that it will only work on 2 cores. Leaving it as simple / MP, it will work on the maximum number of cores.

Edit2: the MP flag is probably intended for the compiler only.

+10
source share

You can ask VS to compile several projects in parallel, and also compile in parallel (!?) Within the project.

Tools> Options> Projects and Solutions> Maximum Number of Parallel Projects.

This will also build C ++ and C #!

+6
source share

In case anyone comes across this old question, VS2012 introduced parallel assemblies as a standard feature . Quote from the article:

Visual Studio 2010 includes the option "maximum number of parallel projects." Despite the absence of any restrictions, this IDE option worked only for C ++ projects. Fortunately, this restriction no longer applies to Visual Studio 11. Rather, it now fully supports parallel assemblies in other languages. Watch this, run a copy of Process Explorer at the same time a solution with numerous projects being built. You will see that several MSBuild instances are created - as many as specified in the "maximum number of" parallel projects. "

+4
source share

Now that Visual Studio 2010 has been released for bit, consider upgrading to use the parallelTestCount attribute in the MSTest .testsettings file, as described in the How-to Guide. Running unit tests faster with a computer with multiple processors or cores .

There are several limitations, for example:

  • Only simple unit tests are supported (i.e. excludes coded user interface tests and tests run in ASP.NET)
  • Tests must be thread safe (all tests run in the same process)
  • You cannot receive code coverage at the same time (among other data and diagnostics)

For example, using 0 to indicate automatic detection (default is 1 ):

 <?xml version="1.0" encoding="UTF-8"?> <TestSettings name="Release" id="{GUID}" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> <Description> These are default test settings for a local test run. </Description> <Execution parallelTestCount="0"> (...) </Execution> </TestSettings> 

Several blogs have noted that you may need to close and reopen the project for Visual Studio to notice that you have added / changed this attribute. In addition, if you edit the test settings file using the graphical interface, you may have to re-add the parallelTestCount attribute.

+3
source share

We have also added multiple support for multi-threaded builds on the command line for those of you with many projects and long build times. Enabling multi-core support requires only a few new features, and MSBuild manages all the work for efficient and effective project planning. The MSBuild team tested this scalability by building some projects on a 64-processor machine.

which of the blog sosegaga

So they started doing it, well, at least for the assembly.

+2
source share

The / MP flag is for builds only, we at least according to msdn

Now I would like to make a mistake in this, but I am sure that it is easy to build. This, of course, is still very useful.

0
source share

I am sure it is very difficult. Huge existing threadless graphical shell for multithreading. Looks like me 10.

But it seems that several cores are used for me. Intellesense seems threaded. The assembly system has a multi-project building for the C ++ multi-file building.

The problems with these tools sound a little deeper than they use your processors well.

0
source share

For Visual Studio 2010 Go to Tools> Options> Projects and Solutions> Build and Run.

Then you will see the entry for entering the number for the "maximum number of parallel projects"; my PC has an i7-3770 processor, Quad Core with HyperThreading, so it is set to 8.

For information about the different versions of Visual Studio, see here and select your version: https://msdn.microsoft.com/en-us/library/cyhcc7zc(v=vs.100).aspx

eg. for Visual Studio 2010, this property only affects C ++ assemblies:

Specifies the maximum number of Visual C ++ projects that can be created at the same time. To optimize the build process, the maximum number of parallel projects is automatically set to the number of processors on your computer. Maximum 32.

But for Visual Studio, this is for C ++ and C #:

maximum number of parallel projects Indicates the maximum number of Visual C ++ and Visual C # projects that can be created at the same time. To optimize the build process, the maximum number of parallel projects is automatically set to the number of processors on your computer. Maximum 32.

0
source share

All Articles