[
https://issues.apache.org/jira/browse/DIRMINA-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790224#comment-13790224
]
Henning Rohlfs commented on DIRMINA-948:
----------------------------------------
Just wanted to comment that this is not just a theoretical problem. On our
production systems we had CPU spikes (100% cpu over minutes or longer) several
times a week. We identified Mina (and more specifically the size() method of
ConcurrentLinkedQueue) as culprit. Changing the call to isEmpty() did eliminate
these problems.
> Performance recession when invoke session.write concurrent
> ----------------------------------------------------------
>
> Key: DIRMINA-948
> URL: https://issues.apache.org/jira/browse/DIRMINA-948
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.7
> Reporter: Mark
> Labels: performance
>
> In org.apache.mina.core.filterchainDefaultIoFilterChain, code around line
> number 600,
> <code>if (writeRequestQueue.size() == 0 )</code>
> will raise performance problem in high concurrent situation, Mina default use
> ConcurrentLinkedQueue as writeRequestQueue, but size() of this queue is not a
> constant-time operation, suggest to use <code>if
> (writeRequestQueue.isEmpty(s))</code> instead of it.
--
This message was sent by Atlassian JIRA
(v6.1#6144)