Skip to main content

Global Configuration

smb2_trans_max

Controls the SMB2 protocol value that the server shares with a client, communicating the maximum size of buffer that may be used for QUERY, SET, and NOTIFY operations. The maximum value supported by the server varies based on the SMB2 dialect. For SMB2 dialect version 2.002 the maximum is 64 KB and for all other higher dialect versions, it is limited to 8388608 (8 MB).

Default:

smb2_trans_max = 8388608

smb2_read_max

Controls the SMB2 protocol value that the server shares with a client, communicating the maximum size of data that the server can return in a single READ request. The maximum value supported by the server varies based on the SMB2 dialect. For SMB2 dialect version 2.002 the maximum is 64 KB and for all other higher dialect versions, it is limited to 8388608 (8 MB).

Default:

smb2_read_max = 8388608

smb2_write_max

Controls the SMB2 protocol value that the server shares with a client, communicating the maximum size of data that the client may send to the server in a single WRITE request. The maximum value supported by the server varies based on the SMB2 dialect. For SMB2 dialect version 2.002 the maximum is 64 KB and for all other higher dialect versions, it is limited to 8388608 (8 MB).

Default:

smb2_write_max = 8388608

Transport Threads

This option controls the number of additional threads that are used for handling network layer activities, such as receiving and sending packets. Adding additional threads helps to spread the load of handling requests and responses across multiple threads. For example, in scenarios where there are large number of simultaneous requests on the wire or many remote SMB clients accessing the server, tweaking this parameter may improve performance.

Suggested value for the parameter can vary on a case-by-case basis, depending on the available hardware resources like number of CPU cores, memory etc. We strongly recommend caution while modifying this value.

Transport Tx Threads

transport_tx_threads = <number>

Where <number> is the number of transport threads to create.

‘transport_tx_threads’ means the number of transport threads to use for Tx operations.

Default:

transport_tx_threads = 1

Transport Rx Threads

‘transport_rx_threads’ is the number of transport threads to use for Rx operations. For user space solution, zero means read packets in the context of io_mux threads, for kernel space solution, zero means a single worker thread.

transport_rx_threads = <number>

Default:

transport_rx_threads = 1

VFS Threads

The following options can be used to configure the number of threads in the global pool, available for metadata and data operations respectively:

For metadata threads, default:

vfs_metadata_threads = 1

For data threads, default:

vfs_data_threads = 1

You need to increase the number of metadata threads and data threads to for better performance even for a single client. Play with these options to check the difference. Data threads should not be the default (1 thread).

These options control the global pool of threads shared between all the shares. To configure a generic global pool of threads, rather than two separate pools for metadata or data operations, set one of the either configuration options namely, ‘vfs_metadata_threads’ or ‘vfs_data_threads’ as zero (0).

For configuring the number of threads in a share’s private pool, please refer to the section VFS Threads.

Client-side caching (Oplocks and Leases)

A boolean, if set, indicates whether the server will allow a client to place opportunistic locks (oplocks) on remote files. These locks are used by the client to cache data and file handles locally.

enable_oplock = [true | false]

Allowing SMB clients to cache data locally, the server can drastically decrease the latency while accessing a file.

By default:

enable_oplock = true

Zero-Copy Write Threshold

You may control how Fusion File Share processes incoming packets from SMB clients over TCP. Any incoming requests to write data to a file, where length is above OS specific zero-copy writes directly from network socket buffer to filesystem’s page cache.

If set to 0, Fusion File Share disables zero-copy write and processes write requests normally. Disabling zero-copy will disable zero-copy operation globally irrespective of the per-share option ‘vfs_zerocopy_write’ found in the section Zero Copy Write.

Default: 0 (for user space Fusion File Share) and 8192 (for kernel-space Fusion File Share).

Example:

vfs_zerocopy_write_threshold = 0

By default, zero-copy is switched off on user space, but on some systems this may give some improvement. This option only affects write operation (data is sent FROM client TO SMB server - file upload).

You may try to set it to 1024.

Maximum Number of Shares

This option controls the maximum number of shares that can be configured on the server.

The default is set to the maximum allowed limit of 1048576 share, however the user can configure any value less than or equal to the maximum allowed for this parameter.

All shares including administrative shares (see Administrative Share), and user shares (those accessible by SMB clients for printer, file or directory operations) are accounted in this limit.

Default:

shares_max = 1048576

Maximum Number of Open Files

This option controls the maximum number of files that can be kept open, simultaneously, by all clients connected to the Fusion File Share server.

All values lower than the minimum supported value (1024) is considered invalid and Fusion File Share will reset this value back to 1024. A value of zero means to use maximum per-process system supported limit, i.e. the value of /proc/sys/fs/nr_open

The value configured in this option should never be greater than the operating system-defined perprocess limit on the maximum number of open files. Ignoring this might result in an undefined server behavior.

warning

Setting this to a very high value on devices with considerably low memory may result in a highly fragmented memory. This can lead to premature OOM trigger especially in Fusion File Share kernel version. Care must be taken when modifying this to larger values.

important

This configuration option, ‘open_files_max’ and ‘connections_max’ control the maximum open descriptors that this process will consume. Hence operating system-wide or process-wide limit on the number of open file descriptors should be configured appropriately to accommodate these.

Incorrect configuration might cause an undefined Fusion File Share server behavior.

Default:

open_files_max = 8192

Maximum Number of Open Files per User-Session

This option controls the maximum number of files that can be kept opened simultaneously in a single user-session.

The default is set to 1024. A value of zero means an unlimited number of files can be opened in a single user-session.

The value configured in this option should never be greater than the value set in configuration option (‘open_files_max’). Setting to a higher value will show a warning and automatically default the value to 1024.

New open requests from client can fail with NT status, STATUS_TOO_MANY_OPENED_FILES (POSIX equivalent of ENFILE or EMFILE), when Fusion File Share server encounters one of the following limits:

  1. Per user-session open limit or
  2. Fusion File Share server open limit (see option ‘open_files_max’) or
  3. Operating system-wide or per process-wide limit on the open files.

Default:

sess_open_files_max = 1024

Maximum Number of Client Connections

This option controls the maximum number of simultaneous client connections that the server can accept. The default is set to 1024 and the user can configure any value for this parameter. If the Fusion File Share server is already servicing maximum number of client connections, then any new connections will be dropped.

A special value zero means an unlimited number of connections will be accepted, unless the system-wide or process-wide open descriptor limit is reached.

important

Other configuration option ‘connections_max’ and ‘open_files_max’ control the maximum open descriptors that this process will consume. Hence, operating system-wide or process-wide limit on the number of open file descriptors should be configured appropriately to accommodate these.

Incorrect configuration might cause an undefined Fusion File Share server behavior.

Default:

connections_max = 1024

Maximum Number of SMB Client Sessions

This option controls the maximum number of authenticated SMB user sessions that can be established on the server. By default, the server does not limit the number of authenticated sessions.

This behavior can be explicitly specified using a special value zero (’0’). However, restrictions may be imposed by other factors such as lack of availability of system resources like memory to setup new sessions or due to other implementation-specific limit(s).

Default:

sessions_max = 0

Multichannel

Fusion File Share server supports SMB multichannel. SMB Multichannel channel provides better throughput (by allowing client and server to transmit data over multiple connections over a single high-speed Network Interface Card (NIC) or multiple NICs) and network fault-tolerance (by allowing clients to continue transmitting data over one of the many existing connections despite the loss of connection(s)). For more detailed information, please refer to the section Multichannel.

SMB2 Crediting

Controls the maximum number of credits the server will advertise to a SMB client over one connection.

This value limits the number of outstanding requests that a client can send to a server over a connection.

A credit allows a client to send a request and/or receive a response with a maximum payload size of 65536 bytes (64 KB). Since credits determine the maximum number of outstanding requests, it directly correlates to the total amount of memory consumed by a client on the server over a connection. For example, if 8192 credits are configured per connection, and if a client is running an I/O intensive read or write workload, then theoretically the outstanding requests (requests for which a client is yet to receive a response) can occupy, 8192 * 64 KB = 524288 KB = 512 MB of memory on the server. If the filesystem exported by the SMB server is slower and unable to sustain fast parallel I/O workloads, then the SMB server can easily exhaust the system memory for large number of clients. So we strongly recommend understanding the client sizing on your environment before modifying this option.

Default:

smb2_credits_max = 1024