Visual Studio 2019 로 작업 중인데 incredibuild 없이 빌드하면 컴파일/링크 하느라 메시지 확인이나 문서 업데이트 같은 다른 작업을 진행하기 힘들었다.

Visual Studio  옵션 중에 최대 병렬 프로젝트 빌드 수를 코어 수보다 작게 조절해 봤지만 큰 차이를 느낄 수 없었다.

회사 동료분이 검색해서 찾으신 방법은 컴파일과 링크에 사용되는 cl.exe 와 link.exe 의 프로세스 우선순위를 낮추는 방법이었다.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cl.exe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cl.exe\PerfOptions]
"CpuPriorityClass"=dword:00000005
"IoPriority"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\link.exe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\link.exe\PerfOptions]
"CpuPriorityClass"=dword:00000005
"IoPriority"=dword:00000001

레지스트리를 이용해 cl.exe 와 link.exe 의 cpu 우선순위를 below normal 로 바꾸는 방식이다.

참고 : https://developercommunity.visualstudio.com/t/limit-cpu-usage-of-visual-studio/436208

 

Limit CPU usage of Visual Studio during C++ build

<p>We have C++ solution with ~100 projects. When we build it with VS2017, the computer becomes virtually unusable. VS spawns ~64 cl.exe, and even mou...

developercommunity.visualstudio.com

Visual Studio 2022 version 17.3 에 수정되었다는데 뭐가 바뀐건지 모르겠다. @_@

728x90

+ Recent posts