]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
multiple threads for mountd
authorGreg Banks <gnb@melbourne.sgi.com>
Wed, 14 Jun 2006 12:48:10 +0000 (22:48 +1000)
committerNeil Brown <neilb@suse.de>
Fri, 16 Jun 2006 03:41:32 +0000 (13:41 +1000)
How about the attached patch against nfs-utils tot?  It
adds a -t option to set the number of forked workers.
Default is 1 thread, i.e. the old behaviour.

I've verified that showmount -e, the Ogata mount client,
and a real mount from Linux and IRIX boxes work with and
without the new option.

I've verified that you can manually kill any of the workers
without the portmap registration going away, that killing
all the workers causes the manager process to wake up and
unregister, and killing the manager process causes the
workers to be killed and portmap unregistered.

I've verified that all the workers have file descriptors
for the udp socket and the tcp rendezvous socket, that
connections are balanced across all the workers if service
times are sufficiently long, and that performance is
improved by that parallelism, at least for small numbers
of threads.  For example, with 60 parallel MOUNT calls
and a testing patch to make DNS lookups take 100 milliseconds
time to perform all mounts (averaged over 5 runs) is:

num elapsed
threads time (sec)
 ------ ----------
1 13.125
2   6.859
3  4.836
4    3.841
5  3.303
6  3.100
7  3.078
8  3.018

Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


No differences found