You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2010/05/30 00:31:39 UTC

[jira] Created: (TS-382) socket option "cleanup" (and bug fixes)

socket option "cleanup" (and bug fixes)
---------------------------------------

                 Key: TS-382
                 URL: https://issues.apache.org/jira/browse/TS-382
             Project: Traffic Server
          Issue Type: Bug
            Reporter: Leif Hedstrom


This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).


>From Bugzilla (posted by Leif):

We have two socket option config options in records.config:

proxy.config.net.sock_option_flag_in
proxy.config.net.sock_option_flag_out


With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
that we don't honor these flags either.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-382) socket option "cleanup" (and bug fixes)

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873339#action_12873339 ] 

Leif Hedstrom commented on TS-382:
----------------------------------

Comment #13:

We should also add support for TCP_QUICKACK. From Subbu:

Using TCP_QUICKACK on the server side may improve latencies for data transfers as well. It is a socket option. Docs are
not clear (to me) as to how it works or what it does, but it seems that it is a socket option set on the server side. A
tcpdump after setting it may tell us what it really does, esp over long latency links.


> socket option "cleanup" (and bug fixes)
> ---------------------------------------
>
>                 Key: TS-382
>                 URL: https://issues.apache.org/jira/browse/TS-382
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>
> This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).
> Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.
> From Bugzilla (posted by Leif):
> We have two socket option config options in records.config:
> proxy.config.net.sock_option_flag_in
> proxy.config.net.sock_option_flag_out
> With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
> that we don't honor these flags either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-382) socket option "cleanup" (and bug fixes)

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873337#action_12873337 ] 

Leif Hedstrom commented on TS-382:
----------------------------------

Comment #11:

The hardwired behavior in YTS is quite suitable for most applications (specially YCS and YCPI). Even though the code is
convoluted, and outright wrong in several cases (like the records.config options aren't really honored, or we end up
calling setsockopt() multiple times), I'm suggesting we move this bug to xyz.



> socket option "cleanup" (and bug fixes)
> ---------------------------------------
>
>                 Key: TS-382
>                 URL: https://issues.apache.org/jira/browse/TS-382
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>
> This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).
> Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.
> From Bugzilla (posted by Leif):
> We have two socket option config options in records.config:
> proxy.config.net.sock_option_flag_in
> proxy.config.net.sock_option_flag_out
> With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
> that we don't honor these flags either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-382) socket option "cleanup" (and bug fixes)

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-382:
-----------------------------

    Component/s: Network

> socket option "cleanup" (and bug fixes)
> ---------------------------------------
>
>                 Key: TS-382
>                 URL: https://issues.apache.org/jira/browse/TS-382
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Network
>            Reporter: Leif Hedstrom
>             Fix For: 2.3.0
>
>
> This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).
> Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.
> From Bugzilla (posted by Leif):
> We have two socket option config options in records.config:
> proxy.config.net.sock_option_flag_in
> proxy.config.net.sock_option_flag_out
> With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
> that we don't honor these flags either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-382) socket option "cleanup" (and bug fixes)

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873336#action_12873336 ] 

Leif Hedstrom commented on TS-382:
----------------------------------

Comment #10 (from leif):

A few more things that we should fix:

1) We set TCP_NODELAY and SO_KEEPALIVE on various sockets "hardcoded" (i.e. it does not honor the config
settings).

2) There are a few cases where we'll actually end up calling setsockopt() multiple times on the same socket.

I'm adding in some Debug() stuff (with a tag "socket") to help debug this.



> socket option "cleanup" (and bug fixes)
> ---------------------------------------
>
>                 Key: TS-382
>                 URL: https://issues.apache.org/jira/browse/TS-382
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>
> This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).
> Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.
> From Bugzilla (posted by Leif):
> We have two socket option config options in records.config:
> proxy.config.net.sock_option_flag_in
> proxy.config.net.sock_option_flag_out
> With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
> that we don't honor these flags either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-382) socket option "cleanup" (and bug fixes)

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-382:
-----------------------------

    Description: 
This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).

Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.


>From Bugzilla (posted by Leif):

We have two socket option config options in records.config:

proxy.config.net.sock_option_flag_in
proxy.config.net.sock_option_flag_out


With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
that we don't honor these flags either.



  was:
This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).


>From Bugzilla (posted by Leif):

We have two socket option config options in records.config:

proxy.config.net.sock_option_flag_in
proxy.config.net.sock_option_flag_out


With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
that we don't honor these flags either.




> socket option "cleanup" (and bug fixes)
> ---------------------------------------
>
>                 Key: TS-382
>                 URL: https://issues.apache.org/jira/browse/TS-382
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>
> This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).
> Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.
> From Bugzilla (posted by Leif):
> We have two socket option config options in records.config:
> proxy.config.net.sock_option_flag_in
> proxy.config.net.sock_option_flag_out
> With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
> that we don't honor these flags either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-382) socket option "cleanup" (and bug fixes)

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873338#action_12873338 ] 

Leif Hedstrom commented on TS-382:
----------------------------------

Comment #12:

Here's what I suggest we do for 1.18:

1) We remove all hardcoded setsockopt() invocations (for SO_KEEPALIVE and TCP_NODELAY at least).

2) Examine if there are any other socket options that these records.config flags should support.

3) Isolate all calls to setsockopt() (for these options) to two places:

     - In the connect() abstraction.
     - In the listen() abstraction.

4) We remove the sockopt_flags arguments (and member of NetAccept) from all places where we do accept. Since we'll do
these options on the listen socket, there's no need to pass this around all over the place. Fetching the records.config
value at time of calling listen() is a marginal overhead.

5) For the connect() abstraction, we'll have to figure out the best way to "cache" (or pass along) the
records.config value. Since this can be done fairly often, it's worthwhile to avoid fetching it via RecordsConfig over
and over again.



> socket option "cleanup" (and bug fixes)
> ---------------------------------------
>
>                 Key: TS-382
>                 URL: https://issues.apache.org/jira/browse/TS-382
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>
> This is a bug moved from Y! Bugzilla, I'm posting the original bug description and a few comments separately. Note that the bug description is fairly limited, but while looking at this code, I noticed a lot of oddities with the "socket option" support (lots of hardcoded stuff, and most of it is not configurable).
> Note that the original bug should have been fixed already in Apache TS, but the other comments are still applicable.
> From Bugzilla (posted by Leif):
> We have two socket option config options in records.config:
> proxy.config.net.sock_option_flag_in
> proxy.config.net.sock_option_flag_out
> With accept thread enabled, at least the _in option isn't honored. There are possibly other cases in UnixNetAccept.cc
> that we don't honor these flags either.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.