If you disable swappiness, your RAM will get more full. If you increase swappiness, the data in RAM will get paged out to the swap partition when your ram reaches a certain level. Ram will get full but it's not always a problem. If you really want to do something about it, you can run the following command to clear your cash:
(warning: If you have installed profile-sync-daemon, close firefox and run the command sudo service psd stop
before you run the following command!)
echo "3" | sudo tee /proc/sys/vm/drop_caches
This will clear your cash even though most of the time it's not necessary especially if swappiness is enabled. People are usually alarmed when they see high RAM usage on a linux desktop but the developers insist that the system will actually run faster because what is in the ram is cached data that can easily and quickly be retrieved by the system. When the system is in heavy use, those cached files get transfered to swap.
The reason you don't see as much RAM in use as before is because Linux is designed to most efficiently make use of and take advantage of the available system resources. So, if you had 12GB of RAM you might see 8 or even 9GB of RAM use instead. Alot of the RAM in use is used for caching and is not usually necessary to run the immediate
desktop.
As for the system showing 3GB of RAM in use, run the following command and you should get a more accurate number:
free
system-monitor says I'm using 1.4GB of RAM and the actual RAM in use including buffers/cache is 2.7GB, almost twice the reported figure. This number is often much higher as the cache will sometimes grow to more than 50% of the total. Also, system monitor reports my total RAM at 4.7 when the actual number is closer to 4.9GB.
To help diagnose your issue you can install htop and iotop to get a better idea of what's going on when you have problems. To install:
sudo apt-get install iotop htop
To run:
sudo iotop
or
sudo htop
From my own experience I've always achieved better system performance using swap and have run into problems (system freezes) when swap is disabled. In fact, this is most likely why your computer freezes. Without swap, the system has no way to continue using RAM after becoming full. Turning swappiness down too low can also cause excessive paging and thrashing of the hard drive if have alot of RAM in use. This problem will sometimes show up as excessive kworker activity using iotop
.