Hi team, here's a new guide.
1 NFS Protocol
NFS uses a client/server architecture.
The server program provides other computers with access to the file system, and the client program accesses the shared file system.
NFS allows clients of different types of operating systems to share files with each other over a network.
Currently, most mainstream application scenarios are NFS V3, and NFS V4 is rarely used.
According to the protocol process, when NFSV4 opens a file for the first time, the packet processing performance of NFSV4 is much more complex than that of NFSV3.
Therefore, the performance of NFSV4 for processing small files is lower than that of NFSV3.
The following figure shows the NFS protocol process.

The array latency includes TCP packet sending and receiving, protocol processing, and file system processing.
Run the command to check the protocol delay and compare the delay with the client delay to determine whether the file system delay, protocol processing delay, and TCP packet sending and receiving delay are long.
NFS protocol processing statistics:
nas_proto_pum -m nfs -c clear_nfs3_op_stat (Obtaining Data)
nas_proto_pum -m nfs -c get_nfs3_op_stat (Cleaning Data)

Counts: number of I/Os
Average Delay: indicates the average delay at the NFS layer.
File System Average Delay: average delay of the VFS layer and file system
If the delay measured by the NFS layer differs greatly from that measured by the file system, you need to compare the delay measured by the VFS layer.
NAS_VFS (delay of invoking the fs interface):
nas_proto_pum -m nas_vfs -c get_request_stat (Obtaining Data)
nas_proto_pum -m nas_vfs -c clean_request_stat (Cleaning Data)

The last column is the average file system latency.
1. Determine the file system invoking delay records based on the maximum delay and average delay.
2. The file system latency is the key point of performance. In this case, we need to analyze the performance test scenario. When a protocol receives a command word, it may split the I/O into multiple I/Os and deliver them to the file system.
If the host delay is much longer than the file system delay measured by the protocol, check whether a large number of queues exist in the TCP sending queue of the storage array.
1. Access the minisystem.

2. Run the netstat -nap command.
The pipe character cannot be used in the minisystem.
Therefore, you need to run the command several times to collect and observe the information.
3. Check whether queues exst.

If a large number of queues exist, check whether the network, network adapter, or host performance bottleneck occurs.
2 CIFS Protocol
CIFS is a network file sharing protocol that allows Windows hosts on the Internet and intranets to access files or other resources on the network. CIFS is mainly used for file sharing.
CIFS is a public version of the Server Message Block (SMB).
The SMB protocol is a network file access protocol that allows native programs to access files on a computer on a LAN and request services from that computer.
OceanStor 5300 V3/5500 V3/5600 V3/5800 V3/6800 V3 storage systems support SMB 1.0, SMB 2.0, and SMB 3.0.
The following figure shows the CIFS protocol process.

SMB2 protocol processing statistics:
The SMB2 global data statistics command focuses on the I/O size and latency.
nas_proto_pum -m smb2 -c get_smb2_stat (Obtaining Data)
nas_proto_pum -m smb2 -c clear_smb2_stat (Cleaning Data)
I/O size statistics:

Delay statistics:

1. Based on the I/O size distribution data, we can analyze the size of the currently processed data block. After the oplock function of SMB2 is enabled, the client has cache. As a result, I/Os are often combined and cannot correspond to host I/Os. The I/O size greatly affects the bandwidth of the current file system, especially random I/Os of large files.
2. Based on the I/O latency distribution data, you can observe the latency jitter of the file system. The basic features of smb2.1 include the flow control feature (credit). The client and server are sensitive to the I/O latency fluctuation, especially the client. If the average I/O latency is small, the performance cannot be improved. Pay attention to the latency fluctuation.
3. SMB2 delay measurement is the entry for SMB2 performance analysis. Generally, you need to analyze the command word delay, I/O size distribution, and I/O delay to obtain the key points to be analyzed in the next step.
Run the following command to measure the read/write latency of the SMB2 client:
nas_proto_pum -m smb2 -c get_smb2_client_stat (Obtaining Data)
nas_proto_pum -m smb2 -c clear_smb2_client_stat (Cleaning Data)
Statistics screenshot:


