Page 1 of 1

Slow ZFS performance when left alone

PostPosted: Fri Oct 13, 2017 8:05 am
by MWoods
Hi all,

I am new to ZFS and new to this forum. I have a really strange problem that I hope someone will know the answer to.
I have set up a ZFS pool as a media volume for editing and rendering 4k video in Adobe Premiere and After Effects.

My problem is that I get pretty good performance when I am actively using the machine, but if I set it to render a program and leave the machine alone for awhile, Read/Write slows to a crawl.
I have observed that while rendering if I just move a finder window around with the mouse, I get good performance, but if I don't touch the computer it slows down after about 30 seconds.

As a workaround, my coworker wrote a short applescript that jiggles the foreground window around and that seems to keep the volume awake and rendering quickly.

My suspicion is that there is some sort of power saving setting within ZFS that slows things down after a period of inactivity, and that it is not recognizing the render as an activity.
All power saving settings in the system preferences are off.

The pool is created out of four 4TB drives in a JBOD enclosure and is a mirror of two stripes created with the following command:
sudo zpool create -f ProjectsTank mirror disk3 disk4 mirror disk5 disk6

Any idea what is causing this?
Is there a command that I can run that will alway keep my ZFS volume in alert and responsive mode?

Thanks,
-Matt

Re: Slow ZFS performance when left alone

PostPosted: Sat Oct 14, 2017 2:33 pm
by lundman
I believe we have actually noticed this - its fast before you login to the UI as well. Some work has been done towards fixing it, but I don't recall the current status

Re: Slow ZFS performance when left alone

PostPosted: Tue Oct 17, 2017 1:45 pm
by Sharko
I wonder, is it possible that this is an artifact of the App Nap functionality that Apple built into OS X starting with Mavericks? I used to have a similar problem where iTunes CD rips would slow to a crawl if I moved away from iTunes to focus on another application, or if the screen saver came on. I got so disgusted with it I just disabled App Nap globally with a Terminal command (saving energy with App Nap makes no sense on a Mac Pro). Here is a link to some instructions about how to disable App Nap:

http://osxdaily.com/2013/10/29/disable- ... -mac-os-x/

You could try it out by disabling App Nap on your render application, or follow the link in the article for how to disable globally.

Good luck,

Kurt

Re: Slow ZFS performance when left alone

PostPosted: Wed Oct 18, 2017 7:55 am
by MWoods
Hi Kurt,

Interesting. I didn't know about the App Nap functionality. That could be the problem.

I notice in the activity monitor, that my rendering application does not go into app nap when rendering, but the Finder can and does go into app nap when I am rendering.
The applescript that moves a finder window around keeps the Finder from napping.
Unfortunately, I can't seem to find a way to disable App Nap on the finder. There is no application to get info on.
I can maybe try to do it by the terminal. Will look into it.

Is there any other zfs process I should try to disable App Nap on?

As a side note, I don't seem to have the slowdown though when rendering to and using footage on my non-zfs volumes.

Thanks for your help,
-Matt

Re: Slow ZFS performance when left alone

PostPosted: Wed Oct 18, 2017 4:47 pm
by lundman
Do you think you could build master and see how it is? We have some IO fixes in it already, and a few more to come.

Re: Slow ZFS performance when left alone

PostPosted: Fri Oct 20, 2017 9:03 am
by RobRehnmark
I used zfsadm to build on October 11 and I'm seeing this behaviour.
I have used Onyx to deactivate App Nap without it helping.

I just made an Automator App that opens the calculator, waits for one minute, closes calculator, waits one minute and then starts over. :roll:
Will see if it works.

Re: Slow ZFS performance when left alone

PostPosted: Mon Oct 23, 2017 9:22 am
by MWoods
I could maybe figure out how to compile it from the master, but I don't have a lot of spare time at the moment.
Does it need to be done on the machine in question? I don't have Xcode installed on that machine.
Sounds like the Rob has a recent build and is experiencing the same behavior though.

Rob, let us know if your automator calculator automation works. In my observation, you might need to set the interval to less than a minute.

I use a little app called menu meters to monitor processor activity. When rendering, the processors are usually pretty busy.
I could see the processors slow down after about 30 seconds of inactivity.
https://member.ipmu.jp/yuji.tachikawa/M ... ElCapitan/

If you need it, I am attaching the applescript that I am using to this post.
Just open it up in applescript and hit play.

-Matt