diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-09-08 15:50:28 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-09-08 22:41:47 +0200 |
commit | bc6a18e9465f0dc92a58453d9435b3b060dcb117 (patch) | |
tree | 5fa3e12025a6ba35ecce9bf8df21a0f6d4a86a9f | |
parent | 58d50bf0b3c3d0a29941eb5473a9b3cfbb7d6f35 (diff) |
Use larger nslcd send buffers
By using bigger write buffers in nslcd we reduce the number of writes in
nslcd and consequently the number of reads in the NSS and PAM modules
for bigger responses.
This reduces the number of system calls that are made during a request
and brings a small performance improvement that is mainly measurable in
the NSS module. A measurement showed 30-80% reduction in the number of
system calls in the NSS module and around 10% reduction in CPU usage
(CPU time, only small reduction in wallclock time).
Thanks John Sullivan for pointing this out.
-rw-r--r-- | nslcd/nslcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c index ab2e2cb..afd54cf 100644 --- a/nslcd/nslcd.c +++ b/nslcd/nslcd.c @@ -75,7 +75,7 @@ /* buffer sizes for I/O */ #define READBUFFER_MINSIZE 32 #define READBUFFER_MAXSIZE 64 -#define WRITEBUFFER_MINSIZE 64 +#define WRITEBUFFER_MINSIZE 1024 #define WRITEBUFFER_MAXSIZE 1 * 1024 * 1024 /* flag to indicate if we are in debugging mode */ |