Print this page
    
NEX-18312 Max number of nfsd threads is set too high, thus affecting NFS performance
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
NEX-3982 Default value of nfsd and lockd threads should be 256
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Marcel Telka <marcel.telka@nexenta.com>
NEX-2502 4.0.3 RC4 Unable to mount NFS shares
Revert "NEX-2394 mountd() door services are sub-optimal in large scale deployments".
This reverts commit c6e1673e3a4b8ba866c77dee7b8f03f858be07d6.
The fix for NEX-2394 worked fine when putting the mountd binary in 4.0.2,
but needs additional work in a 4.0.3 environment
NEX-2394 mountd() door services are sub-optimal in large scale deployments
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Ryuji Masuda <ryuji.masuda@nexenta.com>
Reviewed by: Kirill Davydychev <kirill.davydychev@nexenta.com>
OS-141 mountd(1m) needs to be able to set listen backlog
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/cmd/fs.d/nfs/svc/server.xml
          +++ new/usr/src/cmd/fs.d/nfs/svc/server.xml
   1    1  <?xml version="1.0"?>
   2    2  <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
   3    3  <!--
   4    4  
   5    5   CDDL HEADER START
   6    6  
   7    7   The contents of this file are subject to the terms of the
   8    8   Common Development and Distribution License (the "License").
   9    9   You may not use this file except in compliance with the License.
  10   10  
  11   11   You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  12   12   or http://www.opensolaris.org/os/licensing.
  13   13   See the License for the specific language governing permissions
  14   14   and limitations under the License.
  
    | 
      ↓ open down ↓ | 
    14 lines elided | 
    
      ↑ open up ↑ | 
  
  15   15  
  16   16   When distributing Covered Code, include this CDDL HEADER in each
  17   17   file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  18   18   If applicable, add the following below this CDDL HEADER, with the
  19   19   fields enclosed by brackets "[]" replaced with your own identifying
  20   20   information: Portions Copyright [yyyy] [name of copyright owner]
  21   21  
  22   22   CDDL HEADER END
  23   23  
  24   24          Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       25 +        Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  25   26          Copyright (c) 2012 by Delphix. All rights reserved.
  26      -        Copyright 2014 Nexenta Systems, Inc.  All rights reserved
  27   27          Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
  28   28          Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  29   29  
  30   30          NOTE:  This service manifest is not editable; its contents will
  31   31          be overwritten by package or patch operations, including
  32   32          operating system upgrade.  Make customizations in a different
  33   33          file.
  34   34  
  35   35          Note: if this service is modified to consist of anything other
  36   36          than a single instance named 'default', you must make changes to
  37   37          $SRC/head/rpcsvc/daemon_utils.h and libnsl:open_daemon_lock().
  38   38  -->
  39   39  
  40   40  <service_bundle type='manifest' name='SUNWnfssr:nfs-server'>
  41   41  
  42   42  <service
  43   43          name='network/nfs/server'
  44   44          type='service'
  45   45          version='2'>
  46   46  
  47   47          <dependency name='network'
  48   48              grouping='require_any'
  49   49              restart_on='error'
  50   50              type='service'>
  51   51                  <service_fmri value='svc:/milestone/network' />
  52   52          </dependency>
  53   53  
  54   54          <dependency name='nlockmgr'
  55   55              grouping='require_all'
  56   56              restart_on='error'
  57   57              type='service'>
  58   58                  <service_fmri value='svc:/network/nfs/nlockmgr' />
  59   59          </dependency>
  60   60  
  61   61          <dependency name='mapid'
  62   62              grouping='optional_all'
  63   63              restart_on='error'
  64   64              type='service'>
  65   65                  <service_fmri value='svc:/network/nfs/mapid' />
  66   66          </dependency>
  67   67  
  68   68          <dependency name='rpcbind'
  69   69              grouping='require_all'
  70   70              restart_on='restart'
  71   71              type='service'>
  72   72                  <service_fmri value='svc:/network/rpc/bind' />
  73   73          </dependency>
  74   74  
  75   75          <dependency name='keyserv'
  76   76              grouping='optional_all'
  77   77              restart_on='none'
  78   78              type='service'>
  79   79                  <service_fmri value='svc:/network/rpc/keyserv' />
  80   80          </dependency>
  81   81  
  82   82          <dependency name='gss'
  83   83              grouping='optional_all'
  84   84              restart_on='none'
  85   85              type='service'>
  86   86                  <service_fmri value='svc:/network/rpc/gss' />
  87   87          </dependency>
  88   88  
  89   89          <dependency name='share-group'
  90   90              grouping='optional_all'
  91   91              restart_on='none'
  92   92              type='service'>
  93   93                  <service_fmri value='svc:/network/shares/group' />
  94   94          </dependency>
  95   95  
  96   96          <dependency name='reparse'
  97   97              grouping='optional_all'
  98   98              restart_on='none'
  99   99              type='service'>
 100  100                  <service_fmri value='svc:/system/filesystem/reparse' />
 101  101          </dependency>
 102  102  
 103  103          <!-- Must have all local filesystems mounted before we share them -->
 104  104          <dependency name='filesystem-local'
 105  105              grouping='require_all'
 106  106              restart_on='error'
 107  107              type='service'>
 108  108                  <service_fmri value='svc:/system/filesystem/local' />
 109  109          </dependency>
 110  110  
 111  111          <dependent
 112  112                  name='nfs-server_multi-user-server'
 113  113                  grouping='optional_all'
 114  114                  restart_on='none'>
 115  115                  <service_fmri value='svc:/milestone/multi-user-server' />
 116  116          </dependent>
 117  117  
 118  118          <!--
 119  119            The shareall done as part of the nfs-server method may take a
 120  120            long time, as the contents of dfstab can be arbitrarily large.
 121  121            Set the timeout appropriately for both 'start' and 'refresh'.
 122  122          -->
 123  123          <exec_method
 124  124              type='method'
 125  125              name='start'
 126  126              exec='/lib/svc/method/nfs-server %m'
 127  127              timeout_seconds='3600' />
 128  128  
 129  129          <exec_method
 130  130              type='method'
 131  131              name='refresh'
 132  132              exec='/lib/svc/method/nfs-server %m'
 133  133              timeout_seconds='3600' />
 134  134  
 135  135          <!--
 136  136            The stop method runs unshareall as well as up to a 10 second
 137  137            sleep to do graceful versus forceful shutdown of daemons.  Set
 138  138            the timeout appropriately.
 139  139          -->
 140  140          <exec_method
 141  141              type='method'
 142  142              name='stop'
 143  143              exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
 144  144              timeout_seconds='3600' />
 145  145  
 146  146          <property_group name='application' type='framework'>
 147  147                  <stability value='Evolving' />
 148  148                  <propval name='auto_enable' type='boolean' value='true' />
 149  149          </property_group>
 150  150  
 151  151          <property_group name='firewall_context' type='com.sun,fw_definition'>
 152  152                  <propval name='name' type='astring' value='nfsd' />
 153  153                  <propval name='ipf_method' type='astring'
 154  154                      value='/lib/svc/method/nfs-server ipfilter' />
 155  155          </property_group>
 156  156  
 157  157          <property_group name='firewall_config' type='com.sun,fw_configuration'>
 158  158                  <propval name='policy' type='astring' value='use_global' />
 159  159                  <propval name='block_policy' type='astring'
 160  160                          value='use_global' />
 161  161                  <propval name='apply_to' type='astring' value='' />
 162  162                  <propval name='apply_to_6' type='astring' value='' />
 163  163                  <propval name='exceptions' type='astring' value='' />
 164  164                  <propval name='exceptions_6' type='astring' value='' />
 165  165                  <propval name='target' type='astring' value='' />
 166  166                  <propval name='target_6' type='astring' value='' />
 167  167                  <propval name='value_authorization' type='astring'
 168  168                          value='solaris.smf.value.firewall.config' />
  
    | 
      ↓ open down ↓ | 
    132 lines elided | 
    
      ↑ open up ↑ | 
  
 169  169          </property_group>
 170  170          <instance name='default' enabled='false'>
 171  171           <property_group name='nfs-props' type='com.oracle.nfs,props'>
 172  172             <propval name='device' type='astring' value=''/>
 173  173             <propval name='listen_backlog' type='integer' value='32'/>
 174  174             <propval name='max_connections' type='integer' value='-1'/>
 175  175             <propval name='protocol' type='astring' value='ALL'/>
 176  176             <propval name='server_delegation' type='astring' value='on'/>
 177  177             <propval name='server_versmax' type='integer' value='4'/>
 178  178             <propval name='server_versmin' type='integer' value='2'/>
 179      -           <propval name='servers' type='integer' value='1024'/>
      179 +           <propval name='servers' type='integer' value='256'/>
 180  180             <propval name='mountd_listen_backlog' type='integer' value='64'/>
 181  181             <propval name='mountd_max_threads' type='integer' value='16'/>
 182  182             <propval name='mountd_port' type='integer' value='0'/>
 183  183           </property_group>
 184  184          </instance>
 185  185  
 186  186          <stability value='Stable' />
 187  187  
 188  188          <template>
 189  189                  <common_name>
 190  190                          <loctext xml:lang='C'>
 191  191                                  NFS server
 192  192                          </loctext>
 193  193                  </common_name>
 194  194                  <documentation>
 195  195                          <manpage title='nfsd' section='1M'
 196  196                                  manpath='/usr/share/man' />
 197  197                  </documentation>
 198  198          </template>
 199  199  </service>
 200  200  
 201  201  </service_bundle>
  
    | 
      ↓ open down ↓ | 
    12 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX