dotnet/runtime

System.DirectoryServices.Protocols - Linux performance problems with large response sizes

Open

#43,929 opened on Oct 28, 2020

View on GitHub
 (4 comments) (2 reactions) (0 assignees)C# (5,445 forks)batch import
area-System.DirectoryServiceshelp wantedos-linuxtenet-performance

Repository metrics

Stars
 (17,886 stars)
PR merge metrics
 (Avg merge 12d 11h) (661 merged PRs in 30d)

Description

Description

I have observed performance generally being worse on linux, to the point that large requests that succeed on Windows will time out on linux.

When searching for groups using a basic SearchRequest with the following configuration:

var searchRequest = new SearchRequest(
    container,
    "objectCategory=group",
    SearchScope.Subtree,
    new[] { "cn", });

I will get these results:

ou=Company,dc=company,dc=com (715 groups) Windows: ~550ms Linux: timeout

OU=Folder Access,OU=Company Security Groups,ou=Company,dc=company,dc=com (230 groups) Windows: ~230ms Linux: ~23s

OU=Product,ou=Company,dc=company,dc=com (20 groups) Windows: ~90ms Linux: ~2s

This isn't as problematic until reaching higher response sizes where the requests scale to unreasonable response times or just timeout.

I found this when investigating Windows-linux disparity in #43621.

Configuration

  • .NET 5.0.0-rc.2.20475.5
  • aspnet:5.0-alpine docker image
  • x86_64
  • libldap 2.4
  • Windows Server 2019 DC

Contributor guide