|
-
Sep 25th, 2024, 04:46 AM
#1
Thread Starter
Lively Member
maximum number of parallel project builds property affect
I want to speed up the build time in Visual Studio, and I discovered the 'Maximum number of parallel project builds' setting from the following link.
https://learn.microsoft.com/en-us/vi...n?view=vs-2022
Here's how to find it:
1. Go to Tools > Options > Projects and Solutions.
2. In the Build and Run property page, adjust the value for Maximum number of parallel project builds and click OK.
I have 4 physical cores and 8 logical processors, and the default setting for this property was 8. I increased it to 16.Even though I only have one project in the solution, This change improved the build speed, but I’m curious about how it works and whether there could be any adverse effects.
-
Sep 25th, 2024, 10:09 AM
#2
Re: maximum number of parallel project builds property affect
I've never looked into that. In theory, you will run into problems if you set it high enough, though the only problem would be that it could slow down. I'm a bit surprised that you saw a performance gain when you went to 16. If you get above the number of free processor cores you have available, then multiple threads will have to share the same processor. This will slow both down because they will have to swap in and out, which does cost a certain amount of time. That won't happen if any of the threads are just waiting for something else to happen, though, as the OS will note that they are waiting and not waste time swapping them in until they can act again. This makes managing threads particularly difficult.
It seems like you went above your number of cores, yet saw a performance increase. That suggests that the process can benefit from more than 8 threads, though you don't have more processors. Perhaps that means that the different threads do end up waiting for other things to complete, such that more threads are better. Of course, a maximum doesn't mean that all 16 are used, just that all 16 are available. VS will create the threads and the OS will manage how many are active, based on how much waiting the existing threads are doing.
I would not expect any adverse effects.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|