Previously, on my desktop computer running Ubuntu 14.04, I had 4GB RAM, which I thought should be plenty. However, after being on for a while, my computer would seem to get slow. I have a system resource monitor app in my Gnome panel, which I assume represents the available RAM (?). It shows a dark green area as being "Memory", and a light green area as "Cache". The "Cache" would slowly grow until it filled the whole graph, and then programs would get slow to load, or it would take a while to switch programs.
I could alleviate the problem somewhat with this command, but eventually the computer cache fills up again, so it's only a bandaid:
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
So, I figured I'd get more RAM, so I replaced one 2GB stick with an 8GB stick, and now I have 10 GB ram.
And my "cache" still slowly maxes out and my computer slows as a result. Also, sometimes the computer starts out with "cache" maxed when I first boot and log in. Not always though, I don't know if there's a pattern that determines why it happens.
Why is Ubuntu using up so much cache? Is 10GB not enough for Ubuntu?
Here's what my system monitor looks like in my Gnome panel. The middle square shows RAM usage. The light green area is the "cache":
This is my memory and swap history, which doesn't seem to include any information about "cache". I realize at this point I'm not totally clear on the difference between "cache" and "swap":
topor the process list and see if there's any process consuming more cpu time than you would expect. Having all your RAM "eaten up" by cache is no reason for concern as explained in the answers you already got.