Figure-LAMP
LAMP network filesSystemOptimization
Network File System (NFS) is a way to share disks through the network. NFS helps ensure that each host has a copy of the same data and that the modifications are reflected on all nodes. However, by default, NFS configuration is not suitable for large-capacity disks.
Each client should use rsize = 32768, wsize = 32768, intr, noatime to mount a remote file system to ensure:
Use a large read/write block (number specifies the maximum block size, which is 32 kb in this example ).
The NFS operation can be interrupted when it is suspended.
Does not continuously update atime.
You can put these settings in/etc/fstab, as shown in listing 3. If an automatic installer is used, place these settings in the appropriate/etc/auto. * file.
On the server side, make sure there are enough NFS kernel threads to process all clients. By default, only one thread is started, but the Red Hat and Fedora systems start eight threads. This number should be increased for busy NFS servers, such as 32 or 64. You can use the nfsstat-rc command to evaluate the client and check whether there is blocking. This command displays the client Remote Procedure Call (RPC) statistics. Listing 5 shows the client statistics of a Web server.