From: Greg Banks Date: Wed, 14 Jun 2006 12:48:10 +0000 (+1000) Subject: multiple threads for mountd X-Git-Tag: nfs-utils-1-0-9-pre1~9 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=11d34d11153df198103a57291937ea9ff8b7356e;hp=11d34d11153df198103a57291937ea9ff8b7356e multiple threads for mountd 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. ---