These are my problem on macbook pro 15", mid 2015:
– macOS running very slow
– fan running high
– kernel_task taking up to 500% CPU

And I fixed my macbook as following steps:

Step 1: Disable SIP

Enter recovery mode
– Shutdown your macbook
– Press keys: Command + R
– Press power button
– Release keys Command + R when Apple logo appears
– Open Terminal app on recovery screen, then run below command:

csrutil disable
  • Shutdown your macbook

Step 2: Disable kernal plugin IOPlatformPluginFamily

Enter single mode

Hold down Command - S immediately after pressing power button when turning the computer back on. Keep holding until a bunch of white text on black background appears.

  • When the white text finishes scrolling enter:
fsck -fy 
mount -uw /
  • Backup IOPlatformPluginFamily.kext
rsync -av /System/Library/Extensions/IOPlatformPluginFamily.kext /Users/Shared/
  • Delete IOPlatformPluginFamily.kext
rm -rf /System/Library/Extensions/IOPlatformPluginFamily.kext
  • Restart your macbook
shutdown -r now

Waiting your macbook restart completed.

Your macbook run fast again.