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


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

Then restart your mac