SMB/afp file share disk resource consumption . aka want ZFS!

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
Post Reply
jim1atl
New here
Posts: 3
Joined: Tue Jul 06, 2021 8:58 pm

SMB/afp file share disk resource consumption . aka want ZFS!

Post by jim1atl »

New QNAP NAS user here, but notnew to NAS or cross platform file sharing.

My network is primarily OSX/Mac with a few windows boxes. My original question
was the best performing file sharing protocol to use with the my TS-453D QNAP NAS,
(4GB version - which can be ram upgraded).

To QNAP support, don’t tell a professional storage admin how zfs won’t work on
certain as products.

It has changed to:

1.) when is qnap fixing this (perhaps by giving us ZFS or btrfs) there are smb/afp
versions which don’t experience these disk trash issues. (More on this later)

Criterion:
Throughput I/O speed
Minimal filesystem cruft on the NAS.

Using AFp, there is a single database per shared volume living in the /.AppleD
directory. File I/o penalty for small files was an access to this database
to pick up OSX specific file permissions and attributes. Not so bad an I/o penalty
when one considers there is a single ‘database’ per volume. (I like this).

AFP .AppleD/

------——
.AppleDB: (per volume basis)
total 3.2M
drwxrwxrwx 2 admin administrators 4.0K 2021-07-06 15:00 ./
drwxrwxrwx 9 admin administrators 4.0K 2021-07-06 16:43 ../
-rw-rw-rw- 1 admin administrators 32K 2021-07-06 15:01 cnid2.db
-rw-rw-rw- 1 admin administrators 24K 2021-07-06 15:47 __db.001
-rw-rw-rw- 1 admin administrators 680K 2021-07-06 16:43 __db.002
-rw-rw-rw- 1 admin administrators 264K 2021-07-06 16:43 __db.003
-rw-rw-rw- 1 admin administrators 3.1M 2021-07-06 16:43 __db.004
[/share/CACHEDEV1_DATA/jimstuff2] #


For SMB shares it gets worse.. A single file has an entire attribute directory
Tree structure beneath the /.streams directory where alien O/S perms/attributes
are stored. So to access a single file this entire structure must be traversed
and processed anytime the file is accessed. (Yes, I/o caching may eliminate some
of the i/o pain involved at the expense of kernel / disk cache memory. The biggest
concern besides extraneous i/o is the anode file descriptor ( a finite thing on ex4fs
and other non btrfs/zfs volumes). A single file now consumes 7 inode records for
Overhead, rather than just one (1) like normal files. This of course impacts your
Kernel directory name lookup cache of memory cached filenames and the vfs_inode cache
which holds the decompressed inode record at a penalty size of ~330 bytes or so each.

A 10,000 file volume will cost you on the order of 60,000 inode records with SMB file
shares.

Any sane storage admin would be tuning thier unix kernels to match the i/o demands of
their existing file was file population. Kernel I/o tuning for storage management 101.

SMB .streams/. (One directory branch with 6 files metadata - for each user file on volume)
———————
.streams/49/49/00FD0000000000000F00082900000000:
total 32
drwxrwxrwx 2 admin administrators 4096 2021-07-06 16:47 ./
drwxrwxrwx 3 admin administrators 12288 2021-07-06 16:47 ../
-rwxrwxrwx 1 jima everyone 16 2021-07-06 16:47 :com.apple.lastuseddate#PS:$DATA*
-rwxrwxrwx 1 jima everyone 53 2021-07-06 16:47 :com.apple.metadatakMDItemDownloadedDate:$DATA*
-rwxrwxrwx 1 jima everyone 190 2021-07-06 16:47 :com.apple.metadatakMDItemWhereFroms:$DATA*
-rwxrwxrwx 1 jima everyone 57 2021-07-06 16:47 :com.apple.quarantine:$DATA*
——————

Qnap states that a zfs_inode record consumes ~330 bytes in the kernel inode cache.
The primary advantage of zfs besides built in raid levels and all the other nice features is
that each file may have an attached EA-Extended Attribute stream attached to the file itself
In the zfs metadata stream on disk.

Having worked years ago with the sun Microsystems (rip) ZFS developers, I am aware that sun
Had developed a version of afp & smb which stored their ‘alien attributes in the file EA’ with
minimal extra file overhead and no risk of volume inode depletion as well as streamlined file
i/o. Qnap states that you need at least 8gb ram for zfs, however it does perform quite well
in the small environment with half as much ram..

Frankly, having worked with zfs for years, I’d willingly pay a small one time fee to get the feature.
Otherwise I may just compile a custom kernel with openzfs support for my nas and forget about qnap
(If I don’t outright demand a refund and get a different nas).
jim1atl
New here
Posts: 3
Joined: Tue Jul 06, 2021 8:58 pm

Re: SMB/afp file share disk resource consumption . aka want ZFS!

Post by jim1atl »

QNAPDanielFL
Easy as a breeze
Posts: 488
Joined: Fri Mar 31, 2017 7:09 am

Re: SMB/afp file share disk resource consumption . aka want ZFS!

Post by QNAPDanielFL »

TS-473A-8G-US is the lowest cost QNAP NAS that currently supports QuTS hero.
I also like the TS-h973AX. Would you consider either of those?
Post Reply

Return to “Users' Corner”