lists.arthurdejong.org
RSS feed

Re: Virtual memory usage by nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: Virtual memory usage by nslcd



On Fri, 2018-11-02 at 16:20 +0530, Deepak Kodihalli wrote:
> I have plans of using nslcd on a Baseboard management controller
> with about 128MB RAM. If nslcd suitable for systems with such small
> RAMs?

The memory use of nslcd should be pretty constant. The memory use
mostly consists of:
- communication buffers
- LDAP connection structures
- buffers for converting results and queries

I haven't looked into memory profiling of nslcd in a long time and I'm
unsure of the memory usage of dependent libraries (OpenLDAP and an SSL
library mostly).

> I've noticed that the steady VSZ usage by nslcd is about 47-48 MB.
> Does that sound right? Are there build-time/run-time config options
> to cut down on this?

The runtime memory use can probably be decreased by reducing the number
of threads. By default 5 threads are started. Each thread has its own
LDAP connection, buffers for I/O and stack (the parsing buffers are
mostly located on the stack).

My guess would be that the communication buffers can get the biggest
component. The buffer sizes can be tuned in the source code in
  common/nslcd-prot.c: for the NSS and PAM modules
  nslcd/nslcd.c: for nslcd
The settings to tweak are probably READBUFFER_MAXSIZE and
WRITEBUFFER_MAXSIZE (sizes are in bytes)

-- 
-- arthur - arthur@arthurdejong.org - https://arthurdejong.org/ --

-- 
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/nss-pam-ldapd-users/