The cooler the CPU the better. Make sure the fan is at 100%, it's cheaper to replace a worn out fan than a burned out CPU.
Hi guys. For using AVX/AVX2 in mining safely on latest Intel CPUs with full thread/core count, use Z170/Z270/Z370 chipset with "avx offset" bios setting. So, e.g. your 4GHz cpu will be running at 3.6-3.8GHz while mining with avx/avx2/4-way on all cores/threads.
To (partly) avoid speed degradation, lock turbo boost speed (if you do not want to overclock, of course) in bios - set max performance plan, disable c-states, disable speed-step. This is supported on non-overclocking chipsets as well (e.g. H270, B250).
Simple benchs for i5-7600 (non-k) for lyra2z330 AVX2 with -t 2:
1) Stock settings (base clock 3.5GHz, goes to 4.0GHz for 2 busy cores) - ~812-824H/s
2) Stock settings + speed-step OFF (base clock 3.6GHz, turbo boost on, goes to 4.0GHz for 2 busy cores) - ~829-836H/s
3) Performance bios profile + speed-step OFF + c-states OFF (base clock 3.9GHz @ all cores, turbo boost on, but it does not go to 4.0GHz) - ~844-861H/s
I may note that this CPU goes to 98C (2C to Tj

) under lyra* with -t 4 and avx2/4-way under 150W TDP tower cooler, so avx offset helps to keep it @80-81C at 3.5-3.6GHz.
So, this just shows that turbo boost reacts slowly, and should be locked for a mining PC. I've tested for cryptonote as well, but the diff is much less - ~0.5% (as there's perfectly stable cores utilization there - no jumping load at all).