You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "vijaya bhaskar mamidi (JIRA)" <ji...@apache.org> on 2010/04/29 08:07:54 UTC

[jira] Created: (TS-329) delay seen in handling the client's request while running with accept thread

delay seen in handling the client's request while running with accept thread 
-----------------------------------------------------------------------------

                 Key: TS-329
                 URL: https://issues.apache.org/jira/browse/TS-329
             Project: Traffic Server
          Issue Type: Improvement
          Components: Core
            Reporter: vijaya bhaskar mamidi
            Priority: Minor


Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout

Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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


[jira] Commented: (TS-329) delay seen in handling the client's request while running with accept thread

Posted by "vijaya bhaskar mamidi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862346#action_12862346 ] 

vijaya bhaskar mamidi commented on TS-329:
------------------------------------------

Yes, we use pipes based signaling at Y! 

> delay seen in handling the client's request while running with accept thread 
> -----------------------------------------------------------------------------
>
>                 Key: TS-329
>                 URL: https://issues.apache.org/jira/browse/TS-329
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: vijaya bhaskar mamidi
>            Priority: Minor
>         Attachments: patch.329
>
>
> Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
> request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout
> Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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


[jira] Commented: (TS-329) delay seen in handling the client's request while running with accept thread

Posted by "George Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862293#action_12862293 ] 

George Paul commented on TS-329:
--------------------------------

I noticed the pipe() based signaling being fixed with this patch on trunk also. By default at least for the distro's I've been testing eventfd() is detected and used by default. Overall the code needs cleanup like John mentioned with signal() handling being unified.

Vijay, by default are you/Y! using pipes() or eventfd() on linux or is because of some older distros/kernels used by Y! where pipe() becomes the default?

-George

> delay seen in handling the client's request while running with accept thread 
> -----------------------------------------------------------------------------
>
>                 Key: TS-329
>                 URL: https://issues.apache.org/jira/browse/TS-329
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: vijaya bhaskar mamidi
>            Priority: Minor
>         Attachments: patch.329
>
>
> Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
> request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout
> Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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


[jira] Updated: (TS-329) delay seen in handling the client's request while running with accept thread

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

vijaya bhaskar mamidi updated TS-329:
-------------------------------------

    Attachment: patch.329

patch attached

> delay seen in handling the client's request while running with accept thread 
> -----------------------------------------------------------------------------
>
>                 Key: TS-329
>                 URL: https://issues.apache.org/jira/browse/TS-329
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: vijaya bhaskar mamidi
>            Priority: Minor
>         Attachments: patch.329
>
>
> Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
> request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout
> Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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


[jira] Resolved: (TS-329) delay seen in handling the client's request while running with accept thread

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

vijaya bhaskar mamidi resolved TS-329.
--------------------------------------

    Resolution: Fixed

patch checked in 

> delay seen in handling the client's request while running with accept thread 
> -----------------------------------------------------------------------------
>
>                 Key: TS-329
>                 URL: https://issues.apache.org/jira/browse/TS-329
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: vijaya bhaskar mamidi
>            Priority: Minor
>         Attachments: patch.329
>
>
> Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
> request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout
> Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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


[jira] Commented: (TS-329) delay seen in handling the client's request while running with accept thread

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862248#action_12862248 ] 

John Plevyak commented on TS-329:
---------------------------------

Gack it looks like this patch also fixes pipe() based signaling.  Is this same code in 2.0.X?  Is pipe signaling broken in that is is it running your version?

Looking over the patch I realize that the signaling code is kind of a mess now.  try_signal has never been used and should be removed.  The ProtectedQueue::signal() doesn't call the hook, so the bool fast_signal doesn't really make sense in that signal doesn't relate to fast_signal.  Sheesh. I think some cleanup is in order, but then cleanup is in order all over the code.

Also it looks like this patch is against the tree with George's standalone iocore patch which I don't think has been committed yet.

If you don't have time or want to do the cleanup then check this in as we need the pipe() fix in any case.

> delay seen in handling the client's request while running with accept thread 
> -----------------------------------------------------------------------------
>
>                 Key: TS-329
>                 URL: https://issues.apache.org/jira/browse/TS-329
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: vijaya bhaskar mamidi
>            Priority: Minor
>         Attachments: patch.329
>
>
> Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
> request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout
> Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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


[jira] Commented: (TS-329) delay seen in handling the client's request while running with accept thread

Posted by "vijaya bhaskar mamidi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862265#action_12862265 ] 

vijaya bhaskar mamidi commented on TS-329:
------------------------------------------

pipe signaling is broken on trunk,  it is working fine on 2.0.X as it is a different implementation . 

 ProtectedQueue::signal() should call the hook but it does not do it , we need to cleanup this code.

I think George's patch is committed on trunk, and i did my changes on trunk.

I am creating another bug for the cleanup and checking in this fix as this fixes the 30 msec latency we have on trunk.



> delay seen in handling the client's request while running with accept thread 
> -----------------------------------------------------------------------------
>
>                 Key: TS-329
>                 URL: https://issues.apache.org/jira/browse/TS-329
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: vijaya bhaskar mamidi
>            Priority: Minor
>         Attachments: patch.329
>
>
> Recent tests prove that while using accept thread, we do end up waiting for a period of time before handling the
> request from the client. This is because the signal is not delivered to a net thread to handle the new connection because of epoll_wait timeout
> Fix is to provide a schedule_imm_signal method which can be used in accept thread to signal a given net thread for handling new connections.

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