inetum-orleans / nfs4j-daemon

Pure Java NFS v3/v4.1 server backed by dCache nfs4j
Apache License 2.0
35 stars 10 forks source link

portmap service not available & performance testing #1

Closed marcharding closed 5 years ago

marcharding commented 5 years ago

Hey,

i just wanted to give this a try 😉 but upon startup i'm greeted with

2018-12-16 15:48:01.941 [] [main] INFO  o.d.o.r.OncRpcSvc - Registering new program [100005:3] : org.dcache.nfs.v3.MountServer@fa4c865
2018-12-16 15:48:01.943 [] [main] INFO  o.d.o.r.OncRpcSvc - Registering new program [100003:3] : org.dcache.nfs.v3.NfsServerV3@131ef10
2018-12-16 15:48:01.945 [] [main] INFO  o.d.o.r.OncRpcSvc - Registering new program [100003:4] : org.dcache.nfs.v4.NFSServerV41@55b0dcab
2018-12-16 15:48:06.199 [] [main] INFO  o.d.o.r.OncRpcSvc - portmap service not available
2018-12-16 15:48:10.237 [] [main] WARN  o.d.o.r.OncRpcSvc - Failed to register at portmap: portmap service not available

I did enable the windows rpc services which changed nothing.

Is there anything i'm missing?

Toilal commented 5 years ago

I also have this problem, but did not investigate it for now. I specify the port manually on mount options for now.

marcharding commented 5 years ago

Ok it is working now 😃

The initial mount takes unusually long (nearly 30 seconds).

The performance (at least for me) is not as good as with winnfsd. Maybe something on my system/config is off?

winnfsd

$ dd if=/dev/zero of=/mnt/winnfsd/testfile bs=256MB count=1
1+0 records in
1+0 records out
256000000 bytes (256 MB) copied, 2.28825 s, 112 MB/s`

$ dd if=/dev/zero of=/mnt/winnfsd/testfile bs=8192 count=1024
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB) copied, 0.0824396 s, 102 MB/s

nfs4j-daemon

$ dd if=/dev/zero of=/mnt/nfs4j/testfile bs=256MB count=1
1+0 records in
1+0 records out
256000000 bytes (256 MB) copied, 79.4148 s, 3.2 MB/s

dd if=/dev/zero of=/mnt/nfs4j/testfile bs=8192 count=1024
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB) copied, 2.9786 s, 2.8 MB/s

Please do not take this as criticism of your effort!

Toilal commented 5 years ago

Thanks, no worries. Huge difference with big files!

Toilal commented 5 years ago

@marcharding Are you sure winnfsd was really mounted in /mnt/winnfsd ?

I have done the tests with following mount options, and results are just the opposite.

winnfsd

vagrant@ubuntu-xenial:/mnt/winnfsd$ dd if=/dev/zero of=/mnt/winnfsd/testfile-winnfsd-big bs=256MB count=1
1+0 records in
1+0 records out
256000000 bytes (256 MB, 244 MiB) copied, 33.1782 s, 7.7 MB/s
vagrant@ubuntu-xenial:/mnt/winnfsd$ dd if=/dev/zero of=/mnt/winnfsd/testfile-winnfsd-1024 bs=8192 count=1024
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.996239 s, 8.4 MB/s
vagrant@ubuntu-xenial:/mnt/winnfsd$

nfs4j

vagrant@ubuntu-xenial:/mnt/nfs4j$ dd if=/dev/zero of=/mnt/nfs4j/testfile-nfs4j bs=256MB count=1
1+0 records in
1+0 records out
256000000 bytes (256 MB, 244 MiB) copied, 2.71022 s, 94.5 MB/s
vagrant@ubuntu-xenial:/mnt/nfs4j$ dd if=/dev/zero of=/mnt/nfs4j/testfile-nfs4j-1024 bs=8192 count=1024
1024+0 records in
1024+0 records out
8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.109783 s, 76.4 MB/s
vagrant@ubuntu-xenial:/mnt/nfs4j$

Sometimes, winnfsd even fails with this message : dd: closing output file '/mnt/winnfsd/testfile-winnfsd': Input/output error

Mount commands are the following

mount -t nfs -o port=2048 192.168.1.1:/C/Users/Toilal /mnt/nfs4j
mount -t nfs -o vers=3,port=2049 192.168.1.1:/C/Users/Toilal /mnt/winnfsd

Tests performed on ubuntu 16.04 (virtualbox)

Toilal commented 5 years ago

Are you sure your nfs client use nfs v4.1 ?

Toilal commented 5 years ago

Maybe I should mount winnfsd with udp and nolock options as they are provided by vagrant-winnfsd.

Toilal commented 5 years ago

About the same results with those options

marcharding commented 5 years ago

I'm sure the folder was mounted.

Did you leave logging on winnfsd on? That slow things down quite a bit (but the numbers above are with logging on).

Nevertheless, the results are really strange, i'll try again tomorrow.

Toilal commented 5 years ago

logs are off

Toilal commented 5 years ago

0.2.0 is out, it should fix the "Failed to register at portmap: portmap service not available" message as it now embeds it's own portmap service. Embedded portmap service is starting only if not available (TCP 111).

If you are already running winnfsd for tests when starting nfs4j, winnfsd also embeds a portmap service, so you can disable it with --portmap-disabled flag.

I let the issue open to speak about performances, I wonder why we don't have the same results at all.

marcharding commented 5 years ago

Hm, now i get about the same speeds as you for nfs4j, about 100MB/s. Winnfsd peaks at about 150MB/s for me.

Great work! I'll do some more tests later.

You can close this issue 😉

Toilal commented 5 years ago

Thanks ! Let me know results of your tests, it's still very interesting. 👍