Solved

Unbuffered NFS on FreeBSD

Posted on 2003-12-03
4
563 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The DSL Parameters part of this article is valid and can be considered with any brand of internet router and modem (Dlink, 3com, Alcatel, Usrobotics, Parks), by accessing the configuration interface available by the manufacturer eg: http://10.1.1.1 …
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

763 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

7 Experts available now in Live!

Get 1:1 Help Now