Project

General

Profile

Feature #11032

Time spent sharing SMB filesystems could be reduced by optimizing smb_getdataset for default mount points

Added by Gordon Ross 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-05-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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.

History

#1

Updated by Gordon Ross 4 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.

#2

Updated by Electric Monk about 1 month ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 87b817582bc68a9992ad7109bd09617975ea4725

commit  87b817582bc68a9992ad7109bd09617975ea4725
Author: Joyce McIntosh <joyce.mcintosh@nexenta.com>
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 <sanjay.nadkarni@nexenta.com>
    Reviewed by: Evan Layton <evan.layton@nexenta.com>
    Reviewed by: Reviewed by: Matt Barden <matt.barden@nexenta.com>
    Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
    Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF