Question: I recently upgraded my mid-2011 15” MacBook Pro to Mac OS X 10.9 Mavericks. Since then, my computer’s RAM usage spikes to the point of making my computer unusable. Specifically, anywhere between a minute and 2 hours after booting up, the process `kernel_task` will use between 4 and 5 GB of RAM (I have 8 GB installed) and `mds` and `mds_store` will use around 2 GB between them. At that point all of my apps become unresponsive. 

If I don't restart my computer within about five minutes of this happening, Mac OS X will ask me to quit all of my apps. If I don’t do that the computer becomes totally unresponsive (even to restart requests) and I have to perform a hard shutdown. If I do, the same thing happens but it takes a couple minutes longer. I talked to an Apple representative and he said to flash my PRAM and reset the SMC, which I did, but nothing happened. 

Aside from that he said to send my device in, which I can’t do at the moment. Any idea what's going on?

Answer: 
I experienced `kernel_task` ballooning up to 20GB of RAM and saturating (but not releasing) all available RAM, which essentially froze all of my running apps. Through trial and error I found that it was a runaway R process, as after I quit the R application, the `kernel_task` went back down to a reasonable 1GB (the R.app did not require more than 1GB of memory at that time). 

So the specific fix for my scenario was to restart the R.app application. You might try quitting all running apps one-by-one to systematically figure out which one might be interacting with `kernel_task` and causing the issue.
I have an old but great iMac, from 2008 with a max capacity of 4 Gb RAM. Following the Mac recommendations, I made a reinstallation since "cero" of Mavericks, but the performance was still very bad, and the consumption of memory was terrible.

Additionally, under the promise of "making the Mac faster", I had installed Mac Keeper, that by the way was consuming a lot of memory for the antivirus plus the resources of the app turned on.

MY solution: Uninstall Mac Keeper. Immediately I recovered 1.5 Gg of RAM, and after a restart of the computer, it was saving 2.0 Gb of RAM.

Because of the model of my iMac, I still need to resolve the kernel\_task excessive consumption. My belief is that I made a great mistake installing Mavericks.