Page 2 of 2

Re: ZFS not observing desired memory limits?

PostPosted: Wed Jan 11, 2017 10:48 am
by znubee
Thank you Brendon! I will try today if possible.

Re: ZFS not observing desired memory limits?

PostPosted: Wed Jan 11, 2017 9:26 pm
by znubee
Brendon, I hit a little road bump here. I followed the instructions here:
https://openzfsonosx.org/wiki/Install

I also changed the zfsadm to have "knight" instead of master:
Code: Select all
export BRANCH="knight"
export SPL_BRANCH="knight"
export ZFS_BRANCH="knight"


After this everything seemed to build fine until I got to:
Code: Select all
cd zfs
sudo make install


At this point I received the following error:
Code: Select all
Undefined symbols for architecture x86_64:
  "_dm_inuse", referenced from:
      _check_slice in zpool_vdev.o
  "_libdiskmgt_fini", referenced from:
      _main in zpool_main.o
  "_libdiskmgt_init", referenced from:
      _main in zpool_main.o
ld: symbol(s) not found for architecture x86_64


In context:
Code: Select all
3 warnings generated.
  OBJCXXLD InvariantDisks
 /usr/local/bin/gmkdir -p '/usr/local/bin'
  /bin/sh ../../../libtool --silent  --mode=install /usr/local/bin/ginstall -c InvariantDisks '/usr/local/bin'
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in arcstat
 /usr/local/bin/gmkdir -p '/usr/local/bin'
 /usr/local/bin/ginstall -c arcstat.pl '/usr/local/bin'
make[3]: Nothing to be done for `install-data-am'.
Making install in zconfigd
  CC       zconfigd.o
  CCLD     zconfigd
 /usr/local/bin/gmkdir -p '/usr/local/bin'
  /bin/sh ../../libtool --silent  --mode=install /usr/local/bin/ginstall -c zconfigd '/usr/local/bin'
make[3]: Nothing to be done for `install-data-am'.
Making install in zfs
  CC       zfs_iter.o
  CC       zfs_main.o
  OBJC     zfs_osx.o
  OBJCLD   zfs
 /usr/local/bin/gmkdir -p '/usr/local/bin'
  /bin/sh ../../libtool --silent  --mode=install /usr/local/bin/ginstall -c zfs '/usr/local/bin'
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-exec-hook
echo "prefix "
prefix
/usr/local/bin/gmkdir -p //usr/local/bin
/bin/ln -f //usr/local/bin/zfs //usr/local/bin/mount_zfs
/bin/ln -f //usr/local/bin/zfs //usr/local/bin/umount_zfs
make[3]: Nothing to be done for `install-data-am'.
Making install in zpool
  CC       zpool_iter.o
  CC       zpool_main.o
  CC       zpool_util.o
  CC       zpool_vdev.o
  CCLD     zpool
Undefined symbols for architecture x86_64:
  "_dm_inuse", referenced from:
      _check_slice in zpool_vdev.o
  "_libdiskmgt_fini", referenced from:
      _main in zpool_main.o
  "_libdiskmgt_init", referenced from:
      _main in zpool_main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [zpool] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1


Do you know what could be going on here? I am on 10.12.2 with Xcode 8.2.1.

FWII I switched back to "master" and zfs build worked and the kexts loaded right up. So something must be broken in "knight" or I didn't switch the branch correctly? Or..?

Re: ZFS not observing desired memory limits?

PostPosted: Wed Jan 11, 2017 11:07 pm
by Brendon
Hi,

Nothing wrong with knight! Those symbols are from a library added a few months back now.

Make sure your zfsadm is up to date.

zfsadm -b knight -l
then the usual make installs should do it.

The relevant library is libdiskmgt.

-Brendon

Re: ZFS not observing desired memory limits?

PostPosted: Thu Jan 12, 2017 7:26 am
by znubee
Brendon, you were right. All it took was the right arguments "zfsadm -b knight -l" instead of trying to modify the zfsadm file itself. It built just fine this time. Is there anything in particular I should watch for? Any stats I should poll? Any settings I should tweak?

Thank you!

Re: ZFS not observing desired memory limits?

PostPosted: Fri Jan 13, 2017 7:25 am
by znubee
"Knight" is performing MUCH better. Right now kernel task is staying steady at under 8 GB after 10 hours of uptime and I removed the previous configuration script I was using. System is much more stable. I still have over 70 GB memory free and I've not seen this ever with ZFS.

Re: ZFS not observing desired memory limits?

PostPosted: Fri Jan 13, 2017 9:59 pm
by RobRehnmark
I just installed Knight too.
I have the arc capped at 12 GB and arc meta at 9 GB but it doesn't seem t be gobbling up that memory as it did before.
And I think it's running better with no zero read speed episodes during the scrub.

Re: ZFS not observing desired memory limits?

PostPosted: Thu Feb 09, 2017 8:39 am
by znubee
OK, so I had a crazy experience this morning. Last night I left Server.app run over night due to it wanting to change permissions on a share I have. I removed a user and added a user. Server.app hung from what I assume needing to apply access permissions to the zfs volume I have set up on that tank (I also have it set to be HFS+ compatible). After coming back to the system this morning, I found my entire system out of memory. After killing enough processes over the course of a very patient and nightmarish hour, I managed to ssh in and run top to find that kernel_task was using 113GB of memory. No matter how many processes I killed, the system stayed at the upper bounds with only about 45 MB of memory free. So a sudo reboot finally saved the day (I didn't want to do it until I found out what process was consuming so much memory).

I have to think now that ZFS acted strange with all of the permission / ACL changes from Server on a large share like this and so it went memory hog crazy. Anyone see this kind of behavior before and is there a solution?

Re: ZFS not observing desired memory limits?

PostPosted: Fri Feb 10, 2017 2:33 am
by znubee
Aside from the last question, is the current branch now merged with knight and should I go ahead and upgrade to it or the current 1.6.1 tag?