Solved

Unbuffered NFS on FreeBSD

Posted on 2003-12-03
4
580 Views
Last Modified: 2013-12-23
I have a process running on a Solaris 2.6 server that writes continuously to a log file. This log file is sitting on an NFS filesystem (hosted by a network application storage filer) which is mounted read-only on a FreeBSD server.

There's a process running on the FreeBSD box that's supposed to read each line as it comes in and add some information about it to a berkely DB file stored on the machine's local disk. Ideally, I'd like the entire process (writting to log -> read log -> add to database) to take a few seconds at most. It currently takes around a minute.

If I tail -f the log file on the Solaris box, I can see the writes happening live, as they happen. If I tail -f the same log file on the FreeBSD box, I see nothing new happening....then about a minute later my console gets flooded with new entries....then nothing for a minute.....then another influx of data.

I think what's happening here is somewhere, the NFS traffic is being buffered by the OS. The only mount options I'm using on the FreeBSD box in /etc/fstab for this partition is 'ro' (read-only). Is there anything else I can do to ensure that the OS itself is not buffering the incomfing NFS traffic? Any sysctl switches that I can tweak?

Thanks for any help you can provide.
0
Comment
Question by:seagu11
  • 2
  • 2
4 Comments
 

Author Comment

by:seagu11
ID: 9868880
Geez. Sorry, I meant to say the NFS server is a "Network Appliance" filer.  (Netapp). Not a Network Application filer....
Fingers went on autopilot there I guess. :)
0
 
LVL 62

Expert Comment

by:gheist
ID: 9871041
most likely you will tweak -r and -w parameters for mount_nfs and maybe noac for nfs misses new attributes, and adjust -a parameter according to your filesizes and reads - the larger -a the larger sequential preread, the worse database and small file performance.

i.e in /etc/fstab:
.. .. .. ro,-r32768,-w32768,noac,-a0
0
 
LVL 62

Accepted Solution

by:
gheist earned 125 total points
ID: 9871068
manual for mount_nfs is very handy:

BUGS
     Due to the way that Sun RPC is implemented on top of UDP (unreliable
     datagram) transport, tuning such mounts is really a black art that can
     only be expected to have limited success.      For clients mounting servers
     that are not on the same LAN cable or that tend to be overloaded, TCP
     transport is strongly recommended, but unfortunately this is restricted
     to mostly 4.4BSD servers.
0
 

Author Comment

by:seagu11
ID: 9900326
THanks for your pointers.

This actually ended up being resolved by properly synching the time between all involved servers and the filer. They weren't using the same ntp host (and some weren't doing ntp at all).

Sillyness.

Guess I was barking up the wrong tree.
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question