You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Huanwen Qu (JIRA)" <ji...@apache.org> on 2015/02/05 15:25:35 UTC

[jira] [Commented] (DIRMINA-934) Replace synchronized with a Semaphore for better performance

    [ https://issues.apache.org/jira/browse/DIRMINA-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14307253#comment-14307253 ] 

Huanwen Qu commented on DIRMINA-934:
------------------------------------

This is definitely an important change that should be described in the release note. If we put ProtocolCodecFilter after ExcutorServiceFliter, the ProtocolCodecFilter will block the concurrent execution of the worker threads due to the semaphore lock. There is no such problem in 2.0.7. We met this issue in our production and it cost us a lot of time to find out the root cause. It's too bad.

> Replace synchronized with a Semaphore for better performance
> ------------------------------------------------------------
>
>                 Key: DIRMINA-934
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-934
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.7, 2.0.8
>         Environment: Window 8 Pro x64, JDK 7
>            Reporter: Paul Gregoire
>              Labels: patch
>             Fix For: 2.0.8
>
>         Attachments: ProtocolCodecFilterWithSemaphoreAndMore.diff
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Replacing the synchronized block with a Semaphore in the ProtocolCodecFilter provides a lot of benefit in terms of locking and also reduces CPU utilization. See attached git diff.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)