s4:torture/smb2: add smb2.bench.read test This test opens one file for each loop (for nprocs * qdepth loops) and for each file it loops in read requests for the first io_size bytes. time smbtorture //127.0.0.1/m -Uroot%test smb2.bench.read \ --option="torture:timelimit=600" \ --option="torture:nprocs=1" \ --option="torture:qdepth=4" \ --option="torture:io_size=4096" In order to generate constant load for profiles --option="torture:looplimit=150000" can be used to stop after the given number of loops before the timelimit hits. Sometimes the bottleneck is the smbtorture process. In order to bring the smbd process to 100% cpu, you can use '--option="libsmb:client_guid=6112f7d3-9528-4a2a-8861-0ca129aae6c4"' and run multiple instances of the test at the same time, which both talk to the same smbd process. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jun 1 08:14:23 UTC 2023 on atb-devel-224
s4:torture/smb2: add --option="torture:looplimit=150000" to smb2.bench.echo Also see the commit message of 23988f19e7cc2823d6c0c0f40af0195d0a3b81bf for other examples... This test calls SMB2_Echo in a loop per connection. time smbtorture //127.0.0.1/m -Uroot%test smb2.bench.echo \ --option="torture:timelimit=600" \ --option="torture:looplimit=150000" \ --option="torture:nprocs=1" \ --option="torture:qdepth=1" This is a very useful test to show how many requests are possible at the raw SMB2 layer. In order to do profiling and being able to compare the profiles between runs, it is important to produce the exact same load in each run, which is not possible with the typical --option="torture:timelimit=600". E.g. when the server runs under 'valgrind --tool=callgrind bin/smbd' I typically run without "torture:looplimit" first in order to see, which rate is possible per second, then I'll add a "torture:looplimit" in order to run about half of the timelimit. Then the looplimit should run for some time, but finish before the timelimit. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
smb2_negprot: add CALLGRIND_START_INSTRUMENTATION after SMB2 negprot This allows us to support starting smbd under callgrind and only start the overhead and instrumentation after the SMB2 negprot, this allows us to profile only useful stuff and not all the smbd startup, forking and multichannel handling. This will do the trick: valgrind --tool=callgrind --instr-atstart=no smbd Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
s4-rpc_server: Filter via dsdb_dc_functional_level() before we are returning a lookup directly Otherwise, punt to winbindd to see if another DC has this capability. This allows a FL2008-emulating DC to forward a request to a 2012R2-emlating DC, particularly in another domain. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed May 31 04:59:01 UTC 2023 on atb-devel-224
s4-libads: Confirm newer functional levels in check_cldap_reply_required_flags() This will allow us to require that the target DC has FL 2008, 2012, 2012R2 or 2016. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
sefltest: Improve getdcname test by confirming the _REQUIRED flag behaviours We do this by checking what the underlying CLDAP netlogon call returns. This also validates that behaviour. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
selftest: Confirm that the flags like DS_DIRECTORY_SERVICE_9_REQUIRED work We need to confirm this both for forwarded requests, and also for requests direct to the possible DC. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon May 29 23:29:50 UTC 2023 on atb-devel-224
selftest: Rework samba.tests.getdcname not to use ncalrpc This test is able to operate over the network, which aids testing against a comparative windows DC. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>