Time spent sharing SMB filesystems could be reduced by optimizing smb_getdataset for default mount points
When sharing a dataset over SMB, smbd needs to look up the dataset from the mount path and does this by searching mnttab. Similar to DLPX-45572, this could be optimized by first trying the assumption that the mount point is the default one and testing.
On import of a pool with 3000 datasets shared over SMB, mounted at default mount points, this can save 10-15s (in my test environment). The saving grows exponentially with number of SMB shared datasets.
This is only a benefit when using default mount point path.
Updated by Gordon Ross 9 months ago
- Description updated (diff)
- Status changed from New to In Progress
From Joyce McIntosh
I ran VSS testing using dtrace on smbd to capture the time spent in smb_getdataset().
With 3000 mnttab entries the avg smb_getdataset() call takes about 1/10th of the time it did pre-change.
In the pool import testing smb_getdataset() is called for every entry in mnttab.
Updated by Electric Monk 6 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 87b817582bc68a9992ad7109bd09617975ea4725 Author: Joyce McIntosh <firstname.lastname@example.org> Date: 2019-08-22T21:44:31.000Z 11032 Time spent sharing SMB filesystems could be reduced by optimizing smb_getdataset for default mount points Reviewed by: Sanjay Nadkarni <email@example.com> Reviewed by: Evan Layton <firstname.lastname@example.org> Reviewed by: Reviewed by: Matt Barden <email@example.com> Reviewed by: Jean McCormack <firstname.lastname@example.org> Reviewed by: Gordon Ross <email@example.com> Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Approved by: Garrett D'Amore <email@example.com>