Hi guys, I'm a new user to freeBSD.
I created a zpool and set compress to lz4 , then started the NFS server.
After writing some files from the client (ubuntu), I noticed that the compressratio remains to be 1.00x.
------
Here are all the steps I did:
NFS_SERVER:freeBSD 192.168.2.91
Create zpool:
Enable compress:
Check compress:
/etc/rc.conf added:
/etc/exports added:
NFS_CLIENT:ubuntu 16.04 192.168.2.129
Mount NFS:
Check mount:
Problems
All the data in /nfs was write from the client. But the compressratio is 1.00x.
To figure out what really happens, I used dd to create a file with zero:
And this file actual size is 512B (checked in both side), the compress seems working:
However, the compressratio remains 1.00x:
So I retry to write a bigger zero file and monitored the net & disk activities:
I do not understand why my disk works so hard and whether compress works or not in NFS server?
I created a zpool and set compress to lz4 , then started the NFS server.
After writing some files from the client (ubuntu), I noticed that the compressratio remains to be 1.00x.
Code:
root@freeBSD_Mixcro:/nfs # zfs get compressratio
NAME PROPERTY VALUE SOURCE
nfs compressratio 1.00x -
Here are all the steps I did:
NFS_SERVER:freeBSD 192.168.2.91
Create zpool:
root@freeBSD_Mixcro:~ # zpool create nfs ada2
Enable compress:
root@freeBSD_Mixcro:~ # zfs set compress=lz4 nfs
Check compress:
Code:
root@freeBSD_Mixcro:~ # zfs get compress
NAME PROPERTY VALUE SOURCE
nfs compression lz4 local
Code:
# nfs_server
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"
Code:
/nfs -alldirs -maproot=root 192.168.2.129
Mount NFS:
mount -t nfs 192.168.2.91:/nfs /nfs
Check mount:
Code:
root@STEI:~# df -h
Filesystem Size Used Avail Use% Mounted on
192.168.2.91:/nfs 2.7T 1.3T 1.4T 49% /nfs
...
All the data in /nfs was write from the client. But the compressratio is 1.00x.
Code:
root@freeBSD_Mixcro:/nfs # zfs get compressratio
NAME PROPERTY VALUE SOURCE
nfs compressratio 1.00x -
Code:
dd if=/dev/zero of=/nfs/test.zero bs=8k count=30000
30000+0 records in
30000+0 records out
245760000 bytes (246 MB, 234 MiB) copied, 2.33184 s, 105 MB/s
Code:
root@STEI:/nfs# du -h test.zero
512 test.zero
Code:
root@freeBSD_Mixcro:/nfs # du -h test.zero
512B test.zero
Code:
root@freeBSD_Mixcro:/nfs # zfs get compressratio
NAME PROPERTY VALUE SOURCE
nfs compressratio 1.00x -
I do not understand why my disk works so hard and whether compress works or not in NFS server?