The shared file system itself is not a disk file system in our usual sense. It cannot be used to store and manage disk data, but only defines the organization format and transmission protocol of files in the process of network transmission. Therefore, in the process of a file from one end of the network to the other end, two format conversions are required, which occur respectively when entering the network and when leaving the network.
For the realization of shared file system, NFS(Network File System) and Samba are commonly used, among which NFS is mainly used under UNIX/Linux platform, while Samba was originally designed to map UNIX/Linux files to Windows network neighbors to realize file sharing between UNIX/Linux and Windows, but it also supports file sharing between UNIX/Linux platforms.
The server-side program of NFS adopts the multi-process (nfsd) model, and the number of processes is fixed, which is 4 by default. In most cases, these processes are difficult to shoulder heavy responsibilities. When there are a large number of concurrent requests, some requests will be rejected due to insufficient number of processes. Therefore, we can appropriately increase the number of NFS server-side processes by modifying /etc/sysconfig/nfs, for example:
As a result, the concurrent processing capability of NFS server is improved, but it is still not optimistic. When the number of concurrent users reaches 1,000, our stress tests are rarely successfully completed.
NFS is destined not to be suitable as a sharing scheme for I/O intensive files, but as a general purpose, such as providing resource sharing within a site, its advantage is that it is easy to build and can reduce unnecessary data redundancy.