NFS Share on Windows... Kick the CIFS habit!

Status
Not open for further replies.

RjBradlow

Cadet
Joined
Oct 22, 2013
Messages
8
Windows systems can connect to NFS shares using Services for NFS. Connecting to NFS shares is often faster than connecting to CIFS shares due to the single-threaded limitation of Samba.
~TRUE.~ RjB

NOTE: Services for NFS is only available in the Ultimate or Enterprise editions of Windows. ~FALSE ! Windows XP had NFS support and Windows 7 comes with NFS support but deactivated. ~ RjB
Source: http://doc.freenas.org/index.php/Unix_(NFS)_Shares#From_Microsoft_Clients

Mount Linux NFS Share on Windows 7
http://www.hackourlife.com/mount-linux-nfs-share-on-windows-7/

Additional info:
How to install Client for NFS on Windows for a UNIX-to-Windows migration
http://support.microsoft.com/kb/324055
NFS client for Windows 7 (Microsoft Community)
http://answers.microsoft.com/en-us/...indows-7/42aae25d-d077-4ff9-abdf-7314a589c46d
Utilities and SDK for Subsystem for UNIX-based Applications in Microsoft Windows 7 and Windows Server 2008 R2
http://www.microsoft.com/en-us/download/details.aspx?id=2391
Google: ' Client for NFS ' ... for more info.
 

N00b

Explorer
Joined
May 31, 2013
Messages
83
Thanks for this information Robert. Could you also share how much of a boost you saw with the NFS client over the CIFS one? I tried earlier and for me the windows share was faster. That was with the 8.x setup. I will try it out with the 9.1 set up that is giving me poor rates. Thanks for the idea. Appreciate it.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
NFS has the potential to provide better speeds where transfer rates from the server are limited by CPU power. (Edited the red text. I originally said CIFS and I meant NFS)

NFS, from what I've read, isn't supported on Apple. CIFS seems to be a pretty good "happy medium" as it seems to be the most widely used and most supported across all platforms. So for people that aren't CPU limited, there really isn't much to gain from redesigning your server. Especially so if you have a large number of shares already setup(I have more than 30).

Some of your links(like the kb article 324055 doesn't apply to ANY OS that is XP or newer. So you might want to actually read your links before you post them. ;)

As for the NFS client, I noticed a few days ago that the NFS services are available on my laptop with Windows 7 Home Premium. But I'm confused as to where the manual got its note. I was thinking about updating the manual after I verify that NFS does work properly between Windows 7 Home Premium and FreeNAS.
 

RjBradlow

Cadet
Joined
Oct 22, 2013
Messages
8
CIFS has the potential to provide better speeds where transfer rates from the server are limited by CPU power.

NFS, from what I've read, isn't supported on Apple. CIFS seems to be a pretty good "happy medium" as it seems to be the most widely used and most supported across all platforms. So for people that aren't CPU limited, there really isn't much to gain from redesigning your server. Especially so if you have a large number of shares already setup(I have more than 30).
Sorry but NFS is Native to all *NIX OS' (Unices) ... and Mac OS X is based on what?
Unix (NFS) Shares / From Mac OS X Clients (FreeNAS article - Top)
http://doc.freenas.org/index.php/Unix_(NFS)_Shares#From_Mac_OS_X_Clients
Mac OS X: Using the Finder to Mount NFS Exports:
http://support.apple.com/kb/ta22243
"Not quite. NFS is the native networking system of MacOS X. Both Samba and AFP are add-ons." ... 2nd post here:
https://discussions.apple.com/thread/2501758?start=0&tstart=0

Some of your links(like the kb article 324055 doesn't apply to ANY OS that is XP or newer. So you might want to actually read your links before you post them. ;)
Per the link you refer to:
6. If you are using either Windows 2000 and Windows XP, you do not have to restart the computer.
NOTES: (bottom note):
"When you install Microsoft Windows Services for UNIX 3.5 on a Microsoft Windows Server 2003 Service Pack 1 (SP1)-based or Microsoft Windows XP-based computer"
The other link is a reference link to what Marilyn (a Microsoft Answers Support Engineer) attempted to post 2x in reply but finally corrected further down in the community forum linked above it.
I threw it in for 'extra info' in case somebody eh-hem didn't read the previous community forum link all the way down... And for those with more technical abilities & needs.
As the article suggests they are:
"Utilities and SDK for Subsystem for UNIX-Based Applications is an add-on to the Subsystem for UNIX-Based Applications (referred to as SUA, hence forth) feature that ships in Microsoft Windows 7/ Windows Server 2008 R2."
As for the NFS client, I noticed a few days ago that the NFS services are available on my laptop with Windows 7 Home Premium. But I'm confused as to where the manual got its note. I was thinking about updating the manual after I verify that NFS does work properly between Windows 7 Home Premium and FreeNAS.
"NFS is by far the fastest at ~73Mb/sec!"
"Almost but not quite last is our beloved/hated SMB using SMBfs: @ 20.7811Mb/sec"
NOTE: These are WiFi transfer speeds !
NFS vs SMB vs FTP vs SSH speed test results
(http://wdtvforum.com/main/index.php?topic=5393.0)


SMB (Samba) Vs NFS XBMC File Transfer Test In Openelec
View: http://www.youtube.com/watch?v=O6U1J7mlJiQ


Blessings to you Sir cyberjock.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Sorry but NFS is Native to all *NIX OS' (Unices) ... and Mac OS X is based on what?
Unix (NFS) Shares / From Mac OS X Clients (FreeNAS article - Top)
http://doc.freenas.org/index.php/Unix_(NFS)_Shares#From_Mac_OS_X_Clients
Mac OS X: Using the Finder to Mount NFS Exports:
http://support.apple.com/kb/ta22243
"Not quite. NFS is the native networking system of MacOS X. Both Samba and AFP are add-ons." ... 2nd post here:
https://discussions.apple.com/thread/2501758?start=0&tstart=0

Notice that I said "from what I've read". I've never owned a Mac(at least, not in the last 15 years) so all I have to go on is what people say here, and a few have said there was no NFS support. Somewhat interesting because they also said that time machine works best with AFP and most said that Time Machine didn't work "quite right" on CIFS despite others saying it works fine.

I just read the Mac threads and recognize that I'm glad I don't have one myself. ;)


Per the link you refer to:
6. If you are using either Windows 2000 and Windows XP, you do not have to restart the computer.
NOTES: (bottom note):
"When you install Microsoft Windows Services for UNIX 3.5 on a Microsoft Windows Server 2003 Service Pack 1 (SP1)-based or Microsoft Windows XP-based computer"
The other link is a reference link to what Marilyn (a Microsoft Answers Support Engineer) attempted to post 2x in reply but finally corrected further down in the community forum linked above it.
I threw it in for 'extra info' in case somebody eh-hem didn't read the previous community forum link all the way down... And for those with more technical abilities & needs.
As the article suggests they are:
"Utilities and SDK for Subsystem for UNIX-Based Applications is an add-on to the Subsystem for UNIX-Based Applications (referred to as SUA, hence forth) feature that ships in Microsoft Windows 7/ Windows Server 2008 R2."

"NFS is by far the fastest at ~73Mb/sec!"
"Almost but not quite last is our beloved/hated SMB using SMBfs: @ 20.7811Mb/sec"
NOTE: These are WiFi transfer speeds !
NFS vs SMB vs FTP vs SSH speed test results
(http://wdtvforum.com/main/index.php?topic=5393.0)

Speed isn't everything though. A lot of software won't behave with NFS shares, a lot of backup software won't let you backup to an NFS share, and a lot of people don't know how to use NFS. Me personally, I can do 120MB/sec over CIFS here to all of my desktops, so there's little to be gained speed-wise with CIFS. CIFS does have some internal encryption with the data packets(could be a positive) but I'm unsure of NFS(I haven't searched for it yet). So I still think its one of those "has potential" situations. If I had an Intel Atom I can bet money I wouldn't saturate 1Gb links, but NFS might not help enough to matter either.

It's really a mixed bag and people could easily argue either way. I'm going to be playing with NFS this weekend so I'll see how that goes. I'll probably stick with CIFS even after I finish the testing because I am unaware of any reason why NFS is superior to CIFS when I'm already saturating Gb. If you know of any I'm definitely all ears. I'm pretty green with NFS because I wrongly thought that NFS was a Win7 Ultimate only feature because of the FreeNAS manual comment.

Edit: Hey look..a thread where someone said that AFP is required for Time Machine... http://forums.freenas.org/threads/mavericks-time-machine-smb2.15812/
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'd say "not likely" as ZFS' caching has a MUCH more significant affect on performance than NFS/CIFS/AFP/whatever-else-you-want-to-try has for a cache. None of them have much more than a very basic cache and rely on your file system's cache to give the performance benefits people want. I've done a lot of reading on NFS the last week or so, and I haven't found much of anything discussing caching of NFS.

I'd expect that protocol caching is pretty insignificant in the big picture. If NFS tried to do extensive caching of its own it would compete with ZFS(which would hurt its performance) and make NFS not able to scale to 100s or 1000s of users on a single server. Imagine the RAM needs if every user got just 100MB of cache. Suddenly you need 1GB just for 10 users and 10GB for 100 users. That's before you include ZFS's cache or any needs from other services on the server. Just a quick google search shows that NFS may have some rudimentary caching of file names and permissions and that's it.. in NFSv4. Possibly limited to 64kbytes per user. Of course, FreeNAS uses NFSv3 right now, so I wouldn't expect NFSv3 to have more, but could definitely have less.

The main reason for going with NFS over CIFS is for the lower CPU overhead. It's no secret that CIFS is pretty CPU intensive, and a single user is limited to a single thread. So something like an Intel Atom will be heavily limited with CIFS. With NFS, there's a significant chance of having major performance gains. That is, of course, assuming that ZFS' overhead isn't so significant to limit the pool's overall performance. But if you are a regular reader of the forums, Atoms really don't make good choices for primary servers. As backup server though, they definitely have their place because most people aren't too concerned with performance when doing a backup. The soon-to-be-released Atoms appear to provide enough performance to make this far less of a problem as one user has proven for us.

So I think the answer to your question is "no".
 

RjBradlow

Cadet
Joined
Oct 22, 2013
Messages
8
I will not go into detail, for the best path of learning is hands-on trial and error.
Many have travelled the same path before you, So I will link their stories and the Reference Manuals for you instead of regurgitating it here.
If after you have digested what is below and still find yourself pickled; then please update here with your findings and then maybe we can pick apart the trouble.
But I have a feeling that you will find the answer(s) you seek in the links below.

Blessings :)

I tried to use NFS on Win a week or two ago: http://forums.freenas.org/threads/cant-get-nfs-to-work-windows-7-ultimate.15659/
Any ideas why it doesn't work?
The FreeNAS docs explain that NFS can have better performance than CIFS, and gives directions for installing 3rd party NFS solutions on versions of Windows that don't support it directly. I want to take advantage of that, so I enabled NFS (supported by "Ultimate") and indeed connected to the FreeNAS box.

>>> But, although I can browse the directories and see the file names, all files give errors that they are locked by some other process, and can't be read. <<<

I tried turning off the Samba service completely in case there were some residual effects. It did not make a difference.

Now this shouldn't be any harder than serving NFS on one end and using NFS on the other, and the docs don't mention any other funny business. The permissions are OK since it worked on CIFS for the same directory, and the error doesn't indicate that it's a permissions problem. But I wonder if it still might be, and Windows doesn't interpret the error correctly? Do NFS shares have some access rules supplied directly onto the share, or interpret things differently than Samba might, or anything?

—John

Permissions NFS4 ACL or Mount / Export Problem ... You are not authorized to read or write either because the file permissions are not set correctly or the share was not mounted r+w or exported correctly.
*nix security is quite different than Windows in many ways.

Since NFS security has been pretty lax until 4.0 let's start with how the NFS share is Exported.
For a client to have access to an exported file system, the client must be listed in /etc/exports.

http://www.defcon1.org/html/nfs.html
http://www.freebsd.org/doc/handbook/network-nfs.html
http://www.freebsd.org/cgi/man.cgi?query=nfsv4&sektion=4

Permissions Confusion:
http://forums.freenas.org/threads/weird-nfs-permissions-problem.4996/

NFSv4 Issues:
https://forums.freebsd.org/showthread.php?p=235924

EDIT:
Start at bottom of page 140: 7.2 Unix (NFS) Shares
http://www.freenas.org/images/resources/freenas9.1.1/freenas9.1.1_guide.pdf
Page 142:
When creating the NFS share, keep the following points in mind:
1. The Maproot and Mapall options are exclusive, meaning you can only use one or the other--the
GUI will not let you use both. The Mapall options supersede the Maproot options. If you only
wish to restrict the root user's permissions, set the Maproot option. If you wish to restrict the
permissions of all users, set the Mapall option.
2. Each volume or dataset is considered to be its own filesystem and NFS is not able to cross
filesystem boundaries.
3. The network or host must be unique per share and per filesystem or directory.
4. The "All directories" option can only be used once per share per filesystem.
~~~
Page 143:
7.2.2
Sample NFS Share Configuration
By default the Mapall options shown in Figure 7.2a show as N/A. This means that when a user connects
to the NFS share, they connect with the permissions associated with their user account. This is a
security risk if a user is able to connect as root as they will have complete access to the share.
A better scenario is to do the following:
1. Specify the built-in nobody account to be used for NFS access.
2. In the permissions of the volume/dataset that is being shared, change the owner and group to
nobody and set the permissions according to your specifications.
3. Select nobody in the Mapall User and Mapall Group drop-down menus for the share in Sharing
→ Unix (NFS) Shares.
With this configuration, it does not matter which user account connects to the NFS share, as it will be
mapped to the nobody user account and will only have the permissions that you specified on the
volume/dataset. For example, even if the root user is able to connect, it will not gain root access to the
share.
~~~
 

Nomad

Contributor
Joined
Oct 14, 2013
Messages
125
I can't believe I forgot about this... I run tons of NFS shares at work and have to enable NFS on all my Windows VM's and it just didn't click.

Going to create a NFS share and post some benches for everyone. Note, My HTPC is the bottle neck, I can push 100+ between two faster systems, but performance to me is based on HTPC <-->Plex Nas.
 

Nomad

Contributor
Joined
Oct 14, 2013
Messages
125
I can't believe I forgot about this... I run tons of NFS shares at work and have to enable NFS on all my Windows VM's and it just didn't click.

Going to create a NFS share and post some benches for everyone. Note, My HTPC is the bottle neck, I can push 100+ between two faster systems, but performance to me is based on HTPC <-->Plex Nas.


Soo... CIFS HTPC --> NAS 115MB
NFS? 28 :(
 

RjBradlow

Cadet
Joined
Oct 22, 2013
Messages
8
I was hoping that the OP, RjBradlow, would chime in.

My interest is in finding out if it handles client-side cashing better.

Soo... CIFS HTPC --> NAS 115MB
NFS? 28 :(
Cache file system

You can use the Cache file system, or CacheFS, to enhance performance of remote file systems, like NFS, or slow devices such as CD-ROM.
An example of where CacheFS is suitable is in a CAD environment where master copies of drawing components can be held on the server and cached copies on the client workstation when in use.
CacheFS does not allow reads and writes on files that are 2 GB or larger in size.
http://publib.boulder.ibm.com/infoc...om.ibm.aix.prftungd/doc/prftungd/cache_fs.htm
----
NFS tuning on the client
----
ZFS cash flush Disable:
Interesting FreeBSD discussion: ZFS + NFS performance improve by disabling zfs.cache_flush_disable?
_______________________________________________________________
NFS tuning

https://wiki.freebsd.org/ZFSTuningGuide#NFS_tuning


The combination of ZFS and NFS stresses the ZIL to the point that performance falls significantly below expected levels. The best solution is to put the ZIL on a fast SSD (or a pair of SSDs in a mirror, for added redundancy). The next best solution is to disable ZIL ~...
In latest ZFS (version 28) the vfs.zfs.zil_disable loader tunable was replaced with the "sync" dataset property. You can now enable/disable ZIL on a per-dataset basis.
  • zfs set sync=disabled tank/dataset
Disabling ZIL is not recommended where data consistency is required (such as database servers) but will not result in file system corruption. See http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide#Disabling_the_ZIL_.28Don.27t.29.
ZFS is designed to be used with "raw" drives - i.e. not over already created hardware RAID volumes (this is sometimes called "JBOD" or "passthrough" mode when used with RAID controllers), but can benefit greatly from good and fast controllers.

_______________________________________________________________

WAN Caching whitepaper / Good read: https://www.usenix.org/legacy/event/fast07/tech/full_papers/gulati/gulati_html/nache.html
Nache: Design and Implementation of a Caching Proxy for NFSv4
In this paper, we present Nache, a caching proxy for NFSv4 that enables a consistent cache of a remote NFS server to be maintained and shared across multiple local NFS clients. Nache leverages the features of NFSv4 to improve the performance of file accesses in a wide-area distributed setting by bringing the data closer to the client.
_______________________________________________________________

Tuning Nightmare... (Threw this in for it's Entertainment value... pun intended)
On the Massive Entertainment side of Rendering Farms (Renderwall): 4,352 nodes with 24GB RAM ea. on 742 commodity servers using NFS:
Storage Performance Management at Weta Digital

Conference:
LISA '10
Matt Provost, Weta Digital
Presentation Video (1:18:33)

https://www.usenix.org/conference/lisa10/storage-performance-management-weta-digital
Weta Digital has had to deal with enormous growth in storage from The Fellowship of the Ring through to Avatar. In this talk Matt will outline some of the problems with NFS storage the company has faced over the years and the solutions they have developed. This will include the design and evolution of DSMS, the system Weta uses to provide a global namespace, unifying multiple heterogeneous file servers and file systems. He will also cover NFS performance monitoring, management, and troubleshooting in a high-performance computing cluster environment and the challenges these present at a large scale.
http://www.usenix.org/events/lisa10/tech/slides/provost.pdf
 

Nomad

Contributor
Joined
Oct 14, 2013
Messages
125
,I tried two testS,
one was about 1500 files 1.5 gig in total

second was 3 files 1.5 gigs in total

same performance
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Nomad,

Your system is sufficiently powerful that you aren't limiting CIFS speeds by your CPU speed. To quote what I said above...

The main reason for going with NFS over CIFS is for the lower CPU overhead. It's no secret that CIFS is pretty CPU intensive, and a single user is limited to a single thread. So something like an Intel Atom will be heavily limited with CIFS. With NFS, there's a significant chance of having major performance gains. That is, of course, assuming that ZFS' overhead isn't so significant to limit the pool's overall performance. But if you are a regular reader of the forums, Atoms really don't make good choices for primary servers. As backup server though, they definitely have their place because most people aren't too concerned with performance when doing a backup.

You aren't really in a position where NFS would be expected to provide major gains. ;)
 

John M. Długosz

Contributor
Joined
Sep 22, 2013
Messages
160
I'd say "not likely" as ZFS' caching has a MUCH more significant affect on performance than NFS/CIFS/AFP/whatever-else-you-want-to-try has for a cache.

I'm referring to the operating system's cache for files it's already read. When the compiler opens a .h file hundreds of times in the course of a build, it doesn't hit the disk. But if it's a mapped network drive, then it does hit the network, every single time. Windows disables the file cache for networked drives. I'm wondering if NFS shares would act smarter, or have some options I can use for the purpose.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Uhh.. the "operating system's cache" IS "ZFS's cache". That's the ONLY cache you have from a disk/pool standpoint.
 

Nomad

Contributor
Joined
Oct 14, 2013
Messages
125
it wasn't expecting any Gainsbut I didn't expect ThatMuch Loss

Nomad,

Your system is sufficiently powerful that you aren't limiting CIFS speeds by your CPU speed. To quote what I said above...



You aren't really in a position where NFS would be expected to provide major gains. ;)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
From what I've read about people that know NFS inside and out NFS works well for certain scenarios, but has very very low CPU usage. CIFS works well for a much wider range of scenarios, but has far higher CPU usage needs.

Of course each have the ability to be tuned to a degree. Given enough time, patience, and reading, you can make NFS work well for your exact situation. But it doesn't look like most people will figure it out in short order. Especially new users to FreeNAS.

It's kind of a "try it if you want" type of thing. Which is why my first post said that it "has potential". And of course I just noticed that I wrote CIFS has potential when I meant NFS has potential. :/

I'd say for the vast majority of users that have a system that isn't very low powered CIFS is probably the better way to go. If you are using a system with a "Green" CPU like an AMD e350 or an Intel Atom(excluding the new generation about to hit the market) then you should at least give NFS a try. You never know what you're going to get. If I were a betting man I'd expect that the e350 and Atom will probably do better with NFS. But again, you have potential RAM limits(Atoms are sometimes 8GB, otherwise they are 4GB) which isn't exactly going to give you great ZFS performance.
 
Status
Not open for further replies.
Top