OK, here is another one that helps to illustrate AJs point. The bottom three curves are MemTotal-MemFree-Buffers-Cache, this is basically the minimum amount of memory required for it to work at all. The top three curves are just MemTotal-MemFree and give an indication of how much memory is allocated. My system has 512MB RAM so the kernel is being lazy about claiming back cache space that might no longer be in use. It is more efficient on processor cycles not to worry about claiming back cache space if it is not needed for something else.
The interesting point about the top curves is that after 70 seconds they show about 70MB of space still allocated to cache even though all the programs have long been killed. This space could be recovered if it was needed. My complete guess is that the space recovered when the programs are killed is clean and stale whereas the cache not recovered is dirty.
[edit]Reconsidering this, it might make more sense for the OS to clean up the dirty cache whilst its processor load is low. Recovering clean cache isn't so critical as it is very cheap to recover when and if it is needed[/edit]
Lots of ram and a slow processor allows cache space to be left allocated just in case it might be needed again (this is the reason for puppy's success, a bit of extra ram is generally cheaper than a faster processor)
Very little ram with a fast processor will involve lots and lots of swapping as cache space gets reclaimed aggressively for a higher priority process. Data may have to be reloaded from disk many times in order for a process to complete. The speed of access to your disk will be important here.
Very little ram and a slow processor results in your processor spending most of the precious few cycles it has swapping stuff to and from disk and getting very hot!
Terminology
Stale cache, no longer needed.
Clean cache has not been written to since it was loaded and can simply be overwritten if it is not being used.
Dirty cache has been written to since it was loaded and cannot simply be thrown away it must be written back to disk (expensive).
A common misconception is that a deficiency in RAM can be completely overcome by creating some swap space, partition or file on disk. The problem with this is that disk space is still on disk and has comparatively low access times. The good side of swap space is that it is cheap to have lots of it so the kernel does not have to spend a lot of time managing it and can be lazy about reclaiming stale space.
It is generally a bad idea to have significantly more swap space than ram. This stops the kernel from being so careful about managing its space allocation and can can result in a lot of cycles being used up swapping stuff to and from disk.
My second year operating systems lecturer would be proud. Some of this stuff has stayed in my head for 6 years. I'm afraid I can't warrant for its accuracy though.