I have a server running nginx as a web server for video streaming and am considering using an external CIFS/SMB storage share mounted to the server.

As the server would need to download and upload for reads and writes to the files on the share, I guess that it will add some additional read/write latency.

How long will external files be cached for reading (available offline) on the local disk where the share is mounted?

How does NGINX handle reading large files consistently and concurrently from such a mounted CIFS share? I guess most of this is handled by the OS rather than NGINX.

System info:
OS: AlmaLinux 9.3
Kernel: Linux 5.14.0-362.13.1.el9_3.x86_64 on x86_64
nginx version: 1.25.3

1 Answer 1


nginx does not know where the files are in reality. It just uses kernel filesystem features via glibc to access files.

The kernel provides the feature to read/write files. The kernel also provides caching of the files.

As to the question, how it actually performs: You need to do your own performance evaluation. Environments are unique:

  • network speed and topology can be different
  • the hardware on the share server files can be different
  • the OS running on the share server can be different

So, you need to do your own benchmarking: use a filesystem performance test tool to check the difference in latency / speed, both with local and CIFS mounted filesystems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .