Page 1 of 1

memory leak when writing

PostPosted: Wed Jan 10, 2018 6:06 pm
by e8vww
Hi all, I have a simple 2 disk mirror with new 8tb drives connected by sata. I have had good performance with it. Just tried to perform a routine operation, copying ~500GB of video. Within 5 mins every app started to beachball as all the ram was exhausted and a large swap file built up. I stopped the copy, rebooted to clear the memory and repeated it with no problems. Hmmm. Any ideas? Much appreciated.

Re: memory leak when writing

PostPosted: Thu Jan 11, 2018 2:40 pm
by Brendon
You probably need to provide a bit more context, hardware etc.

ZFS will consume a lot of memory on a machine, but SHOULD respond to memory pressure and never go too far in terms of making the machine swap etc. Recent versions of the software are quite good with this behavior, older, less so.

Having said that if the automatic mechanisms do not work well for you then it can be manually tuned: https://openzfsonosx.org/wiki/Memory_utilization

Cheers
Brendon

Re: memory leak when writing

PostPosted: Thu Jan 11, 2018 5:20 pm
by e8vww
Brendon wrote:You probably need to provide a bit more context, hardware etc.

ZFS will consume a lot of memory on a machine, but SHOULD respond to memory pressure and never go too far in terms of making the machine swap etc. Recent versions of the software are quite good with this behavior, older, less so.

Having said that if the automatic mechanisms do not work well for you then it can be manually tuned: https://openzfsonosx.org/wiki/Memory_utilization

Cheers
Brendon


How do I check which version of openzfs on osx I have? Its a mac pro old style with 20gb ram. I have an 8tb (esata) & 4tb (internal) openzfs mirror, booting off a 2tb (internal) hfs mirror. There is usually at least 10gb available at any given time. The confusing part is the way it sometimes exhausts all ram and goes into swap, and other times there is no noticeable change for nearly identical copy operations.

Also: what is "arc" mentioned in your link?

Re: memory leak when writing

PostPosted: Mon Jan 15, 2018 5:05 pm
by Brendon
Versions: https://openzfsonosx.org/wiki/Versioning

Arc: ZFS does extensive memory caching. Here is an article with some background: https://www.zfsbuild.com/2010/04/15/exp ... and-l2arc/

Cheers
Brendon

Re: memory leak when writing

PostPosted: Mon Jan 15, 2018 11:50 pm
by lundman
kextstat and sysctl kstat should list the kext versions as well.