Render using all cores except one (or N) Is there a way to configure the Blender Render or Cycles to use all the available cores in the machine except for one (or N) of them? I'd like to set a render off in the background but leave me with a core to catch up on emails, browse, etc.?

I've tried using a fixed number of cores for rendering but this means if I swap the blend file between machines from, say a 6 core machine to a 12 core machine, then I have to manually reconfigure how many cores to use.

Thanks
You will have to have a script file in each of your blends containing this:

import bpy
from multiprocessing import cpu_count

cores_idle = 1    # &lt;- SET THIS

# cpu_count() returns logical cores not physical
cores_available = cpu_count()
cores_enabled = max(1, cores_available - cores_idle)

for scene in bpy.data.scenes:
    scene.render.threads_mode = 'FIXED'
    scene.render.threads = cores_enabled


Give it a .py extension and check register so it is run by blender when you open the file (this should be also enabled in Preferences). You can also save this script into your Start Up file CtrlU.

Or for rendering you can execute it from the command line with --python, without having to modify your startup or .blend files.