Hello, LDAP Samba processes consume a lot of memory. Each LDAP process loads the entire ldb database into memory and does not release it over time. For example, for a 4GB ldb database and 4 LDAP processes, Samba will use up more than 16 GB of RAM. If only 16GB of RAM is installed on the server, then Samba will respond to requests with long delays. Some requests will not be answered (by time-out). As I understood from the ldb documentation, Samba should load only one copy of the database into RAM for all processes.
I run samba DCs for about 300 users in VMs with 512Mb of ram and they run fine 50% free ram. I wonder how you came out with a 4GB ldb database. On 22 Aug 2024 at 09:28 +0200, Dinar Yulm via samba <samba at lists.samba.org>, wrote:> Hello, > > LDAP Samba processes consume a lot of memory. Each LDAP process loads the > entire ldb database into memory and does not release it over time. For > example, for a 4GB ldb database and 4 LDAP processes, Samba will use up > more than 16 GB of RAM. If only 16GB of RAM is installed on the server, > then Samba will respond to requests with long delays. Some requests will not > be answered (by time-out). > > As I understood from the ldb documentation, Samba should load only one copy > of the database into RAM for all processes. > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba
On Thu, 22 Aug 2024 12:26:50 +0500 Dinar Yulm via samba <samba at lists.samba.org> wrote:> Hello, > > LDAP Samba processes consume a lot of memory. Each LDAP process loads > the entire ldb database into memory and does not release it over > time. For example, for a 4GB ldb database and 4 LDAP processes, Samba > will use up more than 16 GB of RAM. If only 16GB of RAM is installed > on the server, then Samba will respond to requests with long delays. > Some requests will not be answered (by time-out). > > As I understood from the ldb documentation, Samba should load only > one copy of the database into RAM for all processes.What do you mean by 'LDAP Samba processes' ? What are the actual commands that you are running ? What OS is this ? I ask this because if ask a DC in my domain, it isn't doing what you say is happening to you. Rowland
On 22/08/24 19:26, Dinar Yulm via samba wrote:> Hello, > > LDAP Samba processes consume a lot of memory. Each LDAP process loads the > entire ldb database into memory and does not release it over time. For > example, for a 4GB ldb database and 4 LDAP processes, Samba will use up > more than 16 GB of RAM. If only 16GB of RAM is installed on the server, > then Samba will respond to requests with long delays. Some requests will not > be answered (by time-out).This is not expected. It is hard to say what the problem is without detail such as the Samba version, what kind of database ldb is using (tdb or lmdb), the size of the domain, the number of active users, and the extent to which memory usage gets worse over time. Do you know why your database is 4GB? Douglas