PSA encryption performance - 1.9.4 MUCH faster than 2.1.0

All your general support questions for OpenZFS on OS X.

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby lundman » Thu Jan 06, 2022 2:07 am

OK I have a new test build to try out, but APPLE isn't letting me notarize at the moment.
User avatar
lundman
 
Posts: 1170
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby lundman » Thu Jan 06, 2022 8:50 pm

OK here is a build with corrected CPUid, which should enable AESni.

Let me know if you need a different version (catalina should install on newer too, right?)
User avatar
lundman
 
Posts: 1170
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby Tsur » Fri Jan 07, 2022 10:19 am

Thank you much for tracking down the problem. I'm still on Mojave, but no need to make a special build. I can patiently wait for the next release.
Tsur
 
Posts: 22
Joined: Thu Jan 07, 2016 2:11 pm

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby lundman » Fri Jan 07, 2022 1:58 pm

I need to make sure it does fix it, and that it is faster - which is best done by whomever reported it :)

I'll spin up a Mojave pkg.
User avatar
lundman
 
Posts: 1170
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby abc123 » Fri Jan 07, 2022 11:18 pm

Hi lundman, I've installed the new package in my VM over the top of 2.1.0 but still see same version and sysctl output. Should there be a new version number with this build? Do I need to uninstall 2.1.0 first?

Code: Select all
russell@macos-catalina ~> zfs --version
zfs-macOS-2.1.0-1
zfs-kmod-2.1.0-1
russell@macos-catalina ~> sysctl kstat.zfs | grep "_impl:"
kstat.zfs.darwin.tunable.zfs_vdev_raidz_impl: cycle [fastest] original scalar sse2
kstat.zfs.darwin.tunable.icp_gcm_impl: cycle [fastest] generic
kstat.zfs.darwin.tunable.icp_aes_impl: cycle [fastest] generic x86_64
kstat.zfs.darwin.tunable.zfs_fletcher_4_impl: [fastest] scalar superscalar superscalar4 sse2
abc123
 
Posts: 59
Joined: Mon Jan 30, 2017 11:46 pm

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby abc123 » Fri Jan 07, 2022 11:25 pm

I've rolled my VM back to before zfs-2.1.0 was installed so did a fresh install of the 2.1.99 package but get the same output.
abc123
 
Posts: 59
Joined: Mon Jan 30, 2017 11:46 pm

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby lundman » Sun Jan 09, 2022 3:15 am

Ah hmm. Is it not updating cos the version is the same? or did I not pack it correctly?

Let me double check
User avatar
lundman
 
Posts: 1170
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby lundman » Mon Jan 10, 2022 4:34 pm

OK can we check that
Code: Select all
# sysctl zfs.kext_version
zfs.kext_version: 2.1.99-102_gdbadb4efcb


then also check the logs from the kext loading message:
Code: Select all
2022-01-11 09:29:25.663 Df kernel.development[0:8cbcf] (zfs) <zfs`spl_cpuid_features (spl-processor.c:78)> spl_cpuid_features: FEATURES fffa320b1f8bfbff
2022-01-11 09:29:25.663 Df kernel.development[0:8cbcf] (zfs) <zfs`spl_cpuid_features (spl-processor.c:81)> AES is YES: testing bit 200000000000000
2022-01-11 09:29:25.663 Df kernel.development[0:8cbcf] (zfs) <zfs`spl_cpuid_features (spl-processor.c:88)> spl_cpuid_features: LEAF7    9c27ab


Which you can get by

log show --source --predicate 'sender == "zfs"' --style compact | grep spl_cpuid_features

In theory anyway, log show doesn't work for me, I use "log stream" and kextunload / kextload.

And I guess we should match that with

Code: Select all
# sysctl machdep.cpu.features machdep.cpu.leaf7_features

machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH MMX FXSR SSE SSE2 SS HTT SSE3 PCLMULQDQ MON SSSE3 FMA CX16 SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES VMM PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 SMEP BMI2 ERMS INVPCID FPU_CSDS RDSEED ADX SMAP CLFSOPT MDCLEAR IBRS STIBP L1DF ACAPMSR SSBD
User avatar
lundman
 
Posts: 1170
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby lundman » Mon Jan 10, 2022 4:55 pm

stored in EBX, EDX, ECX (in that order).


ohic - don't just assume they are sane Lundman.

Code: Select all
            _spl_cpuid(1, a, b, c, d);
            _spl_cpuid_features = d | (c << 32);


So that might be changed to a, b, d, c to follow suit.

OK, so now my machine says:

Code: Select all
(spl-processor.c:84)> spl_cpuid_features: FEATURES 1f8bfbfffffa320b
(spl-processor.c:87)> AES is YES: testing bit 200000000000000
(spl-processor.c:94)> spl_cpuid_features: LEAF7    bc000400009c27ab


Check with:

zfs.kext_version: 2.1.99-103_g6dfb6ddcc9
User avatar
lundman
 
Posts: 1170
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: PSA encryption performance - 1.9.4 MUCH faster than 2.1.

Postby abc123 » Mon Jan 10, 2022 9:33 pm

Hi Lundman,

I'm still only seeing 2.1.0 when doing a fresh install of the new 2.1.99 on my Catalina VM of the new package:

Code: Select all
russell@macos-catalina ~> zfs --version
zfs-macOS-2.1.0-1
zfs-kmod-2.1.0-1
russell@macos-catalina ~> sysctl zfs.kext_version
zfs.kext_version: 2.1.0-1
abc123
 
Posts: 59
Joined: Mon Jan 30, 2017 11:46 pm

PreviousNext

Return to General Help

Who is online

Users browsing this forum: No registered users and 1 guest