Pokazywanie postów oznaczonych etykietą performance. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą performance. Pokaż wszystkie posty

2024-10-22

memory considerations for Active Directory

Location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters

Name: EDB max ver pages (increment over the minimum)
Type: REG_DWORD
Value:
Note The value for the setting is the number of 16KB memory chunks (or 32KB memory chunks on a 64-bit processor) that will be reserved. For example:
9600 = ~150 MB 32-bit, ~600 MB 64-bit
12800 = ~200 MB 32-bit, ~800 MB 64-bit
16000 = ~250 MB 32-bit, ~1000 MB 64-bit
19200 = ~300 MB 32-bit, ~1200 MB 64-bit

When to increase? When allocated buckets are on high values...

performance tunning for Active Directory

NTDS\Request Latency - should be as low as possible - at the end is the defined timeout - by default - 120 seconds, but we don't want to be there...
Number of LDAP threads - by default is 4 per cpu core, so in environment with 4 cores is 16 - so if we have current value of 16 and cpu use at 100% so maybe we have bottleneck? CPU queue is another sign of issues.
NTDS\Estimated Queue Delay - shoud be 0 - is higher we have a problem - querries are wainting to process

2021-12-22

Monitoring LDAP querries

Enable Field Engineering - HKEY_LOCAL_MACHINE → SYSTEM → CurrentControlSet → Services → NTDS → Diagnostics. Set '15 Field Engineering' to '5'

Event ID 1643: No. of LDAP searches.

event ID 2889: unsecure ldap bind

event ID 2887: daily unsecure ldap binds

event ID 1644: recent ldap query

event ID 1535: error from ldap server

event ID 1317: ldap timeout
HKEY_LOCAL_MACHINE → SYSTEM → CurrentControlSet → Services → NTDS → Parameters
Inefficient Search Results Threshold, REG_DWORD - default 1000 - how many entries should be returned to treat is like inefficient,
Expensive Search Results Threshold, REG_DWORD - default 10000 - like inefficients
Search Time Threshold (msecs), REG_DWORD - default 30000 - how long query must take to be stored in event log as 1644 event id

2019-02-19

DNS performance on Windows

Just to remember: I've got experience with heavy loaded domain controller with queries rate above 40k per second (yes, 40 thousand per second). The main problem on this virtual domain controller it was high cpu0 utilization and low load on other cpu. As I can remember - it was VMWare vm with 16 cores (virtual cores on operating system). What should be done in this case to improve performance? Upgrade of virtual hardware and network subsystem.

2018-11-05

prepopulated view - indexed view

Just like prepopulated reports - especially time consuming - prepared at off-hours for views we can prepopulate data using indexed view. This type of view has additional requirements:
- view must be created WITH SCHEMABINDING
- tables must be specified with database name
- view can't be created from GUI

If view is used frequently and contains aggregation functions so it is equal to great gain of speed - because data is prepopulated and calculated.

2018-11-04

TMG and Windows 2008R2 optimisation

IP Stack configuration
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters “TcpTimedWaitDelay” DWord set to 0x1e.
“StrictTimeWaitSeqCheck” DWord set to 0x1.
Forces TCP/IP stack to hold TCP ports in a TIME_WAIT state for 30 seconds. Default is 120 seconds.

Disk subsystem – Web Cache
Disable short name creation. HKLM\SYSTEM\CurrentControlSet\Control\Filesystem NtfsDiable8dot3NameCreation 0x1
Disable last access update. HKLM\SYSTEM\CurrentControlSet\Control\Filesystem NtfsDsiableLastAccessUpdate 0x1
Multiprocessor only - Bypassing I/O Counters. HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\I/O System CounterOperations 0x0
Task Manager will no longer provide per-process I/O measurements
Useful when a process generates considerable disk and network I/O on a SMP system, which an ISA server under load can easily do.

Domain Topology
NTLM Auth issues. Set HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters DWord “MaxConcurrentApi” 0x3. If still having issues walk up to 0x6.


Firewall & Web Proxy service DNS Cache (in-process)
Services hold the last 3000 DNS records, regardless of actual TTL, for 6 hours.
Keys
Web Proxy: HKLM\SOFTWARE\Microsoft\Fpc\Arrays\{Array GUID}\ArrayPolicy\WebProxy "msFPCDnsCacheSize“ Default is 0xBB8 & "msFPCDnsCacheTtl" Default is 0x5460
Firewall: HKLM\SOFTWARE\Microsoft\Fpc\Arrays\{Array GUID}\ArrayPolicy\Proxy-WSP "msFPCDnsCacheSize“ Default is 0xBB8 & "msFPCDnsCacheTtl“ Default is 0x5460

2018-07-16

measure ldap bind time - for Active Directory powershell script

How to check simple bind anonymously for all domain controllers? Maybe using this script:
#####################Variables#####################
$repeats = 10
###################################################

#####################Main#####################
import-module activedirectory 
cls 
$myForest = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() 
$domCtrls = $myforest.Sites | % { $_.Servers } | Select Name 
$domCtrls | %{
    $domCtrl = $_
    $totalTime = 0
    $i = 0
    $maxTime = 0; $minTime = 100
    while ($i -ne $repeats) {
        $c = New-Object System.DirectoryServices.Protocols.LdapConnection ($domCtrl.Name + ":389")
         
        # Anonymous, Basic, Digest, DPA (Distributed Password Authentication), 
        # External, Kerberos, Msn, Negotiate, Ntlm, Sicily 
        $c.AuthType = [System.DirectoryServices.Protocols.AuthType]::Anonymous

        $c.SessionOptions.ProtocolVersion = 3
        $c.SessionOptions.SecureSocketLayer = $false

        $time = (Measure-Command {$c.Bind()}).TotalSeconds
        $c.Dispose()

        $totalTime += $time 
        if ($minTime -gt $time) { $minTime = $time }
        if ($maxTime -lt $time) { $maxTime = $time }
        $i++
    }
    $avgTime = $totalTime / $repeats 
    $domCtrl.name + "`t" + $minTime + "`t" + $avgTime + "`t" + $maxTime
}


Output is formatted with tabs co You can copy/paste strictly to Excel or to Word and convert to a table.

2018-03-19

extremally slow Dell laptop e6520

It's not connected probably with this model only - I tried to found the reason why my brother's laptop is so sloooow and I found that. SpeedStep technology should be disabled in BIOS. What a stupid decision to enable it by default - Intel i5 processor is working like first Pentium.