kernel_task takes a lot of ram for Yosemite and newer version, how to resolve it

Open Finder, then
Press these 3 keys at the same time
shift + command + G

It will popup a window, paste the following to the box and press GO

/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/

Back up the files in the Resources folder and then delete them from the original folder

Then restart your mac