Solved

Unbuffered NFS on FreeBSD

Posted on 2003-12-03
4
568 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 61

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 61

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Let’s list some of the technologies that enable smooth teleworking. 
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now