Novell Home

Tuning Unix / Linux NFS services to benefit Novell's NFS Gateway

Novell Cool Solutions: Feature

Digg This - Slashdot This

Posted: 6 Feb 2004
 

NFS Gateway is a NFS client which runs on a Novell server. It imports an NFS file system from a remote system (usually Unix or Linux) and makes it appear as an NSS volume, for use by NetWare clients.

NFS Gateway for NetWare 6 has the potential for very high performance as compared to NFS Gateway on NetWare 5.1. Significant redesign and performance optimization has been done in the code, especially within the implementation for NFS protocol 3. Additionally, several tuning methods and suggestions for NFS Gateway are made in the documentation for NFS Gateway for NetWare 6.

In some cases, however, it may also be necessary to tune the Unix or Linux system which is acting as the NFS Server. This is likely the case when NFS protocol 2 is being used. This document discusses tuning a Unix or Linux server to handle more simultaneous NFS requests. These methods of Unix and Linux tuning can be beneficial to NFS Gateway for NetWare 6 and also NFS Gateway from the NFS Services 3.0 product, on NetWare 5.1. However, configuration suggestions made below for NFS Gateway apply only to NFS Gateway for NetWare 6.

A Linux or Unix system running the NFS daemon (nfsd) typically has a set number of nfsd processes or threads running. The job of those processes is to pick up the requests fromm the NFS client and service them. This means only a certain number of requests can be serviced at any given time. If nfsd is manually launched with no parameters, it starts one process (thread). If nfsd is launched by the init daemon during startup, it typically includes parameters to launch 4 to 16 threads.

On most Unix and Linux systems, the number of these processes can be verified by the command:

ps -ef | grep nfsd

On some systems, each nfsd process will be listed separately:

ps -ef | grep nfsd
root 3178 44316 0 06:00:23 pts/1 0:00 grep nfsd
root 46422 5164 0 06:00:13 - 0:00 /usr/sbin/nfsd
root 46423 5164 0 06:00:13 - 0:00 /usr/sbin/nfsd
root 46424 5164 0 06:00:13 - 0:00 /usr/sbin/nfsd
root 46425 5164 0 06:00:13 - 0:00 /usr/sbin/nfsd

On other systems, such as AIX 5, there may be only one entry listed, followed by a number representing the number of active threads:

ps -ef | grep nfsd
root 3178 44316 0 06:00:23 pts/1 0:00 grep nfsd
root 46422 5164 0 06:00:13 - 0:00 /usr/sbin/nfsd 8

To boost NFS server performance, increase the number of processes (threads) which are running. Different systems may require different methods to accomplish this. Consult the system's man pages for details. Several common methods are discussed below. In these examples, the number of processes are being boosted to 32. This is an arbitrary example, not intended to suggest an optimal setting.

Linux example:

To change the number of processes to 32 dynamically, give the command:

/usr/sbin/rpc.nfsd 32

That will come into effect immediately but is not a permanent change. To make the change permanent, also edit the /etc/sysconfig/nfs file and set:
USE_KERNEL_NFSD_NUMBER="32"

Solais example:

NFS shares should already be configured in /etc/dfs/dfstab, or this process will not take effect.

Edit the initialization script file: /etc/init.d/nfs.server

Find the command which launches nfsd. The default is typically: /usr/lib/nfs/nfsd -a 16

Boost the value from 16 to 32. Then execute:

/etc/init.d/nfs.server stop
/etc/init.d/nfs.server start

AIX example:

Execute the command: chnfs -n 32
This will stop nfsd, change the permanent configuration, and restart nfsd.

If your version of AIX does not have the chnfs command, the same can be accomplished with:

stopsrc -s nfsd
chssys -s nfsd -a 32
startsrc -s nfsd

Follow-up tuning of NFS Gateway for NetWare 6:

Once the Unix or Linux system has been tuned to a certain number of threads (in these examples, 32), it makes sense to limit NFS Gateway to a similar number of requests it can make at any given time. On the GYMOUNT command used to mount the NFS file system, include the parameter:
-maxOutstandingPackets 32

If more than one GYMOUNT is being done, targeting the same remote system, still set the full value (32). Do not attempt to divide it up into the various GYMOUNT commands. NFS Gateway interprets this setting to mean the number of concurrent requests that can be sent to the remote system, regardless of the number of GYMOUNTs being done. The first GYMOUNT targeting a particular system will set the -maxOutstandingPackets to be used in connection with that system. Subsequent GYMOUNTs involving the same remote system will not override or add to that setting. All the mounts to the particular remote server will share this 'pool' of requests.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell