The second measurement you'll need to make before you shop for a NAS solution is the total number of I/O operations per second that your applications will require at peak processing times. To find this number, use a Linux machine that is not doing anything else (preferably the hardware you will use for your cluster nodes) and run the nfsstat -c command. Sample output for this command looks like this:
Client rpc stats: calls retrans authrefrsh 667813156 38 0 Client nfs v2: null getattr setattr root lookup readlink 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% read wrcache write create remove rename 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% link symlink mkdir rmdir readdir fsstat 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% Client nfs v3: null getattr setattr lookup access readlink 0 0% 129765080 0% 523295 0% 10521226 1% 86507757 0% 46448 0% read write create mkdir symlink mknod 314127903 2% 23687043 4% 748925 0% 17 0% 225 0% 0 0% remove rmdir rename link readdir readdirplus 372452 0% 17 0% 390726 0% 4155 0% 563968 0% 0 0% fsstat fsinfo pathconf commit 2 0% 2 0% 0 0% 12997359 2%
Assuming you have configured this machine to use NFS version 3 (a sample /etc/fstab entry to do this is provided later in this chapter), you can add up all of the values listed under the Client nfs v3: section of this report and then run your sample application using the time command I just described. When the application finishes running, use the nfsstat -c command again, and add up the total number of NFS calls that were made. You can then simply subtract the first number from the second number to arrive at the total number of NFS operations your application performed. Divide this number by the total number of elapsed seconds your application ran (the first number returned by the time command) to determine the average NFS I/O operations per second your application uses. Now multiply this number by the total number of applications that will be running at peak system load (order processing deadline for example) to arrive at a very rough estimate of the total number of I/O operations you'll need on your NAS server. (For a more accurate picture of the total number of I/O operations per second you will require, perform the same analysis using a batch job, and add this number to your total as well.)
Now let's examine a few of the options you have for configuring your NFS environment to achieve the best possible performance and reliability.