Re: samdb and the session info On Thu, 2007-07-05 at 11:07 +1000, tridge@samba.org wrote:
> Andrew and Simo,
> 
> I've been looking into memory usage in Samba4. When we first got the
> single process model I had measured memory usage of about 15k-20k per
> connection (as seen with vmstat and BASE-BENCH-HOLDCON).
> 
> A test on the current code shows 312k per connection. Approximately
> 90% of this is due to samdb_connect().
> 
> By making a small (hackish) patch to samdb_connect() to use a shared
> ldb with talloc_reference(), I found that memory usage dropped to 26k
> per connection, which is not too much bloat over what we had before
> considering the new features. It also halved the time it takes to
> establish 1000 connections, and I expect it will greatly speed up many
> other operations (as much more memory will be in level 1 cache).

Perhaps this patch would work?  We keep the current session_info
semantics, but share the rest.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.                  http://redhat.com

