RAM Usage in FreeNAS-8.0-RELEASE-amd64

Status
Not open for further replies.

TravisT

Patron
Joined
May 29, 2011
Messages
297
So I've just finished rsyncing everything over from my previous NAS solution over to a VMWare (ESXi) hosted FreeNAS box. Things seem to be working great so far.

One thing I noticed was that the RAM usage on the "Reporting" screen is almost maxed out. While having multiple rsync processes running, I assumed this was normal. Now that everything has rsync'd and there is no substantial traffic to/from the NAS, I assumed this would drop to a lower level. So far, it hasn't.

I began with allocating 2GB to the VM, and it ran well, but I increased it to 4GB since it was showing almost maxed out. Soon after, the graphs showed the 4GB almost maxed out as well, but I wanted to give it some time before I threw too much more memory at it. I still have a few more GB of uncommitted RAM that I can throw at the VM, but I also have about 4-5 more 1TB drives that I plan to add in the near future.

Should the idle RAM usage be reporting so high on the reporting screen?
 

Al562

Dabbler
Joined
Jun 19, 2011
Messages
27
Hi TravisT,

You haven't provided enough information for us to give you a good answer.
How much storage do you have? Are you using ZFS?

Regards,
Al
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
Sorry about that. I currently have 3 x 2TB drives loaded into a raidz pool.
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
Thanks for the links. Although I'm not an expert on ZFS, I have used Solaris 10 as a NAS for over a year, so I'm familiar with the ZFS workings. I knew that ZFS was RAM hungry, but thought that was only the case when actually moving data. Did not know that it utilized all RAM available for caching purposes.

I've gone with the upper end of the RAM requirements /TB, although I plan to add more drives in the near future. My server is at its max supported memory right now, and with my other VMs running, I can't spare much more than 4GB to this machine.

Anyway, I'm happy with the performance, but wasn't sure if this was an indicator that I needed more RAM. Thanks for the info.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
The simple answer that I have read is when FreeBSD uses memory it never releases the memory back to the Free area even when it no longer has it in use. It keeps it in the "Wired" section until the system is rebooted. The RAM is completely available for programs, it's just not released like Windows or some other OS's do.

So this is normal. Yes, I too questioned this odd use but it's a FreeBSD thing. Also I don't know where the term Wired came from, I could speculate but would rather not.

-Mark
 
Joined
May 27, 2011
Messages
566
I knew that ZFS was RAM hungry, but thought that was only the case when actually moving data. Did not know that it utilized all RAM available for caching purposes.

it leaves the data in cache just in case it is needed again before anything else is. this lets data that is used frequently to remain in cache things like login scripts, if you have a domain of 2000 computers, chances are someone is logging in or out every few minutes, if the data needed is kept in cache that's one less read operation the disks need to do every few minutes. it can be quite happy.

if you're really curious, type 'sysctl -a | grep arcstats' on the cli and it will print out the stats for you. here is a snippet of mine:

Code:
kstat.zfs.misc.arcstats.hits: 188884705
kstat.zfs.misc.arcstats.misses: 1944092


that's a 98.98% hit rate for my cache. meaning most reads take pl;ace purely in memory and don't touch the disks.
 

SoftDux-Rudi

Contributor
Joined
Jun 2, 2011
Messages
108
The simple answer that I have read is when FreeBSD uses memory it never releases the memory back to the Free area even when it no longer has it in use. It keeps it in the "Wired" section until the system is rebooted. The RAM is completely available for programs, it's just not released like Windows or some other OS's do.

So this is normal. Yes, I too questioned this odd use but it's a FreeBSD thing. Also I don't know where the term Wired came from, I could speculate but would rather not.

-Mark


Linux does this as well so I suspect it's part of the *NIX design, probably from the old BSD4.1 / 4.2 days?
 

torrin

Moderator
Joined
May 30, 2011
Messages
32
AT&T Unix did this too and Linux does the same. All you really need to worry about is swapping. *nix loves to keep stuff in memory forever, but it will release it as soon as the memory is needed for something else, without swapping to disk.
 
Status
Not open for further replies.
Top