1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/python/samba
Aaron Haslett 961f07fb76 rpc samr: EnumDomainUsers perf improvement
EnumDomainUsers currently takes too long, significantly slowing down
calls to winbind's getpwent which is a core unix API. The time is taken
up by a GUID lookup for every record in the cached result. The advantages
of this approach are:
1. It meets the specified requirement that if a record yet to be returned
	by a search in progress (with a resume handle) is deleted or
	modified, the future returned results correctly reflect the
	new changes.
2. Memory footprint for a search in progress is only 16 bytes per record.

But, those benefits are not worth the significant performance hit
of the lookups, so this patch changes the function to run the search
and cache the RIDs and names of all records matching the search when
the request is made. This makes the memory footprint around 200 bytes
per record or up to 2MB per concurrent search for a 100k user database.
The speedup achieved by this change is around 50%, and in tandem with
some winbindd improvements as part of the same task has achieved around
15x speedup for getpwent.

The lost specification compliance is unlikely to cause a problem for any
known usage of this RPC call.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-08-30 07:08:36 +00:00
..
emulate traffic_replay: Avoid DB full scans in LDAP searches 2019-07-24 02:24:27 +00:00
gp_parse gp_inf: Read/write files with a UTF-16LE BOM in GptTmpl.inf 2019-07-19 02:20:47 +00:00
kcc python/kcc lib: cope with differently formed repsToFrom 2019-01-19 19:21:20 +01:00
netcmd python: use os.urandom, which is available in python by definition 2019-08-22 12:28:30 +00:00
provision s4-dns: Deprecate BIND9_FLATFILE and remove "rndc command" 2019-08-22 21:24:00 +00:00
samba3 python/samba3: import passdb in the manner it is used 2018-11-01 05:08:14 +01:00
subunit subunit/run.py: change shebang to python3 2019-03-07 13:03:56 +00:00
tests rpc samr: EnumDomainUsers perf improvement 2019-08-30 07:08:36 +00:00
__init__.py python/samba: ignore encoding errors while reading files 2019-04-03 11:33:38 +00:00
colour.py python/colour: add colourizing and switch functions 2018-05-31 01:57:17 +02:00
common.py python: avoid useless work in dsdb_Dn.__cmp__ 2018-11-01 05:08:12 +01:00
compat.py python/samba: fix default params for PY3 ConfigParser 2018-12-10 10:38:22 +01:00
dbchecker.py dbcheck: fallback to the default tombstoneLifetime of 180 days 2019-05-28 08:32:09 +00:00
descriptor.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
dnsserver.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
domain_update.py python/domain_update: remove unused imports 2018-10-25 21:45:53 +02:00
drs_utils.py drs_utils: Avoid invalid dereference of v8 requests 2018-11-06 07:15:33 +01:00
forest_update.py python/forest_update: remove unused imports 2018-10-25 21:45:53 +02:00
getopt.py python getopt: Add bytes option type 2019-07-02 02:23:08 +00:00
gp_ext_loader.py python/gp_ext_loader: remove unused imports 2018-10-25 21:45:53 +02:00
gp_sec_ext.py python/samba: PY3 port gpo.apply smbtorture test 2018-12-10 10:38:22 +01:00
gpclass.py python/gpclass: Convert gpclass to use s3 SMB Python bindings 2019-01-17 01:40:29 +01:00
graph.py py/graph: use 2.6 compatible check for set membership 2019-03-20 06:36:05 +00:00
hostconfig.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
idmap.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
join.py join: Use a specific attribute order for the DsAddEntry nTDSDSA object 2019-07-24 04:18:21 +00:00
logger.py logger: use color automatically for a tty 2018-11-21 10:46:20 +01:00
mdb_util.py mdb_util: Better error message if lmdb-utils not installed 2018-11-09 21:07:47 +01:00
ms_display_specifiers.py python/samba: port open to io.open for PY2/PY3 compat 2018-09-03 03:22:20 +02:00
ms_forest_updates_markdown.py python/samba: PY3 port samba4.blackbox.functionalprep 2018-10-23 05:50:28 +02:00
ms_schema_markdown.py PEP8: fix E305: expected 2 blank lines after class or function definition, found 1 2018-08-24 07:49:30 +02:00
ms_schema.py python/samba: port open to io.open for PY2/PY3 compat 2018-09-03 03:22:20 +02:00
ndr.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
ntacls.py Prevent samba-tool online backup crash 2019-08-17 03:50:39 +00:00
remove_dc.py python/remove_dc: fix Exception construction 2018-11-01 05:08:13 +01:00
samdb.py samba-tool: implement contact management commands 2019-07-04 02:07:21 +00:00
schema.py schema: changing default base schema to 2012_R2 2019-06-26 04:12:34 +00:00
sd_utils.py PEP8: fix E231: missing whitespace after ',' 2018-08-24 07:49:28 +02:00
sites.py PEP8: fix E128: continuation line under-indented for visual indent 2018-08-24 07:49:27 +02:00
subnets.py python/subnets: use the correct variable name 2018-11-01 05:08:11 +01:00
tdb_util.py PEP8: fix E302: expected 2 blank lines, found 1 2018-08-24 07:49:29 +02:00
upgrade.py PEP8: improve formatting around bit-wise OR ("|") 2018-08-24 07:49:32 +02:00
upgradehelpers.py python/upgradehelpers: use mkstemp, not mktemp 2018-11-07 17:55:08 +01:00
uptodateness.py python/uptodateness: cope with unknown invocation ID 2019-01-19 19:21:19 +01:00
xattr.py python/xattr: remove unused variable 2018-11-01 05:08:14 +01:00