Why Do I Always Have 8 GB RAM Free?

Status
Not open for further replies.

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
This isn't specifically related to BSD, but I guess all Unix-like OSes. I remembered noticing that FreeNAS would only use a max of 22 GB out of my 32 GB worth of RAM, I remember seeing that the minimum recommended RAM was 8 GB and maybe there was some specific tuning in FreeNAS to make it this way. When I switched to Linux, I still have those same 8 GB free even though I told my ARC to use all available RAM, even after the server has been on for two weeks. Is this something related to ZFS were it automatically allocates 8 GB for it to use no matter what?

According to the ArcStat.sh script I currently have a 14 GB ARC and 22 GB out of my total 32 GB are used, which means 5 GB are used by my VMs and 2 GB are used by various other things.

Code:
 [root@nas bran]# free -m
              total        used        free      shared  buff/cache   available
Mem:          30060       21439        1182           1        7439        7884
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Why don't free and buff/cache add up to available? There's a ~700MB difference.
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
No idea

You don't have 8GB free, you have 1GB. Roughly 8GB is in use by cache which can be freed.

Haha yea it's pretty obvious when I take a look at free, I always use htop and tend to forget about cache.

It looks like dropping my cache also cleared out most of my ARC, which makes sense I guess since it is a cache after all.

Code:
[root@nas ~]# sync; echo 3 > /proc/sys/vm/drop_caches
[root@nas ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:          30060        6100       23561           1         398       23565
 
Status
Not open for further replies.
Top