I have installed the open source package Munin on my servers. It produces graphs of all kind of resource usage, including memory usage. The data is sampled every five minutes which gives you a good view of memory usage during the day. If you see a low amount of unused memory or available cache, it is time to upgrade your memory.
Some of this information can also be obtained with the program top, which is installed by default in most distributions.