question about RAM usage

All your general support questions for OpenZFS on OS X.

question about RAM usage

Postby calbear88 » Sat Oct 15, 2016 9:12 am

Hi, I have a mac with 16gb of RAM. The kernel_task is using 7.49GB of RAM during intensive disk writes, and the terminal command shows kstat.spl.misc.spl_misc.os_mem_alloc: 6471024640. I haven't seen the kernal_task go above 7.49GB. I have two 4TB mirrored volumes.

Just curious how ZFS allocates RAM. If I upgrade my RAM to 32GB, will ZFS allocate itself even more RAM, or is the 7.49GB how much it will use, regardless of the amount of total RAM?
Most of the time, I'm using 14gb out of my total 16GB of RAM on my system. If I launch more applications, will ZFS decrease it's RAM usage when it senses other applications are trying to allocate ram?


Thanks for your help
calbear88
 
Posts: 25
Joined: Sun Mar 08, 2015 3:01 pm

Re: question about RAM usage

Postby Brendon » Sat Oct 15, 2016 12:19 pm

Hi Calbear88,

We have written on this topic many times. ZFS will use most of the memory in a machine, until the machine experiences memory pressure at which point memory is released. The definition of "most" varies by platform - linux 50%, Illumos 75% and we follow Illumos roughly. We started out only allowing 25%. This is true unless ZFS has been configured to use less memory (which is good practice with current releases). See https://openzfsonosx.org/wiki/Performance.

The mechanisms we use are not perfect, and this reflects the fact that OSX does not have a decent in kernel memory allocator, and that we are not first class citizens within the kernel - this makes balancing the machines performance quite difficult. Having said that we now know that our allocator is pushing the page allocator too hard, which is causing performance problems, we are working on addressing this.

- Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 11 guests

cron