Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 5804 - dtablesize being set to soft maxfiledescriptor limit #5806

Merged
merged 4 commits into from Jul 20, 2023

Conversation

jchapma
Copy link
Contributor

@jchapma jchapma commented Jun 19, 2023

Bug Description: 389ds is not setting dtablesize properly based when systemd is setting the maxfiledescriptors with it's default settings. dtablesize stays 1024 which causes massive slowdown once you hit around 950 connection

Fix Description: dtablesize is set to the connection table size, this commit sets the connection table size/dtablesize to the system max file descriptor number less the reserve file descriptors.

relates: #5804

Reviewed by: ?

Bug Description: 389ds is not setting dtablesize properly based when systemd is setting
the maxfiledescriptors with it's default settings. dtablesize stays 1024 which causes
massive slowdown once you hit around 950 connection

Fix Description: dtablesize is set to the connection table size, this
commit sets the connection table size/dtablesize to the system max
file descriptor number less the reserve file descriptors.

relates: 389ds#5804

Reviewed by: ?
Copy link
Contributor

@tbordaz tbordaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good with a minor comment.
A remark, I would appreciate that the fix description states that 'conntablesize' field disappear from the config entry (both cn=config and internal struct). Also do you know the explanation why there is a big slowdown when the nb of established connection is close to the limit ?

ldap/servers/slapd/daemon.c Show resolved Hide resolved
@jchapma
Copy link
Contributor Author

jchapma commented Jun 21, 2023

The change looks good with a minor comment. A remark, I would appreciate that the fix description states that 'conntablesize' field disappear from the config entry (both cn=config and internal struct). Also do you know the explanation why there is a big slowdown when the nb of established connection is close to the limit ?

This commit is a backport to 1.4.3 of a subset of the functionality of #5472 that addresses an issue where the default connectiontable size was set too low by default (1024) and the server failed to accept connections when the connection count was ~950. The bits that were backported were the reserve descriptor calculation based on the servers needs and the auto calculation of the connectiontable size. (conntablesize = max_descriptors - reserve descriptors). I just copied the commit description from the https://bugzilla.redhat.com/show_bug.cgi?id=2210491, but I can amend this commits description if you like.

@jchapma
Copy link
Contributor Author

jchapma commented Jun 21, 2023

Also do you know the explanation why there is a big slowdown when the nb of established connection is close to the limit ?

Im guessing that when the server is getting low on file descriptors there might be some kind of system latency causing this, maybe...

@rhjyoung
Copy link

rhjyoung commented Jul 5, 2023

I filed a Bugzilla with Red Hat on this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=2210491

Basically once you hit around 950 connections the entire system just slows completely down. So any large enviroment this causes 389ds to slow way to the point of taking up to 1 minute to return a query.

By using work around to that sets the softlimit to the limit. Things work fine.

@jchapma
Copy link
Contributor Author

jchapma commented Jul 11, 2023

nsslapd-conntablesize attribute has been added back, setting of this attr is disabled and a warning message returned to the user. The user can still "get" the value of this attr, so rather than return a attr value of 0, I set it in the when the connection table is being created.

Copy link
Contributor

@progier389 progier389 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With [174c75c] commit (rework2), it is OK.

@jchapma
Copy link
Contributor Author

jchapma commented Jul 20, 2023

With [174c75c] commit (rework2), it is OK.

Im not sure why this commit didnt have any branch, i reset head and pushed again.

@jchapma jchapma merged commit 231f92a into 389ds:389-ds-base-1.4.3 Jul 20, 2023
7 checks passed
@jchapma jchapma deleted the 1.4.3-dtablesize branch July 20, 2023 15:51
jchapma added a commit that referenced this pull request Aug 8, 2023
)

Bug Description: 389ds is not setting dtablesize properly based when systemd is setting
the maxfiledescriptors with it's default settings. dtablesize stays 1024 which causes
massive slowdown once you hit around 950 connection

Fix Description: dtablesize is set to the connection table size, this
commit sets the connection table size/dtablesize to the system max
file descriptor number less the reserve file descriptors.

relates: #5804

Reviewed by: @tbordaz @progier389  (Thank you)
jchapma added a commit that referenced this pull request Aug 8, 2023
)

Bug Description: 389ds is not setting dtablesize properly based when systemd is setting
the maxfiledescriptors with it's default settings. dtablesize stays 1024 which causes
massive slowdown once you hit around 950 connection

Fix Description: dtablesize is set to the connection table size, this
commit sets the connection table size/dtablesize to the system max
file descriptor number less the reserve file descriptors.

relates: #5804

Reviewed by: @tbordaz @progier389  (Thank you)
jchapma added a commit that referenced this pull request Aug 8, 2023
)

Bug Description: 389ds is not setting dtablesize properly based when systemd is setting
the maxfiledescriptors with it's default settings. dtablesize stays 1024 which causes
massive slowdown once you hit around 950 connection

Fix Description: dtablesize is set to the connection table size, this
commit sets the connection table size/dtablesize to the system max
file descriptor number less the reserve file descriptors.

relates: #5804

Reviewed by: @tbordaz @progier389  (Thank you)
jchapma added a commit that referenced this pull request Aug 8, 2023
)

Bug Description: 389ds is not setting dtablesize properly based when systemd is setting
the maxfiledescriptors with it's default settings. dtablesize stays 1024 which causes
massive slowdown once you hit around 950 connection

Fix Description: dtablesize is set to the connection table size, this
commit sets the connection table size/dtablesize to the system max
file descriptor number less the reserve file descriptors.

relates: #5804

Reviewed by: @tbordaz @progier389  (Thank you)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants