Sometimes Arnold preview rendering in both Hypershad and Arnold Render View cause stuttering issue on my computer with dual cpus and many cores.

This is inconvenient for me since I used to record many tutorials for students, Arnold stuttering will stop the voice since all cores are occupied.

The fix is acutally very simple, in the System panel of Rendering setting in Maya, uncheck the Autodetect Threads option, and enter a negative number in the Threads block, then it will reserve some computational power, which is good for recording.

Also, in summer, if driving all cores to the maximum load, the computer or render server may hang. Usually enter -1 to the Threads block will make rendering more stable.

For me, I have many computers rendering at the same time usually. So I created a mel expression to reserve computational power on the ones with more cores. The expression checks if computer has more than 12 cores, if so, reserve one core.

//You cannot run this expression script directly, just create expression on Arnold render setting -> System -> Threads, and paste the following code into expression editor.

int $total_threads = `threadCount -q -n`;
print ("Current total threads " + $total_threads + "\n") ;
if ($total_threads <= 24)
	defaultArnoldRenderOptions.threads = 0;
    defaultArnoldRenderOptions.threads = - 2;
print ("Using " + defaultArnoldRenderOptions.threads + "\n");