LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do you determine the number of NFS instances to start? (https://www.linuxquestions.org/questions/linux-networking-3/how-do-you-determine-the-number-of-nfs-instances-to-start-204569/)

BrianK 07-13-2004 12:41 PM

How do you determine the number of NFS instances to start?
 
I've got one file server serving up files to 14 machines that often run two disk-writing processes at a time (Hyper Threaded, so they think they are all dual procs).

Should I start up 28 instances of nfs? That seems like a lot. Is there any disadvantage to starting up too many?

LinuxRam 10-24-2004 03:54 PM

@BrianK


How can u start 28 instance or nfs ?

-Akshat

BrianK 10-24-2004 07:40 PM

Quote:

Originally posted by akshatyadav
@BrianK


How can u start 28 instance or nfs ?

-Akshat

in your nfs startup script, there is a variable you can set that determines the number of servers to be started.. it looks like this:

Code:

# Number of servers to be started by default
[ -z "$RPCNFSDCOUNT" ] && RPCNFSDCOUNT=22

under redhat (and several other distros), it's in /etc/rc.d.init.d/nfs

LinuxRam 10-24-2004 11:20 PM

thanx,
-so did u faced any problem while starting 28 instance.

-how u enabled only two disk writing process at a time.

-by default in my distibution 8 instance has been started
so plz tell me what is the benefit of starting more instance

-And suppose two people simultaneously open a same file
and edited some info, then whose saved info will be considered, i think
the person who saved lastly will be considered, could u tell me what
u think.


Akshat

ugge 10-25-2004 09:12 AM

http://www.tldp.org/HOWTO/NFS-HOWTO/index.html
http://www.phase-one.com.au/articles/nfslock.html

Two good documents about NFS and NFS file locking.

BrianK 10-25-2004 02:08 PM

Quote:

Originally posted by akshatyadav
thanx,
-so did u faced any problem while starting 28 instance.

No problems. NFS actually does spawn real threads & it's coded quite well, so each thread requires little to no overhead both in memory footprint and cpu time.
Quote:

-how u enabled only two disk writing process at a time.
Don't know if I understand your question, but I believe you're worried about two people trying to write to the same file at the same time. This should not be an issue as nfs has a system for file locking.
Quote:

-by default in my distibution 8 instance has been started
so plz tell me what is the benefit of starting more instance

The number of instances you start depends on the number of machines that will be read/writing at the same time. 8 is an arbitrary number that was choosen by the nfs lords (the way I understand it anyway) and carries no real significance. At my facility, it is not uncommon for 20+ process to be writing to the server at the same time. If this is the case, I would prefer to have each instance actually able to write as opposed to waiting for an open thread to process the request. It is lso not uncommon for me to top the file server & see most of those threads up at the top under a heavy read/write.
Quote:


-And suppose two people simultaneously open a same file
and edited some info, then whose saved info will be considered, i think
the person who saved lastly will be considered, could u tell me what
u think.

Like ugge posted, nfs contains a system for file locking, so this should not be a concern. The more recent distribs contain versions of nfs that operate in sync mode by default - this gives you one extra level of protection against reading/writing a file that someone else is using, but even in async mode, it's pretty good about locking.

emailssent 10-26-2004 05:23 AM

Thank you very much BrianK for such usefull info!


jack


All times are GMT -5. The time now is 05:31 AM.