Contact Free trial Login

Verify NFS Server Requirements

Private Cloud Edition supports the Network File System (NFSv4) protocol.

Verify the Required Ports are Open

The NFS server requires ports 2049 and 111 to be open.

Use the netcat tool to verify that the required ports are open. The netcat tool is a computer networking utility used to read and write to network connections using TCP or UDP.

To verify that the required ports are open, execute the following commands:

  • nc -zvu <host_name> 111

  • nc -zv <host_name> 2049

When the responses are successful you receive a response similar to the following:

[ec2-user@ip-10-1-1-97 ~]$ nc -zv <nfs_host_name> 2049
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 10.1.0.155:2049.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.

Mount the NFS Server

Mount the NFS server in a temporary directory on the host.

  1. Switch to root by typing:
    sudo su

  2. To mount the NFS in a temporary directory, run the following commands and replace both the <nfs-server> and the <nfs-path> with your own values.
    Run:
    mkdir -p /mnt/home
    and then:
    mount -t nfs4 -o proto=tcp,port=2049 <nfs-server>:<path> /mnt/home/
    If the mount fails, you do not have the required permissions.

Validate NFS Performance

Perform careful analysis of your environment, both from the client and server point of view for optimal NFS performance.

These are the high level steps for validating NFS performance:

  1. Perform some basic operations to test the performance and latency of your NFS server. Specifically, these operations will:

    • Transfer data from the client (Anypoint Platform environment) to the NFS server.

    • Measure how long each transfer takes.

  2. To validate how the Anypoint Platform handles NFS files transfers, read and write operations are tested, with both large (128MB) and small (80KB) files.

  3. Use the command time dd if=/dev/zero of=/mnt/home/<nameOfFile> bs=<blockSize> count=<amountOfBlocks> to test performance of the NFS server while transferring files with:

    • Names <nameOfFile>

    • The block size and number of blocks in the transfer are <blockSize> and <amountOfBlocks>, respectively.

Test Writing and Reading Large Files on the NFS Server

These write and read tests are performed using large files:

  • File size: 128 MB

  • Block size: 4 KB

  • Number of blocks: 32768

During the time the tests are running, different files are generated (one file per test).

  1. To start with the testing, create a directory in which to mount the NFS server:

    sudo su
    mkdir -p /mnt/home
  2. Mount the NFS server:

    mount -t nfs4 -o proto=tcp,port=2049 <nfs-server>:<path> /mnt/home/
  3. Perform writes (five files of 128 MB each) on the NFS server by running the following command:

    time for i in {1..5}; do dd if=/dev/zero of=/mnt/home/greatfile$i.test bs=4k count=32768; done

    The command output is similar to the following:

    [root@ip-10-1-1-97 ec2-user]# time for i in {1..5}; do dd if=/dev/zero of=/mnt/home/greatfile$i.test bs=4k count=32768; done
    32768+0 records in
    32768+0 records out
    134217728 bytes (134 MB) copied, 2.12805 s, 63.1 MB/s
    .
    .
    .
    real 0m8.378s
    user 0m0.034s
    sys 0m0.792s

    The real parameter in the test output should be less than 15 seconds.

Validate Read Performance

  1. Umount the NFS server:

    umount /mnt/home
  2. Mount the NFS server again by running:

    mount -t nfs4 -o proto=tcp,port=2049 <nfs-server>:<path> /mnt/home/
  3. Perform reads from the NFS server by running the following command:

    time for i in {1..5}; do dd if=/mnt/home/greatfile$i.test of=/dev/null bs=4k; done

    The real parameter in the test output should be less than 15 seconds.

Clear the Caches

Umount the NFS server to clear out any caches:

umount /mnt/home

Test Writing and Reading Small Files on the NFS server

Test small files as you did large files but with these sizes:

  • File size: 80 KB

  • Block size: 4 KB

  • Number of blocks: 20

Before starting the test, verify that the /mnt/home directory from the previous test is created.

  1. Mount the NFS server:

    mount -t nfs4 -o proto=tcp,port=2049 <nfs-server>:<path> /mnt/home/
  2. Run the following command to perform writes (five files of 80 KB each) on the NFS server:

    time for i in {1..30}; do dd if=/dev/zero of=/mnt/home/smallfile$i.test bs=4k count=20; done

    The real parameter in the test output should be around 2 seconds.

Validate Read Performance

  1. Umount the NFS server:

    umount <nfs-server>
  2. Mount the NFS server again:

    mount -t nfs4 -o proto=tcp,port=2049 <nfs-server>:<path> /mnt/home/
  3. Run the following command to perform reads from the NFS server:

    time for i in {1..30}; do dd if=/mnt/home/smallfile$i.test of=/dev/null bs=4k; done

    The important parameter in the test output is the real parameter, which should be around 2 seconds.

Delete the Test Files

When you finish the performance testing, delete the test files.

  1. Remove all generated files by running:

    rm -f /mnt/home/*.test
  2. Finally, umount the NFS server:

    umount /mnt/home

See Also

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.