You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/12/03 08:04:00 UTC

[jira] [Work logged] (DIRMINA-1152) IoServiceStatistics introduces huge latencies

     [ https://issues.apache.org/jira/browse/DIRMINA-1152?focusedWorklogId=689809&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-689809 ]

ASF GitHub Bot logged work on DIRMINA-1152:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Dec/21 08:03
            Start Date: 03/Dec/21 08:03
    Worklog Time Spent: 10m 
      Work Description: dmitriinovikov opened a new pull request #30:
URL: https://github.com/apache/mina/pull/30


   DIRMINA-1152: IoServiceStatistics introduces huge latencies - make IoServiceStatistics calculation configurable


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 689809)
    Remaining Estimate: 0h
            Time Spent: 10m

> IoServiceStatistics introduces huge latencies
> ---------------------------------------------
>
>                 Key: DIRMINA-1152
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1152
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.4, 2.1.5
>            Reporter: Dmitrii Novikov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Current implementation of IoServiceStatistics is blocking - it blocks on _throughputCalculationLock_ for almost all operations
> However, _IoServiceStatistics_ is used by all threads which writes to _IoSession_ and by all _NioProcessor_ threads.
> Blocking _IoServiceStatistics_ dramatically decreases performance in case of multithreaded writing to {_}IoSession{_}.
> Please, refer to my [benchmark|https://github.com/dmitriinovikov/apache-mina-benchmark] to ensure that it is so. The measurements are taken between the time the message was written to _IoSession_ by client and the time when it was actually sent to the server by _NioProcessor._ Latency percentiles are calculated for all messages except the first 20% - consider it as a warmup. You can read about benchmark details in the README file.
>  
> My benchmark results:
> {code:java}
> # non-blocking IoServiceStatistics vs blocking IoServiceStatistics:
> p50: 85mcs vs 140mcs
> p75: 150mcs vs 400mcs
> p90: 239mcs vs 905mcs
> p95: 319mcs vs 1418mcs
> p99: 1311mcs vs 11485mcs {code}
>  
> As a simple workaround solution, I would suggest to add an option to disable _IoServiceStatistics_ or replace it with custom implementation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org