Noob Question: How to get blender to use more of my CPU?

This is kind of a noob question

So I have been using Serpens to make an add-on and my node tree is getting rather large.

Every time I do something my PC plugs and chucks along and Blender seems to slow down a bit but Blender is only using like 25% of my CPU??? I feel like Blender is capping itself or maybe windows is capping it when it could be using a lot more resources. Or am I understanding this wrong?

How can I assign more resources for blender to use? OS I am on is Windows 10 Pro.
Here's my resource manager looking at my PC when blender slows down (any ideas how I can use this monster amount of CPU that is still available?)

  • Shawn Blanch(blanchsb) replied

    To clarify my question I am not trying to use a "Render Engine" I am trying to utilize all of my CPU for regular blender tasks on the node editor.

    From looking in the task manager resource monitor it looks like, of my 16 CPU's that are available, maybe only 4 are being used and they spike up to 100% while the other CPU's don't even flinch above 0%-10%.

    Any thoughts on how to even the Blender.exe load across all of my CPU's

  • Shawn Blanch(blanchsb) replied

    To clarify my question I am not trying to use a "Render Engine" I am trying to utilize all of my CPU for regular blender tasks on the node editor.

    From looking in the task manager resource monitor it looks like, of my 16 CPU's that are available, maybe only 4 are being used and they spike up to 100% while the other CPU's don't even flinch above 0%-10%.

    Any thoughts on how to even the Blender.exe load across all of my CPU's

  • spikeyxxx replied

    This is a bit out of my league, but as far as I know, most processes in Blender (apart from rendering) are not multithreaded (although progress is being made in this regard). This means most things in Blender cannot use more than one (or two) core(s) (/CPU('s)).

    For instance: if you have a simple loop that goes through all the elements of an array of size 1000 and adds them up, then these calculations are all dependent on the previous result and therefor, no matter how many cores you have that can add numbers, only one can be used. To make this multithreaded, you would 'unroll' the loop, meaning splitting the array in 4 (or 8, or...) parts and each iteration of the loop, you would make four (8,...) additions at the same time (each in a different core): Adding element 0 to 4, 1 to 5, 2 to 6 and 3 to 7 and in the next iteration element 8 to the first result, 9 to the second, etc.

    Even something like: (a+b)+(c+d) is faster than a+b+c+d because it uses 2 add-cycles in stead of 3 (if you have more than 1 core/CPU).

    This doesn't help you of course, but I hope it demonstrates (part of) the problem. Blender was first made to run on old hardware and now it is slowly being optimized for more modern hardware.

  • adrian replied

    I agree with spikeyxxx , It is more a Blender problem. But I am sure the way things are going at Blender HQ it will get better.

    On your CPU you have 8 cores but the task you are executing in Blender will use 1 core, only 12.5% of the CPU.

    The 16 CPU's you refer to are actually the logical cores. Logical cores  are the number of threads that can run on each core through the use of hyperthreading. So for your 8 core CPU must be 2 threads per core giving 16 logical cores.

    I think you will find only 2 logical cores will be in use by the Blender task at a time, it may use 4 but alternate 2 at a time or switch to another core as one process ends and another starts.

    For greater performance on this type of task a good CPU speed is best over number of cores. More cores is better when rendering. Your CPU runs at 2.40Ghz which is not great unfortunately. My CPU runs at 3.5Ghz and I rarely have an issue like this, however I only have 4 cores so I am slower when rendering.

    Overclocking the CPU is an option but not one I would recommend. Other factors will come into play such as cooling of the CPU. You could cause damage to the CPU.

    My advice would be grin and bear it, and save often, close and reopen Blender or restart your computer will clear the memory and keep you chugging a bit longer, like putting another shovel of coal on the fire, but there is always a top speed.

  • Shawn Blanch(blanchsb) replied

    Great explanation guys spikeyxxx  and @adrian2301 . Yeah it makes sense. I know processor speed is important.

    Well honestly I believe it is because my node tree is taking up more real-estate than the devs probably ever imagined a human would do and the 'Problem' that we are aware of is definitely surfacing because Blender doesn't use more cores natively. I have hundreds of nodes on there and even if I had a faster core I would be hitting the brick wall (just not as bad I guess).

    I guess along those lines:
    I believe I can overclock my processor but I have no idea how to do this safely:

    There is this 'sly' 3.10 GHz stated here and I imagine that is the safe overclock speed and I have some settings on my MSI dragon center but has anyone successfully done this without horror stories? Last thing I want to do it break another PC lol.

  • adrian replied

    I wouldn't recommend overclocking the CPU.

    By overclocking you will generate more heat in the CPU. Unless you upgrade your CPU cooling. DON'T RISK IT.

    I just noticed on your screen grab you are running at 3.98GHz.


    From Intel:

    Performance

    Intel® Thermal Velocity Boost Frequency - 5.30 GHz

    # of Cores - 8

    # of Threads - 16

    Processor Base Frequency - 2.40 GHz

    Max Turbo Frequency - 5.30 GHz

    Cache - 16 MB Intel® Smart Cache

    Bus Speed - 8 GT/s

    *Intel® Turbo Boost Max Technology 3.0 Frequency - 5.10 GHz 

    TDP - 45 W

    Configurable TDP-up Frequency - 3.10 GHz

    Configurable TDP-up - 65 W


    *Intel® Turbo Boost Max Technology 3.0 identifies the best performing core(s) on a processor and provides increased performance on those cores through increased frequency as needed by taking advantage of power and thermal headroom. Intel® Turbo Boost Max Technology 3.0 frequency is the clock frequency of the CPU when running in this mode.

    So...

    I should have looked this up before....

    Basically if you have the turbo boost software your CPU will increase / decrease performance based on temperature and power consumption.

    The best option if you have access to fan speed and power tuning you could increase these. Fan speed is usually fairly low to reduce noise and by default power consumption is normally set to environmentally friendly mode not performance mode.

    And in turn this will give you more juice from the CPU but obviously the longer you are using it the hotter it will get and more power you will use.

    I suggest monitor the temperature and power consumption as is for now. Then when performance begins to dip increase slightly, monitor, and increase slightly again. Don't just whack it up to the max. You could burn out the fan motor and not realize it..

    Start with the fan speed but monitor power consumption. The power consumption is the total power of all components combined, so if you increase fan speed you may not actually get "increased fan speed" because your power consumption is at the limit.

    Hope I have explained this well enough.

  • Shawn Blanch(blanchsb) replied

    Yeah my MSI has auto settings that adjust the fan speed when the CPU is selected for EXTREME performance (which I do have activated) I guess it is doing this for me then lol. This MSI is actually a beast. I just hit this one wall and I was really hoping to just figure out a way to use more cores. It's a shame really haha.

  • spikeyxxx replied

    blanchsb the code you are writing controls the 'multithreadedness' and speed of the addon.

    This is sometimes referred to as code optimization. Used to be super important ;)

    Now some people say: ' computers are so fast these days, we can afford it to write slow and inefficient code.' (Last heard this argument yesterday on Blender Today.)

    Agner Fog wrote a lot about this (optimizing code) in C++ and Assembly Language (not for beginners!), but a lot of the principles also apply tho other languages...

    And here's a fun little video about branchless programming: https://www.youtube.com/watch?v=bVJ-mWWL7cE