in reply to Re^6: changing tcp parameters when establishing connection
in thread changing tcp parameters when establishing connection

In the name of avoiding a reply-war, I'll make this (brief) comment my last in the thread. For the record, I never said "an application can set the window size". What I did say is that an application can:

tune window-scaling per-socket

..and..

impact the window scaling

..and..

adjust this in the application level (where "this" is socket buffer sizes)

from the application. Apologies if there was any confusion where someone thought I said you had direct application-level control over the window-scaling. The application can influence this, which is described not only in system manpages, but in RFC-1323, section 2.1. This has been my only point for a while, and it's not worth any more attention, I suspect.

  • Comment on Re^7: changing tcp parameters when establishing connection

Replies are listed 'Best First'.
Re^8: changing tcp parameters when establishing connection
by BrowserUk (Patriarch) on Dec 04, 2015 at 00:36 UTC
    I never said "an application can set the window size"

    But the OP asked: "how can i change the tcp parameters (i.e. tcp window size, scaling"; and the answer is: he cannot.

    The application can influence this

    Great. You've outlined a mechanism for potentially effecting some indeterminate change in the window size/scale factor product. Now show how to do something useful with it.

    The primary benefit of adjusting those (that) parameter is to improve throughput by tailoring the effective buffer size to the bandwidth and latency of the link.

    To make the adjustment, you need to know:

    • The effective bandwidth;
    • The effective latency;
    • The application retrieve rate.

    But, none of these factors are available to application code. Not only is that information not available from the stack; even if it was, it would do you no good because the only parameter you can tune is the retrieve buffer size; and that has to be done before the connection is made; so you cannot even try to instrument these from within the application and adjust in light of your findings.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.