Jump to content

How to expand ZFS RAM allocation?


Go to solution Solved by Kirk4444,

Recommended Posts

Hi experienced Unraid users!

I have little experience with this, so I'm hoping someone from the community can help me.  I've just created a new server and have been brave enough to try ZFS!  LOL. 

I installed 64 gigs DDR5 RAM to support ZFS, but it seems to be barely using my RAM.  Per the Unraid notes, ZFS is only allocated 1/8 or your RAM.  My server really is only a NAS, so I want to give ZFS as much RAM as I can.  I thought I'd start by trying 1/2 of available RAM.  Here's what I did.

 

I went about trying to do this by:
- Shutting down server and putting USB Unraid boot drive into my PC. 
- I then went to the config folder
- went to modprode.d folder
- created a notepad doc with this text: options zfs zfs_arc_max=32000000000
- saved it as zfs.conf in the folder
- ejected USB from my PC and plugged back into my server and booted up.  Now have the below result. 

image.thumb.png.169fb31b328481bce811d5b2a56a0d55.png

I'm not sure it helped.  I'm trying  to allocate 1/2 my RAM. 


image.png.9a344abce4bf7c342a977ac608836c5f.png

image.png.ffe71dea54fb203345ee9312fe633684.png
image.thumb.png.0f50e9ad16fef399d7f47fc09ef28ae6.png

image.thumb.png.98bc7e86a470eacde91637cef0e97ac6.png

 

Am I doing something wrong?

 

Thanks so much in advance!!!

  • Like 1
Link to comment
  • Solution

Sorry!!!  I figured out what I did wrong.  For others who may be inexperienced like me, chatgpt said don't use notepad like I did.  There was an extra empty space at the end of the string.  I downloaded notepad ++ and up'd my allocation to 48, and now check it out!  But now it's orange.  LOL, did I go for too much? 

image.thumb.png.d0e271e12951dfc59b8bae0185fb3a8d.png

Link to comment
14 hours ago, Kirk4444 said:

But now it's orange.

That's controlled by the default warning/critical disk utilization thresholds (Settings - Disk Settings)

 

14 hours ago, Kirk4444 said:

LOL, did I go for too much?

Depends on your needs, if you use VMs you can have issues starting one if it needs more RAM then currently free, since sometimes the ARC cannot release the RAM fast enough making the VM crash on first start, if you doesn't use VMs you should be able to use even more, e.g this is one of my servers, doesn't run any VMs so I use almost all free RAM for ARC:

 

image.png

 

  • Like 2
Link to comment
  • 2 weeks later...
  • 5 months later...
On 11/5/2023 at 6:32 PM, Kirk4444 said:

Hi experienced Unraid users!

I have little experience with this, so I'm hoping someone from the community can help me.  I've just created a new server and have been brave enough to try ZFS!  LOL. 

I installed 64 gigs DDR5 RAM to support ZFS, but it seems to be barely using my RAM.  Per the Unraid notes, ZFS is only allocated 1/8 or your RAM.  My server really is only a NAS, so I want to give ZFS as much RAM as I can.  I thought I'd start by trying 1/2 of available RAM.  Here's what I did.

 

I went about trying to do this by:
- Shutting down server and putting USB Unraid boot drive into my PC. 
- I then went to the config folder
- went to modprode.d folder
- created a notepad doc with this text: options zfs zfs_arc_max=32000000000
- saved it as zfs.conf in the folder
- ejected USB from my PC and plugged back into my server and booted up.  Now have the below result. 

image.thumb.png.169fb31b328481bce811d5b2a56a0d55.png

I'm not sure it helped.  I'm trying  to allocate 1/2 my RAM. 


image.png.9a344abce4bf7c342a977ac608836c5f.png

image.png.ffe71dea54fb203345ee9312fe633684.png
image.thumb.png.0f50e9ad16fef399d7f47fc09ef28ae6.png

image.thumb.png.98bc7e86a470eacde91637cef0e97ac6.png

 

Am I doing something wrong?

 

Thanks so much in advance!!!

 

I'm also want to have my zfs system utilise more RAM. I'm curious about what the default setting for RAM allocation is before you added this conf file though. Do you have any idea of what it might be? And how has your experience been since making this change?

Link to comment
4 hours ago, JorgeB said:

1/8 installed RAM

How does this relate to running VMs? Because I know that when setting up a VM you can allocate a specified amount of RAM to it. Does this bypass the RAM allocation rules we're talking about here? Also, I have 64GB RAM currently, and would like to start by doubling how much RAM is allocated, so from 1/8 to 2/8. What should I put in the zfs.conf file?

Link to comment
23 minutes ago, icarus69 said:

How does this relate to running VMs?

If you start the VMs first it's not a problem, ARC will only use whatever RAM is available, but if you have the ARC using more RAM than the one allocated to the VMs, and then start a VM, it may fail to start, since the ARC can be slow evicting the RAM.

Link to comment
1 hour ago, JorgeB said:

If you start the VMs first it's not a problem, ARC will only use whatever RAM is available, but if you have the ARC using more RAM than the one allocated to the VMs, and then start a VM, it may fail to start, since the ARC can be slow evicting the RAM.

Ok gotcha. The OP talks only about allocating more RAM for ZFS. Would you ever recommend allocating more RAM for Docker? How much RAM does Unraid allocate for Docker by default? And would it be the same process i.e. create a docker.conf file and specify RAM allocation?

Link to comment
1 hour ago, icarus69 said:

Would you ever recommend allocating more RAM for Docker? How much RAM does Unraid allocate for Docker by default?

I believe there's no set allocation for docker in general, unless you limit the RAM for the containers, they will use whatever they need/want.

Link to comment
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...