Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
Common Internet File System (CIFS), an implementation of the Server Message Block (SMB) protocol, is used to share file systems, printers, or serial ports over a network. Notably, CIFS allows sharing files between Linux and Windows platforms regardless of version.
Red Hat recommends using CIFS with the Red Hat Enterprise Linux 6.6 or later with support for asynchronous reads and writes that increase the speed of data I/O.
Read and Write Size
- Use the
rsize=value_in_bytesoption to set the network read size. The recommended size is 1 MiB for servers that support the POSIX extension, for example Samba, and 60 KiB for Windows servers.
- Use the
wsize=value_in_bytesoption to set the default network write size. The recommended size is 1 MiB for servers that support the POSIX extension, for example Samba, and 65 KiB for Windows servers.
CIFS Installation Considerations
Note that if your CIFS server is a Windows system, there is a long-standing issue that causes large reads to fail because Windows only supports a 60 KiB read and write blocks.
If your workload is write-heavy and asynchronous, tune dirty pages to flush early and often. The following configuration allows for 512 MB of dirty pages, writes block at 1 GB of dirty pages, and page flushing happens every 5 seconds for dirty pages older than 2.5 seconds:
vm.dirty_background_bytes=536870912 vm.dirty_bytes=1073741824 vm.dirty_expire_centisecs=250 vm.dirty_writeback_centisecs=500
File sharing can vary between tasks significantly. For example, an 8-KiB direct database I/O is an entirely different workload from a large streaming asynchronous write from backup software. When testing, use the actual production workload, preferably with a repeatable replay of the same production work, change only one thing at a time, and record all results for later analysis.
The following caching options are available:
cache=none– disables caching. Applications have to wait while data is being sent.
cache=loose– enables caching while increasing the danger of data corruption.
cache=strict– adheres strictly to the protocol requirements where caching is regulated by the server. You can set the
cache=strictoption in Red Hat Enterprise Linux 6.6 and later.
cache=looseoption is set by default in Red Hat Enterprise Linux 6. Using
cache=strictis recommended, as
cache=stricthelps to reduce data corruption, although performance is slightly impacted.
For instructions on how to mount CIFS, see section 9.3. SMB in the Red Hat Storage Administration Guide.