OviOS vs CentOS with NFSv4.2 performance matchup

NFSv4.2 performance comparison between OviOS Linux and Centos Linux.

In this article I'll show the results of a performance test between OviOS Linux 3.02 (upgraded to kernel 4.14.99-OVIOS) and CentOS 7 (Minimal iso).

The test machines are two identically setup VMs, running on an archlinux server:

[root@archlinux ~]# /usr/bin/qemu-system-x86_64 --version
QEMU emulator version 4.1.0


Centos:



[root@localhost ~]# cat /etc/os-release  
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"



virsh # dominfo --domain centos
Id:             33
Name:           centos
OS Type:        hvm
State:          running
CPU(s):         4
CPU time:       633.9s
Max memory:     4096000 KiB
Used memory:    4096000 KiB
Persistent:     yes 

Using a LV:

[root@localhost ~]# lvs
 LV     VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert                                                  
 nfsvol storage -wi-a----- <20.00g       

OviOS:

ovios-shell> version  
Distributor ID: OviOS Linux
Description:    Linux Storage OS
Release no:     20190821
Codename:       Arcturus
Version no:     3.02
Kernel:         4.14.99-OVIOS
ovios-shell> 


virsh # dominfo --domain  OviOS
Id:             31
Name:           OviOS
OS Type:        hvm
State:          running
CPU(s):         4
CPU time:       785.5s
Max memory:     4096000 KiB
Used memory:    4096000 KiB
Persistent:     yes
On OviOS using an NFS volume:

ovios-shell> vol list
NAME             USED  AVAIL  MOUNTED  SHARESMB  SHARENFS
nfspool          686K  18.9G      yes  off       off
nfspool/nfsvol    24K  18.9G      yes  off       rw,sync,no_root_squash,no_subtree_check
ovios-shell> 

The test:

NFS exports mounted with the default options:

192.168.122.83:/ovios/nfspool/nfsvol on /mnt/ovios type nfs4 (rw,relatime,vers=4.2,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,cl
ientaddr=192.168.122.1,local_lock=none,addr=192.168.122.83)
192.168.122.244:/nfsvol on /mnt/centos type nfs4 (rw,relatime,vers=4.2,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192
.168.122.1,local_lock=none,addr=192.168.122.244)


1. Test 1:

Running 10 write tests on each mountpoint from the archlinux client machine:

CentOS Linux:

# for ((i=1;i<=10;i++)); do time dd if=/dev/zero of=/mnt/centos/testfile bs=16k count=128k; done
the average write speed was: 43.8 MB/s

OviOS Linux:

# for ((i=1;i<=10;i++)); do time dd if=/dev/zero of=/mnt/ovios/testfile bs=16k count=128k; done    

the average write speed was: 102.6 MB/s

In this test OviOS performed obviously better. 

The clear winner was OviOS in the first test.

2. Test 2:

Running the same write tests, but this time concurrently, and increased NFS threads to 48 (on both OviOS and CentOS)

CentOS Linux:

# for ((i=1;i<=10;i++)); do time dd if=/dev/zero of=/mnt/centos/testfile bs=16k count=128k; done

Average write speed: 51.2 MB/s

OviOS Linux:

# for ((i=1;i<=10;i++)); do time dd if=/dev/zero of=/mnt/centos/testfile bs=16k count=128k; done

Average write speed: 91.7 MB/s

With 48 threads OviOS performed similarly, although there was a performance drop, however CentOS' performance increased by ~9MB/s.

Even so, OviOS performed much better in concurrent operations.


3. Testing with ioping:

3.1 Seek rate 

OviOS: 24.4 MB/s

[root@archlinux ~]# ioping -R /mnt/ovios/

--- /mnt/ovios/ (nfs4 192.168.122.83:/ovios/nfspool/nfsvol) ioping statistics ---
18.4 k requests completed in 2.94 s, 71.8 MiB read, 6.24 k iops, 24.4 MiB/s
generated 18.4 k requests in 3.00 s, 71.8 MiB, 6.12 k iops, 23.9 MiB/s
min/avg/max/mdev = 112.3 us / 160.3 us / 5.15 ms / 55.3 us
[root@archlinux ~]# ioping -R /mnt/ovios/ 

CentOS: 10.4 MB/s

[root@archlinux ~]# ioping -R /mnt/centos/

--- /mnt/centos/ (nfs4 192.168.122.244:/nfsvol) ioping statistics ---
7.91 k requests completed in 2.96 s, 30.9 MiB read, 2.67 k iops, 10.4 MiB/s
generated 7.91 k requests in 3.00 s, 30.9 MiB, 2.63 k iops, 10.3 MiB/s
min/avg/max/mdev = 180.4 us / 374.4 us / 6.42 ms / 130.7 us

3.2 Sequential speed

OviOS:  80.0 MB/s

[root@archlinux ~]# ioping -RL /mnt/ovios 
--- /mnt/ovios (nfs4 192.168.122.83:/ovios/nfspool/nfsvol) ioping statistics ---
948 requests completed in 2.96 s, 237 MiB read, 319 iops, 80.0 MiB/s
generated 949 requests in 3.00 s, 237.2 MiB, 316 iops, 79.1 MiB/s
min/avg/max/mdev = 1.41 ms / 3.13 ms / 214.5 ms / 15.2 ms
[root@archlinux ~]# ioping -RL /mnt/centos
CentOS: 14.3 MB/s

[root@archlinux ~]# ioping -RL /mnt/centos

--- /mnt/centos (nfs4 192.168.122.244:/nfsvol) ioping statistics ---
171 requests completed in 2.99 s, 42.8 MiB read, 57 iops, 14.3 MiB/s
generated 172 requests in 3.02 s, 43 MiB, 56 iops, 14.2 MiB/s
min/avg/max/mdev = 6.67 ms / 17.5 ms / 28.7 ms / 3.51 ms
3.3 Asynchronous I/Os:

OviOS: 1.71 ms avg latency

[root@archlinux ~]# ioping -c 6 -A /mnt/ovios/
--- /mnt/ovios/ (nfs4 192.168.122.83:/ovios/nfspool/nfsvol) ioping statistics ---
5 requests completed in 8.53 ms, 20 KiB read, 586 iops, 2.29 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 795.7 us / 1.71 ms / 3.37 ms / 872.6 us
CentOS: 2.54 ms avg latency 

[root@archlinux ~]# ioping -c 6 -A /mnt/centos/
--- /mnt/centos/ (nfs4 192.168.122.244:/nfsvol) ioping statistics ---
5 requests completed in 12.7 ms, 20 KiB read, 393 iops, 1.54 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 2.30 ms / 2.54 ms / 2.99 ms / 234.9 us

3.4 Cached I/Os:

OviOS: 286.7 us avg latency

[root@archlinux ~]# ioping -c 6 -C /mnt/ovios/   
--- /mnt/ovios/ (nfs4 192.168.122.83:/ovios/nfspool/nfsvol) ioping statistics ---
5 requests completed in 1.43 ms, 20 KiB read, 3.49 k iops, 13.6 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 12.3 us / 286.7 us / 1.33 ms / 521.4 us

CentOS: 329 us avg latency

[root@archlinux ~]# ioping -c 6 -C /mnt/centos/
--- /mnt/centos/ (nfs4 192.168.122.244:/nfsvol) ioping statistics ---
5 requests completed in 1.65 ms, 20 KiB read, 3.04 k iops, 11.9 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 11.7 us / 329.1 us / 1.59 ms / 630.7 us
3.5 Direct I/Os:

OviOS: 1.38 ms avg latency

[root@archlinux ~]# ioping -c 6 -D /mnt/ovios/      
--- /mnt/ovios/ (nfs4 192.168.122.83:/ovios/nfspool/nfsvol) ioping statistics ---
5 requests completed in 6.92 ms, 20 KiB read, 722 iops, 2.82 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 1.28 ms / 1.38 ms / 1.47 ms / 61.7 us

CentOS: 2.24 ms avg latency

[root@archlinux ~]# ioping -c 6 -D /mnt/centos/  
--- /mnt/centos/ (nfs4 192.168.122.244:/nfsvol) ioping statistics ---
5 requests completed in 11.2 ms, 20 KiB read, 446 iops, 1.74 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 1.73 ms / 2.24 ms / 2.96 ms / 449.4 us
Conclusion:

OviOS Linux performed better than CentOS in all tests, in most tests quite 2 times as fast. 
It comes as no surprise considering that OviOS is built specifically to be a storage appliance-like OS, free from any other processes that would consume resources. 

Although for this test I used the minimal CentOS, the differences in the performance results are clearly favoring OviOS Linux as an NFS storage server.