Skip to content

multi: during ratelimit multi_getsock should return no sockets#12430

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/ratelimit-getsock
Closed

multi: during ratelimit multi_getsock should return no sockets#12430
bagder wants to merge 1 commit into
masterfrom
bagder/ratelimit-getsock

Conversation

@bagder

@bagder bagder commented Nov 30, 2023

Copy link
Copy Markdown
Member

... 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

@icing icing left a comment

Copy link
Copy Markdown
Contributor

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

bagder commented Nov 30, 2023

Copy link
Copy Markdown
Member Author

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.

2 participants