Increased Memory Usage

Status
Not open for further replies.
Joined
Mar 14, 2013
Messages
6
Hi All
From a previous post it is still undetermined if this is just normal or a config error. Being a NooB doesn't help me think this is normal. This server is only used for (4) Mobotix cameras storage and works fine but looking at the Reporting tab just doesn't give me a good feeling. It looks to max out the memory in about 10 to 12 days. Any and All thoughts welcome. I'm not the first one on this subject but I WILL post if I solve this. Thanks
PMU.JPG SL.JPG

FreeNas 8.3.0 Rel P1-x64 / 4GB Sandisk Cruser
BioStar TH61 ITX mobo / Intel P G630 / 4GB DDR3
1 x 750GB WD

Storage Config: Volumes ZFS
MOBOTIX /mnt/MOBOTIX 35.0 KiB (0%) 681.8 GiB 681.8 GiB HEALTHY
MOBOTIX/d12north /mnt/MOBOTIX/d12north 670.6 MiB (0%) 169.3 GiB 170.0 GiB HEALTHY
MOBOTIX/m24drive /mnt/MOBOTIX/m24drive 1.5 GiB (0%) 168.5 GiB 170.0 GiB HEALTHY
MOBOTIX/m24gate /mnt/MOBOTIX/m24gate 474.2 MiB (0%) 169.5 GiB 170.0 GiB HEALTHY
MOBOTIX/mxvideo /mnt/MOBOTIX/mxvideo 771.1 MiB (0%) 169.2 GiB 170.0 GiB HEALTHY
CIFS:
d12north /mnt/MOBOTIX/d12north
m24drive /mnt/MOBOTIX/m24drive
m24gate /mnt/MOBOTIX/m24gate
mxvideo /mnt/MOBOTIX/mxvideo
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
This is pretty much normal and expected behaviour. The FreeNAS documentation contains a link to this thread explaining the ZFS memory consumption. Note how it caps at around 3 GB in your case, leaving some RAM for the OS.

Generally: ZFS will use all the RAM it can get - no need to worry about this. Otherwise, what would be the point in installing RAM anyway if it doesn't get used?
 
Joined
Mar 14, 2013
Messages
6
Thanks warri
After a second read of the documentation thread above. I have come to the conclusion that for my situation, I may have not needed ZFS and might not be getting any benefit from it. With less than 1T of storage and no raid. No Dedup or compression.
I think what didn't sit well with me was that there is a 10 hr window that nothing is being written or accessed from the device so logic would say idle system. That being said ZFS appears to not fall into the logic category.
If it stays around 3GB I can live with that otherwise I will switch to UFS volumes.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
What would you use the RAM for? If you want it to be free just to be free then you really don't understand. Windows XP used to leave LOTS of RAM free. This was a big oversight by Microsoft at the time because if you cache stuff it can only help performance. So what happens now? Every bit of RAM that isn't being used by programs, services, etc is cache. But to prevent people from thinking something is wrong its listed as "free" space. The cache simply adjusts. If you run Word and it needs 200MB of RAM, the cache simply shrinks by 200MB.

Technically, if you ever have truly free RAM you are wasting system resources. RAM that is free doesn't use less power, doesn't increase system perform, or help in any way.

Lots of people thought something was wrong when Vista came out and they ran a chkdsk. Chkdsk was filling up the system RAM with cached file system information to make the chkdsk go faster. This made a HUGE difference with very large RAID arrays, sometimes cutting the chkdsk run from 1+ hours to just a few minutes. Of course, this didn't stop people from complaining and demanding that Microsoft limit the amount of RAM it used.

ZFS will work fine for you, and it will identify bitrot if it occurs. I wouldn't have used ZFS with 3GB of RAM, and you could easily switch to UFS if you wanted to. I'd leave it like it is just for simplicity, but if it ever crashes from insuffucient RAM I'd seriously consider switching to UFS. If you aren't hard-pressed to use FreeNAS you could go to NAS4Free. You can import your zpool easily in NAS4Free and it is designed to work with less RAM.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
So time for my two cents...

I think 4GB is sufficeient for your system. In my experience FreeNAS will use 3GB to operate fine and the extra 1GB you have lends itself to the read/write cache. This extra RAM speeds things up. FreeBSD (what FreeNAS is based on) will consume RAM and hang on to it when it needs it. Once it is done it will allow it to be taken by another process but it's still allocated and that is what you are seeing in the charts. I was concerned as well and did my research and found out this is just the way FreeBSD works.

As Cyberjock stated, ZFS gives you protection again corruption of your files, even if it's a single drive situation. The main deal I think you are missing is you feel like you don't get any benefits because you don't have a large system or a lot of data. You do not get protection from a drive failure, just the same as any other file system when using a single drive, but to do gain confidence that your data quality is preserved while that drive operates.

You need to figure out where you want to go with your NAS, is it for backups only, financial data, photos and music? If the data is critical, back it up on a separate medium like DVD/CD.
 
Joined
Mar 14, 2013
Messages
6
Thanks cyber & joe
I think you covered all the angles. As you say no worries unless it crashes. Then more RAM or UFS.
I think if it were stable at 3GB usage from startup I would not have even questioned it as 4GB was recommended for a basic system.
Thanks again for your help!
K
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
6GB is recommended I though for a basic system. Also keep in mind that there is a 32 bit version of FreeNAS that will run in 3 GB of RAM. In my opinion you are still better off running the 64 bit version with 4GB just because it's the most heavily tested and it does tend to work fine with 4GB of RAM. Also when I look at your graph for the memory usage, I'm shocked to see FreeNAS use so little RAM for the majority of the time. Mine goes out and grabs 3GB right away and once I have a single operation it grabs almost all the rest of my available RAM. It did this when I have 4GB, 8GB, and even now when I'm at 16GB, well at 16GB takes almost 7GB until an operation occurs and then it's almost the full 16GB. After the operation it will typically retain the RAM and for me it releases it over time (many many hours).

Hope this helps. I'm still not understanding what your situation is because this thread says you are uncomfortable with the memory usage, you mention nothing about stability.
 
Joined
Mar 14, 2013
Messages
6
My point exactly. If mine went out and grabbed it right away I would have thought nothing of it. It seems to have stabilized at the stated 3.0 but with the graph below it's been online from build about 15 days and rebooted about 5 days in and as you can see. I'm not an IT pro so in my confused mind when nothing is going on, say in the middle of the night. The usage should have dropped even a little but that doesn't seem to be the case with FreeNas. As I said if it stays stable around 3.0GB I'm good.
Uncomfortable- I relate high usage with the system working it's self to death - noob issue i'm sure.
PMU2.JPG
 
Joined
Mar 14, 2013
Messages
6
well at 16GB takes almost 7GB until an operation occurs and then it's almost the full 16GB. After the operation it will typically retain the RAM

This statement may have just solve MY dilemma. This graph might not be displaying actual usage but retaining allocation totals. Am I out on a limb here?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
This statement may have just solve MY dilemma. This graph might not be displaying actual usage but retaining allocation totals. Am I out on a limb here?
That is about right. To understand it better you would need to google "freebsd memory active wired cache free" and read about how FreeBSD handles memory.
 
Status
Not open for further replies.
Top