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

Stop counting fds after enough free ones are encountered #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Earlopain
Copy link

On systems with incredibly high RLIMIT_NOFILE (either intentionally or by accident) this can take quite a large amount of time.
Instead of checking them all, just stop after enough free ones have been encountered. 100k is a rather large number for that but the time needed to do this is quite low. My system does about about 7 million per second.

Closes #600

Disclaimer: I haven't properly tested this since I don't know how. I'd love some pointers on that.

On systems with incredibly high `RLIMIT_NOFILE` (either intentionally or
by accident) this can take quite a large amount of time.

Closes LibVNC#600
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.

Incredibly high RLIMIT_NOFILE results in minutes of initial connection delay
1 participant