发新话题
打印

NETAPP技术学习全程记录

本主题由 awu 于 2008-10-12 15:31 设置高亮
引用:
原帖由 冬瓜头 于 2008-7-4 16:49 发表
There are two options in the "exportfs" command.One is "root=", the other is "anon=".

1.If you use "root=" option in the "exportfs" command, then the filer will assign UID 0 to the root user of t ...
就是这个地方复杂一些,多看几次就可以理解了.我手头的文档写的太绕,实际冬瓜头兄弟的这个比较好.

TOP

options 中NFS版本相关项目

options nfs.v2.df_2gb_lim   
Causes the storage system to return replies to the “file system statistics” NFS v2 request that shows no more than (2**31)-1 (or 2,147,483,647) total, free, or available bytes (i.e., 2 GB) on the file system.
options nfs.v3.enable    
When enabled, the NFS server supports NFS v3. Disable this option if there is a problem with some client when using NFS v3, and that client cannot be configured to use NFS v2. Valid values for this option are on (enabled) or off (disabled).
options nfs.v4.enable     
When enabled, the NFS server supports NFS v4. NFS v4 support is only over the TCP protocol. Valid values for this option are on (enabled) or off (disabled).
options nfs.v4.id.domain     
This option controls the domain portion of the string form of user and group names as defined in the NFS v4 protocol. The domain name is normally taken from the NIS domain in use, or otherwise from the Domain Name System (DNS). However if this option is set, it will override this default behavior. When the option nfs.webnfs.enable is ‘on’, the NFS server supports WebNFS lookups. Valid values for this option are on (enabled) or off (disabled).


options nfs.v4.read_delegation    
Read delegations allow NFS v4 clients to do read operations locally without contacting the server. These include open for read, read locks, and file read operations. Both the server and client must support read delegations for this feature to work. When enabled, read delegations are supported for NFS v4. This feature is not supported for NFS v2 or v3.
options nfs.v4.write_delegation   
Write delegations allow NFS v4 clients to do write operations locally without contacting the server. These include open for write, write locks, and writing to files. Both the server and client must support write delegations for this feature to work. When enabled, write delegations are supported for NFS v4. This feature is not supported for NFS v 2 and v3. Valid values for this option are on (enabled) or off (disabled).

有帖子说默认情况下V3,V4版本都是enable的,但在模拟器中默认的是V2,V3 enable.

[ 本帖最后由 ender 于 2008-7-7 12:15 编辑 ]

TOP

NFS的性能调整(一)

资料里还说了一大堆关于nfs的options 看了看平时应该都用不上,看选项的名称大概也猜的出来是做什么用途的。有需要再去查就是了。

从网上搜到一篇关于NFS性能调整的文章,觉的还不错。这里对照着服务器端为NETAPP的FILER来更新一下:
首先我们需要从客户机和服务器端分别对整个NFS的环境做个仔细的分析。我们先把从客户端放在前面开始考虑。这里面没有讨论到网络上的很多设置,那个讨论起来就扯的太远了。
一.设置合适的block size,优化传输速度
     在客户端,一个最重要优化设置就是NFS数据的传输buffer sizes,特别是 mount命令的选项 rsize and wsize.
     多数情况下mount命令默认使用4K作为这个值。在前面说到NFS版本限制的时候也说到过V2的诸多限制中有一个值就是V2最多支持rsize and wsize为8K。到了V3版本后这个值变为了32K。NETAPP对客户端的这两个参数的推荐值,linux,solaris,aix都是rsize=32768,wsize=32768。
     也可以自己在系统中用不同的值做个测试。分别用unix的特殊文件/dev/zero和/devll做写入和读出的测试。
     例如:写入的例子,建议是生成文件大小为系统内存的2倍为宜。
      
# time dd if=/dev/zero of=/mnt/home/testfile bs=16k count=16384
       读出的例子。
      # time dd if=/mnt/home/testfile of=/devll bs=16k
     然后把这个NFS的文件系统umount后再 mount才用不同的值来测试。
   
     这个实验在模拟器上做就没有太大意思了,不会比系统里那个硬盘快的。



[ 本帖最后由 ender 于 2008-7-7 22:34 编辑 ]

TOP

NFS的性能调整(二)

几种常用UNIX环境NETAPP针对数据库使用NFS的情况下,推荐使用的mount参数,

Linux:
rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3

Solaris:
rw,bg,hard,intr,rsize=32768,wsize=32768,proto=tcp,forcedirectio,noac,vers=3

AIX:

cio,rw,bg,hard,intr,proto=tcp,vers=3,rsize=32768,wsize=32768

bg  是指background挂接,如果挂接失败将重试安装。
hard 是指当NFS服务器没有响应的时候客户端会继续重试直到NFS服务器响应为止。与之相对,soft指没响应的时候系统会返回一个错误。
proto是指使用TCP还是UDP协议,当然是使用TCP了。
intr 允许通知中断一个NFS调用。当服务器没有应答需要放弃的时候有用处。 这点LINUX的要求比较奇怪。
forcedirectio,cio这些是特定厂商自己提供的功能。都是为了更好的提供数据的数据完整性,和数据吞吐等而设定的。非数据库使用方式,不建议使用。
---------------------------------------------------
Concurrent I/O provides the best performance for Oracle Databases since it:
! Bypasses Virtual Memory Manager (VMM) module code
! Avoids caching of file data in the kernel
! Avoids contention on the per file write lock that blocks readers, therefore relying on the
applications to do file access synchronization
Concurrent I/O is enabled with the “cio” mount option. More information on “cio” is available in the IBM
paper Improving Database Performance With AIX Concurrent I/O.1
While that paper describes concurrent I/O in relation to the JFS2 filesystem, the concepts are
applicable to NFS starting with AIX release 5.3 ML-03.
                                                                                            摘自IBM资料,关于CIO                             
--------------------------------------------------
acregmin=n:设定最小的在文件更新之前cache时间,默认是3
acregmax=n:设定最大的在文件更新之前cache时间,默认是60
acdirmin=n:设定最小的在目录更新之前cache时间,默认是30
acdirmax=n:设定最大的在目录更新之前cache时间,默认是60
actimeo=n:将acregmin、acregmax、acdirmin、acdirmax设定为同一个数值,默认是没有启用。
                                                                                            LINUX的actimeo参数
---------------------------------------------------

[ 本帖最后由 ender 于 2008-7-7 23:10 编辑 ]

TOP

NFS的性能调整(三)

在客户端有一个容易忽视掉的问题,那就是网卡的驱动程序     
      最好升级网卡的驱动,特别是LINUX。多数情况下都会选择安装完整的LINUX,现在的LINUX版本都可以识别多数的网卡。但是使用的多是一个通用的驱动程序,对FC HBA也是一样的情况。建议到相关厂家网站上下载最新的驱动安装。还可以避免很多莫明其妙的问题,有些OEM的卡的驱动也特别注意。很可能是被该动过的。

[ 本帖最后由 ender 于 2008-7-8 00:14 编辑 ]

TOP

NFS的性能调整(四)

在客户端和服务器端都可以使用nfsstat命令来对NFS的操作进行监控及分析。



Check the following parameters:
  • timeout>5%. Requests     timing out before the server can answer them.
  • badxid~timeout. Server     slow. Check nfsstat –m.
  • badxid~0 and timeouts > 3%. Packets     lost in the network; check netstat. If this     number is the same as bad calls, the network is congested.
  • retrans. May indicate     network or routing problem if retransmit >5%.
  • null>0. Automounter     timing out. Increase the timeout parameter on     the Automounter configuration.
In the output of the nfsstat –m command, thefollowing parameters are critical:
  • srtt. Smoothed     round-trip time

  • dev. Estimated deviation

TOP

NFS的性能调整(五)

前面说到的都是从客户端来进行性能的优化,调整等。而NETAPP 的FILER做为NFS的服务器端的优化和性能调整就显示的更加重要一些。服务器端的问题会影响到所有的客户端。
     CPU的速度直接决定了对NFS请求的处理和响应。
     Memory 这个当然是越多越好。
     System bus 服务器的内部数据都是走这个。在部分阵列的宣传资料中常看到说系统内部带宽达到多少多少。
     Network 客户端所有的读写请求都要通过网络来实现。相信现在多数的网络建设都应该在千兆以上了,亲戚的网吧现在都用的是HUAWEI的千兆交换机来组网的。呵呵。

附件

nfs perf.jpg (35.75 KB)

2008-7-8 14:55

nfs perf.jpg

TOP

NFS的性能调整(六)

在DATA ONTAP上,系统提供了大量的命令来对性能数据进行收集和分析。
sysstat, nfsstat, netstat, ifstat, nfs_hist, nfs-top, stats, statit, netdiag 和 wafl_susp。
还有pktt在被集成在DATA ONTAP中,其收集的信息主要提供给NETAPP的技术支持使用。

sysstat   

The sysstat command is used to report storage system aggregate performance statistics. The report includes the current CPU utilization, amount of network input/output traffic, disk I/O, and tape I/O. When invoked without any arguments, the printout is repeated every 15 seconds.
Examples
sysstat 1
Displays the default output every second; requires control-C to terminate.
sysstat -s 1
Displays the default output every second; upon control-C termination, prints out the summary statistics.
sysstat -c 10
Displays the default output every 15 seconds, stopping after the 10th iteration.
sysstat –u –c 10 –s 2
Displays the utilization output format every 2 seconds, stopping after the 10th iteration; upon completion, prints out the summary statistics.
sysstat –x –s 5
Displays the extended (full) output every 5 seconds; upon control-C termination, prints out the summary statistics

这些命令都有众多的参数,看一个人是否有丰富的经验也可以通过对参数的灵活应用来看哈。
平时用的不多也记不住,用的时候man看一下就是了。

[ 本帖最后由 ender 于 2008-7-8 15:06 编辑 ]

TOP

NFS的性能调整(七)

nfsstat

The nfsstat command displays statistical information about the NFSand remote procedure call (RPC) interfaces to the kernel. It can also be usedto reinitialize this information. If no options are given the default is
NetApp>nfsstat, whichwillrequest the listing of every statistical data
The following table describes the output from the nfsstat command as server RPC displaysfields with separate values for TCP and User Datagram Protocol (UDP):

  Header
  
  Description
  
  calls
  
  Total RPC calls received
  
  badcalls
  
  Total number of calls rejected by the RPC layer
  
  nullrecv
  
  Number of times an RPC call was not available even though  it was believed to have been received
  
  badlen
  
  Number of RPC calls with a length shorter than that  allowed for RPC calls
  
  xdrcall
  
  Number of RPC calls whose header could not be decoded by  External Data Representation (XDR)
  


The server NFS display shows the number ofNFS calls received (calls) and rejected (badcalls) and the countsand percentages for the various calls that were made.

nfsstat 同样可以带很多不同的参数,其中最有用的是 nfsstat -d
Command to Decode Mount and Export problemsThe nfsstat –d
command displays reply cache statistics as well as incomingmessages, including allocated mbufs. This diagnostic option allows fordebugging of all NFS-related traffic on the network.

[ 本帖最后由 ender 于 2008-7-8 20:21 编辑 ]

TOP

NFS的性能调整(八)

ifstat
Displays device-level statistics for network interfaces
Syntax ifstat [ -z ] -a | interface_name
The ifstat command displays statistics about packets received and sent on a specified network interface or on all network interfaces. The statistics are cumulative since the storage system was booted.
The -z argument clears the statistics. The -a argument displays statistics for all network interfaces including the virtual host and the loopback address. If you don't use the -a argument, specify the name of a network interface.
nfs_hist
nfs_hist is a priv set advanced command that displays information on the processing time for NFS requests which could not be processed immediately by WAFL (i.e., they were suspended at least once). The information is given in the form of a delay time distribution, which gives the number of messages of a given type that were delayed for that amount of time (in milliseconds).
In addition, delay distributions are given, which indicate the time various messages spent waiting to be processed in the system. Separate distributions are given for messages waiting on a queue to be processed by WAFL and those waiting on a queue to be processed by all other processes. While these delay distributions include non-NFS messages, they may be helpful in understanding how the system is working when one is attempting to understand NFS performance issues.
The information displayed includes messages processed since the delay distributions were last zeroed with the -z option (or since reboot if the delay distributions have not been zeroed).
netdiag
Performs network diagnostics
Syntax netdiag [ -s|v|d ] [ -nbate ] [ -p [ -I interface ] ]
The netdiag command analyzes the statistics continuously gathered by the network protocol code and (if required) performs various tests to ensure the sanity of operation of the protocol code. It displays the results of the analysis (and any tests performed) along with suggested remedial actions (if any problems are found). It analyzes almost all of the statistics displayed by the many forms of the netstat command for aberrant values.
The first form presented allows the user to specify what subset(s) of the networking subsystem to address and what kind of output to produce. The various options that influence this command form are described in detail below.
The second form displays the usage message.


上面给出了几个用于性能数据收集和分析的命令的用途介绍。目前没有比较好的案例说明具体怎么时候,待以后有合适的再更新。

[ 本帖最后由 ender 于 2008-7-8 20:23 编辑 ]

TOP

发新话题