Upcoming testing...

Developer discussions.

Upcoming testing...

Postby roemer » Sat Mar 18, 2023 3:33 am

lundman wrote under "News & Annoucnements":
So we should probably look at release-candidate for a 2.1.7, and all the fixes we've done already.
I'm also testing out assembly files for M1/arm64.
I have tested "aesv8-armx" which came out as
Code: Select all
 icp_aes_impl=generic READ: bw=239MiB/s (250MB/s), 239MiB/s-239MiB/s
          (250MB/s-250MB/s), io=69.9GiB (75.1GB), run=300003-300003msec

 icp_aes_impl=aesv8   READ: bw=566MiB/s (593MB/s), 566MiB/s-566MiB/s
          (593MB/s-593MB/s), io=166GiB (178GB), run=300001-300001msec

Which should help those using encryption on arm64. Any other area in particular that could need speedup with assembly?

Sorry, but I don't think we can reply in the announcements board - hence copied over here...

Faster encryption on arm64 would be absolutely great!
Currently, without assembly code, it is heavily CPU-bound with about ⅓ of the unencrypted speed...

There is an open issue re ZFS encryption performance on arm64 in the main OpenZFS project: https://github.com/openzfs/zfs/issues/12171
Is this an attempted fix to this? Or are these two different things?
roemer
 
Posts: 70
Joined: Sat Mar 15, 2014 2:32 pm

Re: Upcoming testing...

Postby o3x_prokyon » Sun Mar 19, 2023 2:09 pm

(...moved from my previous extra post...)

icp_aes_impl=aesv8
on Apple Silicon arm64 looks amazing!

(Shouldn't icp_aes_impl=fastest (the default) choose the best option on it's own? On my older Mac mini i7 I set icp_aes_impl=aesni manually, but couldn't see any difference. The reason might be the „slow“ USB 3.0 (5 GBit) connection to the external case or the two mirrored rotational disks in there.)

You asked for any areas that could need speedup with assembly... I'm not so deep in programming (especially assembly...), but what about checksumming and transparent compression?
o3x_prokyon
 
Posts: 13
Joined: Thu Dec 01, 2022 1:17 pm

Re: Upcoming testing...

Postby lundman » Sun Mar 19, 2023 6:58 pm

OK, so AES v8, SHA256 v8 and SHA512 v8 all appear to work, and give some improvements.

At the moment, I was just trying to see if I could put in new assembly for aarch64, and make it work. Seems I can.
Currently, I'm not making any big changes to ZFS, just putting in aarch64 versions where there is already a
x86_64 version. So aes, gash, sha are about it.

The other guys are working on "zfs_impl" which lets us plug in various kinds and pick which one to use, just
like blake3 and fletcher has - just more generic. Aes/ccm/gcm are a bit more baked in, but hopefully they
can make it a bit more generic.

"fastest" will pick armv8 in the new code. Not from benchmarking, that is in "zfs_impl" designs.

I could make a pkg of this if people want to check it is a little faster. Currently, it only makes AES part of
encryption faster, there are other parts (GCM, GHASH) that can also be made faster (after zfs_impl).


Oh and thanks for sharing the PR, I was unaware of it. I wonder if we can all cooperate and help each other.
User avatar
lundman
 
Posts: 1239
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Upcoming testing...

Postby roemer » Mon Mar 20, 2023 3:42 am

On my datasets, I am currently typically using
Code: Select all
checksum=edonr

Does this have aarch64 assembly acceleration too?
Or are the preferred checksum implementations at the moment fletcher4, sha256/512, and blake3?
roemer
 
Posts: 70
Joined: Sat Mar 15, 2014 2:32 pm


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 2 guests