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

multi: during ratelimit multi_getsock should return no sockets #12430

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Nov 30, 2023

... as there is nothing to wait for then, it just waits. Otherwise, this causes much more CPU work and updates than necessary during ratelimit periods.

Ref: https://curl.se/mail/lib-2023-11/0056.html

... as there is nothing to wait for then, it just waits. Otherwise, this
causes much more CPU work and updates than newessary during ratelimit
periods.
@bagder bagder requested a review from icing November 30, 2023 09:34
Copy link
Contributor

@icing icing left a comment

Choose a reason for hiding this comment

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

Running curl --silent --limit-rate 1000 https://curl.se/?[0-4] -o /dev/null -w '%{speed_download}\n' gives:

908
921
921
908
1103

adding -Z gives:

1088
1052
1024
1024
915

I'd say it looks good!

@bagder
Copy link
Member Author

bagder commented Nov 30, 2023

My test command is this curl --limit-rate 5M localhost/100G -o /dev/null

... which after about 10 seconds stabilizes on 5120-5125k per second. (5*1024 == 5120)

@bagder bagder closed this in d1c2bb3 Nov 30, 2023
@bagder bagder deleted the bagder/ratelimit-getsock branch November 30, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants