7.4. CIFS


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_bytes option 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_bytes option 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.

Caching

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=strict option in Red Hat Enterprise Linux 6.6 and later.
The cache=loose option is set by default in Red Hat Enterprise Linux 6. Using cache=strict is recommended, as cache=strict helps to reduce data corruption, although performance is slightly impacted.

Mounting CIFS

For instructions on how to mount CIFS, see section 9.3. SMB in the Red Hat Storage Administration Guide.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.