VirtualBox Jail Very high Memory usage!

Status
Not open for further replies.

Miniwehats

Explorer
Joined
Feb 29, 2012
Messages
70
Hello,

I was unable to find other posts about this but when running VirtualBox jail I have extremely high memory usage in Freenas. I had 16gb and it was being capped just by the Jail running and NO VM's are running.

I increased my memory to 24gb (had an extra stick around) and it slowly worked its way up to capping all 24gb.

I removed the Jail and added it again, no VM's are even added on this and its just capping the memory.

I would love to run Virtualbox like this but I cant have it taking all of the memory and not leaving anything left for ZFS!

Anyone know of a memory leak with this Jail?
 

Attachments

  • Memory.PNG
    Memory.PNG
    19.4 KB · Views: 270
Last edited:

Miniwehats

Explorer
Joined
Feb 29, 2012
Messages
70
What version of FreeNas are you running? Also, got any hardware specs? :)

3.2 I5 haswell
24gb DDR3 Ram
Raidz1 - soon to be raidz2

FreeNAS-9.3-STABLE-201602031011

So I probably jumped the gun a bit on this as I totally forgot about a drive reslivering, but before that drive was replaced I had 16gb of ram and it was capped with the Jail running and no VMs.

So I do not have a test showing usage on 24gb of ram because the drive is still being rebuilt, once it is done I will fire up the Jail again and see what happens.

16GB might just have been to low as ZFS was probably taking 80% of that anyways.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
The graph you posted looks like normal ARC warmup to me. Did you look at the ZFS tab?
 

Miniwehats

Explorer
Joined
Feb 29, 2012
Messages
70
The graph you posted looks like normal ARC warmup to me. Did you look at the ZFS tab?
Here is current, I shut down the jail so right now only thing NAS is really doing is reslivering a drive.

So will ZFS always just use a ton of RAM regardless of how much I toss into the system? What is a good way to ensure I leave enough for ZFS if my VM I setup takes the rest?
 

Attachments

  • Memory.PNG
    Memory.PNG
    14.3 KB · Views: 239
  • ARC.PNG
    ARC.PNG
    11.3 KB · Views: 243

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
will ZFS always just use a ton of RAM
ZFS will always use almost all available RAM for ARC. That's the whole point of tossing lots of RAM at it. Unused RAM is wasted RAM. If something else needs that RAM, ZFS will shrink the ARC.
What is a good way to ensure I leave enough for ZFS if my VM I setup takes the rest?
You decide how much RAM to allocate to the VM in the VirtualBox settings for the VM. Give it whatever the client OS requires. Then ZFS will do its best to cache the VM's disk activity in its ARC.
 

Miniwehats

Explorer
Joined
Feb 29, 2012
Messages
70
ZFS will always use almost all available RAM for ARC. That's the whole point of tossing lots of RAM at it. Unused RAM is wasted RAM. If something else needs that RAM, ZFS will shrink the ARC.

You decide how much RAM to allocate to the VM in the VirtualBox settings for the VM. Give it whatever the client OS requires. Then ZFS will do its best to cache the VM's disk activity in its ARC.

Ok looks like I need to read up on ARC and how that side all works. Is there a suggested amount of RAM to leave for ZFS? If I have 16gb and give my VM 4gb will 12gb left for ZFS not be enough? This NAS does not do much other than store all my movies and stuff for Plex + run that VM.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
So will ZFS always just use a ton of RAM
Any modern, intelligent OS will use all (or almost all) the RAM it's given. FreeNAS just shows it more quickly than many others, due to ZFS caching.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
If I have 16gb and give my VM 4gb will 12gb left for ZFS not be enough?
What you're really talking about is how much RAM you leave for FreeNAS and anything else that's running on it. The minimum is 8GB. It needs more if you run plugins, and more if you have a lot of storage. You don't currently appear to be short of RAM.
3.2 I5 haswell
Is that a Core i5 you're running? If so, you either missed the memos about the benefits of ECC RAM, or made an informed decision not to use it.
 
Status
Not open for further replies.
Top