Ubuntu caches the memory. While that could be useful in some cases, it could cause problem in other cases. You can clear the cache using the following command
sync && echo 3 | tee /proc/sys/vm/drop_caches
Make sure that you have root privileges before issuing the above command. On servers, you can add that to bash script file and schedule it to be executed every now and then.