# What is the state of Thunderbolt networking on FreeBSD?



## petur (Apr 9, 2018)

Dear all,

I'm looking into establishing a high speed network connection between a macOS client and a FreeBSD 11.1 fileserver.
Adding a thunderbolt 3 card, such as this one from ASUS, and simply connecting it host-to-host with a cable is an economically attractive alternative to 10gigE, as 10gigE requires expensive externally connected hardware on macOS client side.

What is the state of Thunderbolt networking on FreeBSD?

Best regards,
Pétur Ingi


----------



## Bobi B. (Apr 9, 2018)

A bit off-topic here, but are you sure you really need more than 1 Gig that much? How many, what drives, and in what configuration, you have in your FreeBSD machine? What is your target usage pattern?


----------



## petur (May 12, 2018)

Bobi B. said:


> A bit off-topic here, but are you sure you really need more than 1 Gig that much? How many, what drives, and in what configuration, you have in your FreeBSD machine? What is your target usage pattern?


It has a couple of SSDs in a zpool . The drives are shared via NFS. I can clearly feel its slow.


----------



## BSDAppentic3 (May 12, 2018)

petur said:


> It has a couple of SSDs in a zpool . The drives are shared via NFS. I can clearly feel its slow.


Hum...NFS isn't a bit old?


----------



## petur (May 12, 2018)

BSDAppentic3 said:


> Hum...NFS isn't a bit old?


That does not make it bad. What would you use over NFS and why?


----------



## BSDAppentic3 (May 12, 2018)

Right.
The problem, feel free to correct me, it's that you have a good equipment.
But you use a filesystem which have its years.
Which version of NFS are you using now? 4?
Which protocol of transference will you use to share files between your mac and FBSD, or are you using? Specify it, sorry, I'm a bit dumb.
Which is you speed network? 1GB?
Or you're trying to use THIS with NFS? ---> https://en.wikipedia.org/wiki/10_Gigabit_Ethernet


----------



## petur (May 12, 2018)

I'm using the ZFS filesystem, shared via the NFS protocol.
You are correct in that I am using NFS version 4.
My problem is that my current network equipment is 1 Gbit which limits me to a theoretical max read/write of just over 100MB/s while my drive pool can handle 10 times that speed.


----------



## BSDAppentic3 (May 12, 2018)

Which arch do you have? x64 or x32?
The card is fast, bu what motherboard do you have?
Check that: both OS can support that speed, which architecture you have, and NFS.
The equipment is fine. Is your motherboard prepared for it? Because it doesn't matter how much speed do you have if your processor cannot process it.
For example: if I have a speed of 1GB, but my processor it's x32, or my OS is from that arch, do you think that I will be able to use that speed?


----------



## petur (May 13, 2018)

BSDAppentic3 said:


> Which arch do you have? x64 or x32?
> The card is fast, bu what motherboard do you have?
> Check that: both OS can support that speed, which architecture you have, and NFS.
> The equipment is fine. Is your motherboard prepared for it? Because it doesn't matter how much speed do you have if your processor cannot process it.
> For example: if I have a speed of 1GB, but my processor it's x32, or my OS is from that arch, do you think that I will be able to use that speed?


I do not see how this is relevant to my original question.

But to answer yours: The machine can handle it. It's a fairly new Xeon workstation, as such it has a 64 bit architecture.


----------



## rigoletto@ (May 13, 2018)

NFS is far better than Samba if you do not have a Windows machine involved, and have a stable connection. The requirement of stable connection (cable) is the only downside of NFS.

There is no advantage of using NFSv4 over v3 if you do not need the new v4 features (which most people do not ever manage to make properly work).
Look at the DragonFly BSD implementation of NFSv3 and you will know why they are not ever considering to implement the v4.


----------



## rigoletto@ (May 13, 2018)

I do not have anything Thunderbolt and so I am not really aware of the latest moves, but the last news I have FreeBSD still lack the driver.

It seems the project asked Intel to write one (I do not know if Intel publish proper documentation), and as far I am concerned that driver didn't happened (yet).

However, you may want to ask at the freebsd-current mailing list about the last news, or IRC (Freenode) at #freebsd.


----------



## BSDAppentic3 (May 13, 2018)

petur So you machine host can deal with it, right. No, I was asking that, because there could be a possiblity that you were using a x32 processor, but that wasn't the case.


----------



## BSDAppentic3 (May 13, 2018)

lebarondemerde Also you think that NFS could be the problem here?


----------



## Sebastian (May 19, 2018)

I had a lot of trouble with nfs and zfs . I could only write with 30-40 MByte/s to my raid-z1 pool . I found a lot of other people who had problems with nfs and zfs . Espacially people who are runnng esx server and using nfs shares. 

These people often using ZFS ZIL to overcome this issue. I tweaked NFS a lot but I was never satisfied with my results, so I had to switch to samba. For me it works very welll. I will not go back....


----------



## Wozzeck.Live (May 19, 2018)

lebarondemerde said:


> NFS is far better than Samba if you do not have a Windows machine involved, and have a stable connection. The requirement of stable connection (cable) is the only downside of NFS.
> 
> There is no advantage of using NFSv4 over v3 if you do not need the new v4 features (which most people do not ever manage to make properly work).
> Look at the DragonFly BSD implementation of NFSv3 and you will know why they are not ever considering to implement the v4.



I don't really agree with you. NFS is not far better than CIFS
From some aspects CIFS is better (for example in the authentication process, last revision of CIFS is known to be a little more secure than NFS)

But let's be clear, NFS didn't become bad or outdated at all.
And no, CIFS is not specially attached to Microsoft Windows, this is a very common and big mistake

CIFS started many many years ago now as an opensource project lead by IBM and Microsoft, not satisfied with Sun NFS, but later Microsoft left the project and decided to implement his own commercial version of CIFS called simply Microsoft Share.

But the opensource CIFS project kept on developping under the umbrella of Samba, still under IBM patronage, keeping interoperability with Microsoft CIFS implementation.

With a lot of money, Microsoft has been able to develop his implementation faster and to offer a mature version to his customers before Samba. At this time, NFS was still the common file sharing of *nix world

So from this date everybody began to think that CIFS = MICROSOFT SHARE, what is basically wrong, and for some people
M$=crap so Samba = crap

This is a stupid syllogism very common in many Linux fanboy minds (but you are a clever and open minded guy and  I am sure you will correct yourself)

NFSv4 is interesting if one want to use acls 4 wich brings a quasi NTFS rights management very appreciated by admnistrators in big corporation in a LDAP context. The granularity is simply marvelous and an admnistrator can easily grant rights to specific  user, group with number of options. Those who play with Windows Pro know that. Some trollers on this forum will keep on telling that NTFS rights are a bu...hit...., useless, but we are speaking here of big corporation not of simple home made server. So, ok... le't be serious, and could someone explain us why *nix world developped acls4 if NTFS rights were so useless and bad ?

Linux fanboys long said that FreeBSD jail was useless...  and one day appeared docker... very funny !!!
So please, if in this forum some could stop to behave like theses stupid boys...

Anyway, since Windows 8 (or 7 ?), Windows Pro/enterprise versions have an embedded NFS client.

Personally I prefer to use Samba for some reasons :

- Samba servers processes can be jailed, not NFS at this moment. I use to jail all possible "server" processes, and I use jails as  "plugins"  I can copy to any other FreeBSD Server
The FreeBSD host is just a very basic workstation with a simple desktop as Lumina or LXDE for example to get tips on this forum. This is in fact the main reason why I haven't implemented any NFS file sharing at this moment.

- In a simple scenario, creating rights access for NFS requires to create account in FreeBSD user's database if I am not wrong... With Samba, if you don't use LDAP, you can use an independent .pdb built-in Samba users database, no need to register all the users in the FreeBSD users' list, no need to install and setup a complex MySQL or MariaDB server. So the jail is perfectly portable, and you can easily move the "plugin" on another FreeBSD system.
I find that a little more secure because network users are absolutely not registered in the FreeBSD host, and so nobody can connect directly to FreeBSD even if they use a fu... little password

- And yes I like very much NTFS rights management, as a long time experienced Windows user, and Samba can support it (as NFS)

Also NFS is still the default file sharing in *nix world, there are some *nix administrators who choose to use CIFS Samba over NFS, not only for Microsoft Windows interoperability... as said before, now Windows has an embedded NFS client, so this is no more an argument.


----------



## BSDAppentic3 (May 20, 2018)

Well, I installed HBSD using ZFS and the big problem is that I couldn't access the web via browser.
So yes, such a bad filesystem.


----------



## zirias@ (May 20, 2018)

https://blog.varonis.com/cifs-vs-smb/
See also wikipedia on SMB...

Bottom line: you want smb2 or newer, not cifs ... although some implementations still calling themselves cifs actually support newer smb versions.

This discussion is probably slightly off-topic here, you won't get around the physical network bandwidth, no matter which protocol you choose.


----------



## Oko (May 20, 2018)

petur said:


> Dear all,
> 
> I'm looking into establishing a high speed network connection between a macOS client and a FreeBSD 11.1 fileserver.
> Adding a thunderbolt 3 card, such as this one from ASUS, and simply connecting it host-to-host with a cable is an economically attractive alternative to 10gigE, as 10gigE requires expensive externally connected hardware on macOS client side.
> ...


I beg to differ. I think that the most economically attractive option is Infiniband Adapter PCI Express Card  like this one for $22.

https://www.ebay.com/p/Mellanox-Mhq...-PCI-Express-Card/1201734446?iid=123058812141

Unfortunately due to the legacy support I am stuck with 10 Gigabit copper but 40 Gigabit is no brainier if you are starting from the scratch.

https://wiki.freebsd.org/InfiniBand

Hopefully with Infiniband you should be able to get NFS rw speed close to that of the SSD drives.


----------



## Beastie7 (May 20, 2018)

Thunderbolt 2/3 to 10gigE adapters are a thing... I wouldn't bother with writing drivers for Thunderbolt cards.


----------



## petur (May 20, 2018)

Beastie7 said:


> Thunderbolt 2/3 to 10gigE adapters are a thing... I wouldn't bother with writing drivers for Thunderbolt cards.


I'm aware, also of the cost.


----------



## rigoletto@ (Jun 16, 2018)

To be in the works: Thread 66293


----------

