Write on sockets blocking for long periods of time on writes
Here is the scenario where i am seeing writes on TCP sockets getting blocked for long periods of time
Client (curl) is downloading a large file at slow speed, I can reproduce this by using curl --limit-rate 1k option
Server (running on Ubuntu 16.04.5 LTS) does writes on socket in a loop
In tcp-dump traces, I do see that TCP window of client becomes zero and server is sending ~ 1 KB data/ sec
The writes blocks for ~ 60 seconds and then allows writes of abt 60 K in burst and then blocks again for 60+ seconds
Assuming that send buffer is of fixed size, I would have assumed that writes would block for 1 second and allow write of 1k and then again block for 1 secs , i.e. allow write of 1k every second instead of 60+k every 60 seconds in bursts
Does any one know the reasoning on why i am seeing this behavior? I can see this behavior by looking at strace output
networking
add a comment |
Here is the scenario where i am seeing writes on TCP sockets getting blocked for long periods of time
Client (curl) is downloading a large file at slow speed, I can reproduce this by using curl --limit-rate 1k option
Server (running on Ubuntu 16.04.5 LTS) does writes on socket in a loop
In tcp-dump traces, I do see that TCP window of client becomes zero and server is sending ~ 1 KB data/ sec
The writes blocks for ~ 60 seconds and then allows writes of abt 60 K in burst and then blocks again for 60+ seconds
Assuming that send buffer is of fixed size, I would have assumed that writes would block for 1 second and allow write of 1k and then again block for 1 secs , i.e. allow write of 1k every second instead of 60+k every 60 seconds in bursts
Does any one know the reasoning on why i am seeing this behavior? I can see this behavior by looking at strace output
networking
add a comment |
Here is the scenario where i am seeing writes on TCP sockets getting blocked for long periods of time
Client (curl) is downloading a large file at slow speed, I can reproduce this by using curl --limit-rate 1k option
Server (running on Ubuntu 16.04.5 LTS) does writes on socket in a loop
In tcp-dump traces, I do see that TCP window of client becomes zero and server is sending ~ 1 KB data/ sec
The writes blocks for ~ 60 seconds and then allows writes of abt 60 K in burst and then blocks again for 60+ seconds
Assuming that send buffer is of fixed size, I would have assumed that writes would block for 1 second and allow write of 1k and then again block for 1 secs , i.e. allow write of 1k every second instead of 60+k every 60 seconds in bursts
Does any one know the reasoning on why i am seeing this behavior? I can see this behavior by looking at strace output
networking
Here is the scenario where i am seeing writes on TCP sockets getting blocked for long periods of time
Client (curl) is downloading a large file at slow speed, I can reproduce this by using curl --limit-rate 1k option
Server (running on Ubuntu 16.04.5 LTS) does writes on socket in a loop
In tcp-dump traces, I do see that TCP window of client becomes zero and server is sending ~ 1 KB data/ sec
The writes blocks for ~ 60 seconds and then allows writes of abt 60 K in burst and then blocks again for 60+ seconds
Assuming that send buffer is of fixed size, I would have assumed that writes would block for 1 second and allow write of 1k and then again block for 1 secs , i.e. allow write of 1k every second instead of 60+k every 60 seconds in bursts
Does any one know the reasoning on why i am seeing this behavior? I can see this behavior by looking at strace output
networking
networking
asked Jan 21 at 18:11
Harish RawatHarish Rawat
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111725%2fwrite-on-sockets-blocking-for-long-periods-of-time-on-writes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111725%2fwrite-on-sockets-blocking-for-long-periods-of-time-on-writes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown