- 论坛徽章:
- 1
|
NFS读数据速度异常问题,请教
如果ftp传输正常,应可排除网络连接以及硬盘写速度的原因
用nfsstat检查一下先看看NFS的状态有何异常
服务器端:# nfsstat -s
The fields displayed in the output indicate if the server is having problems receiving or removing packets from the NFS service socket.
SERVER RPC statistics:
calls: This is a count of the total number of NFS RPC calls made to the server.
badcalls: A count of the RPC requests that were rejected by the server by the RPC mechanism, before they were passed to the kernel. An RPC request can be rejected if there was an authentication failure, for example, the client did not present valid credentials or a client attempted a write operation on a file system that was exported as read-only.
nullrecv: This is incremented whenever an nfsd daemon was scheduled to run but found no packet on the NFS service socket queue. If this is greater than 0, it indicates that there may be too many instances of nfsd running on this server.
badlen/xdrcall: A count of RPC requests received by the server that were too short(badlen) or the XDR(external data representation) headers in the packet were incorrect (xdrcall). This points to an underlying network problem that is causing these packets to get corrupted.
SERVER NFS statistics:
This section details the activity at the NFS application level. It lists the different call types, each corresponding to a procedure within the NFS RPC service.
calls: same as above
badcalls: same as above
null: A null procedure is included in every RPC program. A successful return from a call to null shows that the server is alive and the network is operational. It shouldn't be greater than 1%.
getattr: Number of get file (and directory) attribute calls, such as modification time, size, owner, etc. This information is cached to avoid having to contact the server every time it is required. If this is too high (greater than 50%), check the attribute cache value on the client to make sure the cache window is not set to zero.
setattr: Number of set file attribute calls as a result of changing a remote file's attributes.
lookup: Number of lookup requests. A lookup request takes a filename and file handle for a directory and returns a file handle pointing to the file on the server.
readlink: Number of read-symbolic-link value requests. Not applicable under SCO NFS Release 1.1.*, since we do not support symbolic links in these releases.
read, write, create, remove, rename: Number of requests to read, write, create, remove and rename a file.
link: Number of requests to create a hard link on the server.
symlink: Number of requests to create symbolic links. SCO NFS 1.1.* does not support this and hence the count would be 0.
mkdir, rmdir, readdir: Number of requests to create, remove and read a directory of files.
fsstat: Number of requests to return information about the mounted file system.
客户端:# nfsstat -c
The client RPC statistics indicate the success rate of the client in reaching NFS servers. The individual fields and what they represent are as follows:
CLIENT RPC Statistics:
calls: Total number of client requests to NFS servers.
badcalls: Number of RPC requests that returned an error. If a request fails due to a timeout (the server did not respond in the given time interval) or an interruption, this value is incremented.
retrans: Number of requests that were retransmitted because no response was received from the NFS server within the timeout interval.
timeout: Number of calls that timed out waiting for a response from the server. If this is high, it could mean that the requests are not reaching the server.
badxid: The XID is a serial number that uniquely identifies the request. Multiple retransmissions of the same request are sent with the same XID. If a client receives a response with an XID for which there is no outstanding RPC request, then this value is incremented. This means that the client has already received a reply to that request. This points to the fact that the server is slow in responding to all NFS requests.
If this value is low, for example, close to 0, and timeout
is high, it indicates that the network is dropping packets.
The mount command uses a default setting of 8k for read
and write buffer sizes. Reduce these values using the
rsize, wsize options.
If this value is almost equal to the number in the timeout
field, increase the value of the timeout option in the mount
command, to reduce excessive retransmissions.
wait: Number of requests that had to wait for an available client handle. If this number is high, the number of nfsclienthandles on the server should be increased. On SCO systems, this is set to 4, by default. To increase this, change the value of x in:
nfsclnt x
in the file /etc/nfs. You will need to restart NFS to make
this change effective.
newcred: Number of times the client authentication information had to be refreshed. Does not apply in the case of SCO NFS 1.1.*, since these releases do not support Secure RPC.
CLIENT NFS Statistics:
The client NFS statistics provide almost the same information as discussed in the server NFS statistics, with a few additions:
nclget: Number of times the client had to request for a new client handle for an NFS call.
nclsleep: Number of times the client had to wait because no client handle was available. Ideally, this should be zero.
你可把结果贴出,看看哪位在用NFS的做个对比帮你找一下原因。 |
|