You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filipe Manana (JIRA)" <ji...@apache.org> on 2011/01/03 14:12:49 UTC

[jira] Created: (COUCHDB-1008) Add socket_options to the ini .configuration

Add socket_options to the ini .configuration
--------------------------------------------

                 Key: COUCHDB-1008
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
             Project: CouchDB
          Issue Type: Improvement
            Reporter: Filipe Manana
            Assignee: Filipe Manana


Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.

For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).

The following article explains how some socket options might boost performance under some common scenarios:
http://www.ibm.com/developerworks/linux/library/l-hisock.html

Patch attached

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


[jira] Commented: (COUCHDB-1008) Add socket_options to the ini .configuration

Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976742#action_12976742 ] 

Benoit Chesneau commented on COUCHDB-1008:
------------------------------------------

recv_buf can give different results on bsd. I would keep mochiweb defaults and let the user define them if we want rather than using setting sbased on linux os.

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Commented: (COUCHDB-1008) Add socket_options to the ini .configuration

Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976761#action_12976761 ] 

Benoit Chesneau commented on COUCHDB-1008:
------------------------------------------

misread the change in ini, sorry. I'm +1 for this patch then.

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Commented: (COUCHDB-1008) Add socket_options to the ini .configuration

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976895#action_12976895 ] 

Filipe Manana commented on COUCHDB-1008:
----------------------------------------

Seems all fine to me now Randall.
If nobody raises an objection, I'll commit it as it is by tomorrow or the day after.

Again, thanks

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch, COUCHDB-1008.patch, COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Closed: (COUCHDB-1008) Add socket_options to the ini .configuration

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

Filipe Manana closed COUCHDB-1008.
----------------------------------

    Resolution: Fixed

Applied to trunk

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch, COUCHDB-1008.patch, COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Updated: (COUCHDB-1008) Add socket_options to the ini .configuration

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

Randall Leeds updated COUCHDB-1008:
-----------------------------------

    Attachment: COUCHDB-1008.patch

Thanks for the feedback, Filipe.
You're right, 1.1 hasn't been released so nodelay can just be taken out.
I removed the documentation comment for nodelay on server_options so people don't get confused.

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch, COUCHDB-1008.patch, COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Commented: (COUCHDB-1008) Add socket_options to the ini .configuration

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976746#action_12976746 ] 

Filipe Manana commented on COUCHDB-1008:
----------------------------------------

Right BenoƮt. The patch doesn't change the default, it only allows it to be changed.

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Updated: (COUCHDB-1008) Add socket_options to the ini .configuration

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

Filipe Manana updated COUCHDB-1008:
-----------------------------------

    Attachment: COUCHDB-1008.patch

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Commented: (COUCHDB-1008) Add socket_options to the ini .configuration

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976878#action_12976878 ] 

Filipe Manana commented on COUCHDB-1008:
----------------------------------------

Randall,

I don't think we need that nodelay option deprecation message. As far as I can see, the nodelay option under the section [httpd] was added for 1.1.0, which means it's not used in any official release. Couldn't find any reference to it in 1.0.x and 0.11.x

About the nodelay option, it's confusing that it's both in server_options and socket_options. I think I would prefer to leave it in socket_options. The mochiweb nodelay option is applied to the listen socket. When an 'accept' is done, the returned socket inherits the listen socket's configuration . Since the socket options are applied at the beginning of the loop, if nodelay is specified in the socket_options, it will override the nodelay setting specified in server_options.
Maybe others have a different point of view.

thanks

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch, COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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


[jira] Updated: (COUCHDB-1008) Add socket_options to the ini .configuration

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

Randall Leeds updated COUCHDB-1008:
-----------------------------------

    Attachment: COUCHDB-1008.patch

Alternative patch that adds the 'server_options' directive for setting advanced options on the server socket and deprecates nodelay. Moves documentation comments to local.ini.

> Add socket_options to the ini .configuration
> --------------------------------------------
>
>                 Key: COUCHDB-1008
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1008
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1008.patch, COUCHDB-1008.patch
>
>
> Under some scenarios it's useful to set custom socket options, namely the recbuf and sndbuf options.
> For example, setting the recbuf option to 256Kb,  dropped the time to upload a 100Mb attachment from 2507499us to 1387625us. The default value of this parameter is 8192 bytes (set by mochiweb).
> The following article explains how some socket options might boost performance under some common scenarios:
> http://www.ibm.com/developerworks/linux/library/l-hisock.html
> Patch attached

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