RAM Upgrade Questions

Chamrajnagar

Explorer
Joined
Jan 2, 2015
Messages
89
Supermicro A1SAi-2750F (Atom C2750)
1x Kingston ValueRAM 8GB DDR3L PC3-12800 ECC SODIMM
2x HGST Deskstar NAS 4TB 7200RPM

I've been using the above setup for 3-4 years. It's been working well and I just upgraded it to v11.2.

Primary usage is as network storage for 2-3 clients and as a Plex server. I just finished fixing the last part of my network, and now everything is capable of gigabit speeds.

Possible future usage: OwnCloud, Minecraft server. I'll likely add two more drives at some point in the next year or so.

I'm wondering about adding another 8GB of RAM.

File copy currently peaks at about 110MB/s, but also fluctuates quite a bit. In addition, the FreeNAS web GUI becomes unresponsive when I'm copying a large file. Would a RAM upgrade help with these issues?

Thanks
 
Last edited:

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
You're below spec right now for RAM if you're running Plex with only 8GB. That's the recommended minimum for just FreeNAS with no jails/plugins.

Possible future usage: OwnCloud, Minecraft server.

Definitely requires more RAM.

In addition, the FreeNAS web GUI becomes unresponsive when I'm copying a large file.

You're probably swapping heavily. What does your webGUI (or swapinfo from a command prompt) show for swap use?
 

Chamrajnagar

Explorer
Joined
Jan 2, 2015
Messages
89
You're probably swapping heavily. What does your webGUI (or swapinfo from a command prompt) show for swap use?

Looks like swap use is at 35% at idle and stays at 35% after I start a file copy from client to FreeNAS.

Considering the FreeNAS requirements you pointed out, another 8GB stick is probably wise. That would leave me two open slots, so I could potentially add another 32GB down the line for a total of 48GB if I ever need that much.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Plex is definitely putting memory pressure on your system then. If you're swapping, that means you're hitting those same disks that you're using for read/write access, which means even more thrashing about.

I'd consider reducing your arc_max by about 1GB (35% of 2GB default swap size is 717MB) and see if the problem continues.

Get the current value with sysctl vfs.zfs.arc_max which gives you the size in bytes. Reduce it by a billion (let's not nitpick GB vs GiB, for the sake of easy typing) and do sysctl vfs.zfs.arc_max=newnumbergoeshere to set it.

See if your swap un-swaps itself. If it does, consider making that a tunable (System -> Tunables) so that it sticks after reboot. Once you add the new RAM, OwnCloud and the Minecraft server, you'll need to take a similar approach to figuring out how much memory they're using ( rctl maybe, or just observe the spawned processes in top) and giving arc_max a similar haircut. Just remember to account for the fact that you added 8GB of physical RAM to the system when you're calculating the new value. ;)
 

Chamrajnagar

Explorer
Joined
Jan 2, 2015
Messages
89
Get the current value with sysctl vfs.zfs.arc_max which gives you the size in bytes. Reduce it by a billion (let's not nitpick GB vs GiB, for the sake of easy typing) and do sysctl vfs.zfs.arc_max=newnumbergoeshere to set it.

Thanks! I changed that setting and swap usage is now at 34%. Copy from client to FreeNAS may be a little more consistent. I think when the copy speed fluctuates it's not dropping as low as it did before.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
If you want a Minecraft server, you will want 2-4GB JUST for that. Even a small server with 2-3 players. You can cut this back by reducing the view distance but that make the game much less fun. This is all due to the number of world chunks in memory increasing exponentially with the view radius.
 

Chamrajnagar

Explorer
Joined
Jan 2, 2015
Messages
89
If you want a Minecraft server, you will want 2-4GB JUST for that. Even a small server with 2-3 players. You can cut this back by reducing the view distance but that make the game much less fun. This is all due to the number of world chunks in memory increasing exponentially with the view radius.

Yeah, I figured the Minecraft server would require a RAM upgrade based on reading the guides here. Not sure if I'll end up doing it or not, but it would be cool.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Yeah I tend to run a bunch of things in jails. I have a VMware cluster too but that's not on 27/7 I just can justify a $150 power bill.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Thanks! I changed that setting and swap usage is now at 34%. Copy from client to FreeNAS may be a little more consistent. I think when the copy speed fluctuates it's not dropping as low as it did before.

Well, I suppose that's an improvement, but 34% swap is still 34% too much, in my opinion. ;)

It may be that your swapped pages have yet to be called on and pulled back into main memory, but if that doesn't decrease I'd still consider chopping down arc_max even more.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I would add another 8Gb RAM. While the system may run with 8Gb, it will be happier with 16Gb. Significant swap usage means you don't have enough RAM memory. You can play all you want with tweaks - but changing system settings is not going to help much, and you might mess something up. Adding RAM is going to be your solution.
 

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
Hi @HoneyBadger, I am having a swap memory issue. I was under the impression that since I had 3 drives (8TBs each) I should have 6GBs of swap? I only show 2 and constantly max it out and get the swapspace errors. I have 32GBs ECC RAM in the system so I am not sure why I would be using swap at all. I'm new to FreeNAS and servers in general, so following the above is a little confusing for me, but I am wondering if you are able to offer some help on my situation since its similar?

Here are my system spec:
FreeNAS-11.2 RC1 | Supermicro X9SCL-F | Xeon E3-1270
32GB ECC RAM | Kingston 120GB SSD for boot
3 WD Red 8TB z1
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hi @HoneyBadger, I am having a swap memory issue. I was under the impression that since I had 3 drives (8TBs each) I should have 6GBs of swap? I only show 2 and constantly max it out and get the swapspace errors. I have 32GBs ECC RAM in the system so I am not sure why I would be using swap at all. I'm new to FreeNAS and servers in general, so following the above is a little confusing for me, but I am wondering if you are able to offer some help on my situation since its similar?

Here are my system spec:
FreeNAS-11.2 RC1 | Supermicro X9SCL-F | Xeon E3-1270
32GB ECC RAM | Kingston 120GB SSD for boot
3 WD Red 8TB z1

Swap is mirrored across pairs of drives for safety/redundancy in case of failure from FreeNAS 11.1 onwards - that's why you only have 2GB.

In regards to why you're using swap, you'll need to identify if you're using any plugins, jails, or other features of FreeNAS beyond just simple file storage.

(And while this is related to the original post in that both of them involve unwanted use of swap space, creating your own thread is probably for the best - please @ tag me in when you do!)
 

Chamrajnagar

Explorer
Joined
Jan 2, 2015
Messages
89
Plex is definitely putting memory pressure on your system then. If you're swapping, that means you're hitting those same disks that you're using for read/write access, which means even more thrashing about.

I'd consider reducing your arc_max by about 1GB (35% of 2GB default swap size is 717MB) and see if the problem continues.

Get the current value with sysctl vfs.zfs.arc_max which gives you the size in bytes. Reduce it by a billion (let's not nitpick GB vs GiB, for the sake of easy typing) and do sysctl vfs.zfs.arc_max=newnumbergoeshere to set it.

See if your swap un-swaps itself. If it does, consider making that a tunable (System -> Tunables) so that it sticks after reboot. Once you add the new RAM, OwnCloud and the Minecraft server, you'll need to take a similar approach to figuring out how much memory they're using ( rctl maybe, or just observe the spawned processes in top) and giving arc_max a similar haircut. Just remember to account for the fact that you added 8GB of physical RAM to the system when you're calculating the new value. ;)

I added another 8GB of RAM, but I haven't tweaked any settings yet. It looks like swap usage is currently at 55%. arc_max is 15,567,925,248. Seems strange that swap usage has gone up with more RAM, or is that expected?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
(35% of 2GB) vs (55% of 2GB) is only the different between 717MB and 1126MB - the extra memory from swapping could easily be margin-of-error from your jails/plugins.

Do the arc_max change to "reserve" a GB or two of RAM and keep ZFS from consuming it.
 
Top