<div dir="ltr">Yeah that's why I only build with 1 core. I know I need more RAM, but I refuse to buy more RAM until they lower prices closer to what they were: ~$80/16GB stick.<div><br></div><div>Interestingly, I've built Chromium many times with 32 core Linux systems with only 16GB of RAM, and there was a couple links that approached 16GB, but never</div><div>went over. Wouldn't doubt that this is a VS issue.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Oct 7, 2018 at 6:11 PM Bruce Hoult <<a href="mailto:brucehoult@sifive.com">brucehoult@sifive.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">16GB is about the minimal amount of RAM you want for a quad core developer system these days -- I build mine with 32G in order to have room for a decent amount of disk caching. 16GB a completely crazy amount of RAM for 32 cores. I wouldn't go with less than 128GB. This time last year I built a system with an i9 with 18 cores and 64GB and it was just barely enough -- 32GB would have been tragic.<div><br></div><div>I note that AWS "general purpose" instances (e.g. M4/M5) have 4 GB per vCPU (hyperthread). "Compute Optimised" have 2 GB per vCPU. I find the M5 instances much better balanced for software development than the C5 instances, at about a 12% price premium.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 7, 2018 at 7:32 AM, Hussien Hussien via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">The problem is that by default VS2017 builds Clang in parallel to how many cores you have. When I build LLVM/Clang, I've noticed the default setting will almost instantly consume 100% of my RAM and I have 16GB of RAM and 32cores.<div><br></div><div>To turn off parallel building, mark the appropriate CMAKE variables:</div><div><br></div><div><div>LLVM_PARALLEL_COMPILE_JOBS:STRING</div><div>Define the maximum number of concurrent compilation jobs.</div><div>LLVM_PARALLEL_LINK_JOBS:STRING</div><div>Define the maximum number of concurrent link jobs.</div><div><br></div><div>Also in Visual Studio, in Tools > Projects and Solutions > Build and Run, set</div><div>'maximum number of parallel project builds to 1.</div><div><br></div><div>Hussien H.</div><br><div class="gmail_quote"><div><div class="m_8754128104643344001h5"><div dir="ltr">On Sun, Oct 7, 2018 at 9:22 AM degski via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_8754128104643344001h5"><div dir="ltr"><div>Sorry to barge in.</div><div><br></div><div>>> I remember doing so at one point when I was still using Windows, and found</div>
>> my system much more responsive overall. But that was ~10 years ago and I<br><div>>> guess it's not a common setup.</div><div><br></div><div>10 years ago does not seem very relevant, both Windows and VS are very different now. Also "... found my system much more responsive overall ..." very much sounds like placebo/snake-oil.<br></div>
<br>>> If msbuild is 32-bit, why would that cause the (64-bit?) cl.exe process to<br><div>>> run out of memory? <br></div><div><br></div><div>I doubt msbuild is allocating much memory at all, but is the 64-bit version of cl.exe being called from msbuild? You need to up the build output so you can see what compiler is being called. Sounds like ninja is calling the 64-bit version, while msbuild is (could be, I'm speculating) using the 32-bit version to cross-build [and runs out of addressable space]. The VS defaults are all 32-bit.</div><div><br></div>degski<br><div>-- <br><div dir="ltr" class="m_8754128104643344001m_46023423776853682gmail-m_-7609249301064153987gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><i><b><span><i><b>“</b></i></span>If something cannot go on forever, it will stop" - Herbert Stein</b></i></div></div></div></div></div></div></div></div></div></div><span>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</span></blockquote></div></div></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div>