1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/source4/rpc_server
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
..
backupkey s4-rpc_server/backupkey: consistently check error codes from GnuTLS 2019-08-21 09:57:31 +00:00
browser werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/rpc_server/ 2016-09-28 00:04:35 +02:00
common s4:rpc_server: make use of dcesrv_call_state->auth_state in common/reply.c 2019-01-12 03:13:36 +01:00
dnsserver CVE-2019-12435 rpc/dns: avoid NULL deference if zone not found in DnssrvOperation2 2019-06-19 07:01:12 +00:00
drsuapi s4/rpc/drsuapi/writespn: check the actual error code (CID 1034691) 2019-05-09 22:39:27 +00:00
echo s4:rpc_server: only pass context to op_bind() hooks 2019-01-12 03:13:39 +01:00
epmapper s4:rpc_server: only pass context to op_bind() hooks 2019-01-12 03:13:39 +01:00
eventlog s4:rpc_server/eventlog: make use of dcesrv_handle_create() 2019-01-12 03:13:34 +01:00
lsa source4: Update all consumers of strtoul_err(), strtoull_err() to new API 2019-06-30 11:32:18 +00:00
netlogon s4-rpc_server: Check NTSTATUS return value from netlogon_creds_aes_decrypt() 2019-08-21 09:57:30 +00:00
remote s4:rpc_server: make it possible to specify ncacn_np_secondary_endpoint 2019-01-12 03:13:41 +01:00
samr rpc samr: EnumDomainUsers perf improvement 2019-08-30 07:08:36 +00:00
srvsvc s4:rpc_server/srvsvc: make use dcesrv_call_session_info() 2019-01-12 03:13:33 +01:00
tests dnsp.idl: fix dnsp_ip4_array definition 2019-06-21 08:49:19 +00:00
unixinfo wbclient: "ev" is no longer used in wbc_xids_to_sids 2016-09-28 00:04:36 +02:00
winreg s4:rpc_server/winreg: don't cache an ldb connection per presentation context 2019-01-12 03:13:39 +01:00
wkssvc werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/rpc_server/ 2016-09-28 00:04:35 +02:00
dcerpc_server.c s4:rpc_server: add missing newline to error debug message 2019-04-03 00:13:10 +00:00
dcerpc_server.h s4:rpc_server: implement security context multiplexing 2019-01-12 03:13:41 +01:00
dcerpc_server.pc.in dcerpc_server: Add 'modulesdir' variable to pkg-config file. 2012-02-23 16:26:25 +01:00
dcesrv_auth.c s4:rpc_server: implement security context multiplexing 2019-01-12 03:13:41 +01:00
dcesrv_mgmt.c s4:rpc_server: only pass context to op_bind() hooks 2019-01-12 03:13:39 +01:00
handles.c rpc_server: Use dom_sid_str_buf 2019-02-27 01:35:19 +01:00
service_rpc.c source4 smdb rpc_server: Support prefork process model. 2018-11-07 17:55:09 +01:00
wscript_build s4-rpc_server/backupkey: consistently check error codes from GnuTLS 2019-08-21 09:57:31 +00:00