linux/net/sunrpc
Greg Banks 7b2b1fee30 [PATCH] knfsd: knfsd: cache ipmap per TCP socket
Speed up high call-rate workloads by caching the struct ip_map for the peer on
the connected struct svc_sock instead of looking it up in the ip_map cache
hashtable on every call.  This helps workloads using AUTH_SYS authentication
over TCP.

Testing was on a 4 CPU 4 NIC Altix using 4 IRIX clients, each with 16
synthetic client threads simulating an rsync (i.e.  recursive directory
listing) workload reading from an i386 RH9 install image (161480 regular files
in 10841 directories) on the server.  That tree is small enough to fill in the
server's RAM so no disk traffic was involved.  This setup gives a sustained
call rate in excess of 60000 calls/sec before being CPU-bound on the server.

Profiling showed strcmp(), called from ip_map_match(), was taking 4.8% of each
CPU, and ip_map_lookup() was taking 2.9%.  This patch drops both contribution
into the profile noise.

Note that the above result overstates this value of this patch for most
workloads.  The synthetic clients are all using separate IP addresses, so
there are 64 entries in the ip_map cache hash.  Because the kernel measured
contained the bug fixed in commit

commit 1f1e030bf7

and was running on 64bit little-endian machine, probably all of those 64
entries were on a single chain, thus increasing the cost of ip_map_lookup().

With a modern kernel you would need more clients to see the same amount of
performance improvement.  This patch has helped to scale knfsd to handle a
deployment with 2000 NFS clients.

Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 07:55:16 -07:00
..
auth_gss [PATCH] knfsd: Replace two page lists in struct svc_rqst with one 2006-10-04 07:55:15 -07:00
auth_null.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
auth_unix.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
auth.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
cache.c [PATCH] knfsd: fix race related problem when adding items to and svcrpc auth cache 2006-08-06 08:57:47 -07:00
clnt.c [PATCH] namespaces: utsname: switch to using uts namespaces 2006-10-02 07:57:21 -07:00
Makefile [PATCH] RPC: introduce client-side transport switch 2005-09-23 12:38:12 -04:00
pmap_clnt.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
rpc_pipe.c [PATCH] r/o bind mount prepwork: inc_nlink() helper 2006-10-01 00:39:30 -07:00
sched.c [PATCH] Really ignore kmem_cache_destroy return value 2006-09-27 08:26:10 -07:00
socklib.c [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE 2006-09-22 14:53:53 -07:00
stats.c [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
sunrpc_syms.c [PATCH] knfsd: add svc_set_num_threads 2006-10-02 07:57:19 -07:00
svc.c [PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP 2006-10-04 07:55:16 -07:00
svcauth_unix.c [PATCH] knfsd: knfsd: cache ipmap per TCP socket 2006-10-04 07:55:16 -07:00
svcauth.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
svcsock.c [PATCH] knfsd: knfsd: cache ipmap per TCP socket 2006-10-04 07:55:16 -07:00
sysctl.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
timer.c SUNRPC: remove extraneous header inclusions 2006-09-22 23:24:47 -04:00
xdr.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
xprt.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00
xprtsock.c [SUNRPC]: trivial endianness annotations 2006-09-28 18:01:21 -07:00