[
https://issues.apache.org/jira/browse/DIRMINA-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674171#action_12674171
]
Serge Baranov commented on DIRMINA-663:
---------------------------------------
I found the root case of the problem. Between M3 and M4 the static initializer
has been removed from DefaultSocketSessionConfig.java.
This initializer was setting the default session config parameters taken from
the platform defaults.
Since M4 the hardcoded defaults are used instead of the platform defaults.
In my particular case the hardcoded receive buffer size = 1024 was causing this
performance problem. The system default taken from the socket is 8192.
I can now easily fix the problem by adding this code to the test case:
acceptor.getSessionConfig().setReceiveBufferSize(8192);
It actually works fine with values larger than 1024, like 2048 or 4096.
In the commit comments I see that this code was removed because it causes
problems with Applet or on Vista which is: DIRMINA-638.
There is already a comment with exactly the same problem as I've submitted here.
https://issues.apache.org/jira/browse/DIRMINA-638?focusedCommentId=12667699#action_12667699
Current issue can be closed as the duplicate of DIRMINA-638.
> CumulativeProtocolDecoder doDecode performance problem
> ------------------------------------------------------
>
> Key: DIRMINA-663
> URL: https://issues.apache.org/jira/browse/DIRMINA-663
> Project: MINA
> Issue Type: Bug
> Components: Filter
> Affects Versions: 2.0.0-RC1
> Environment: JDK 1.6.0_12 32-bit, Windows Vista 64-bit, MINA
> 2.0.0-RC1 (up to current date trunk).
> Reporter: Serge Baranov
> Priority: Critical
> Attachments: tdump.txt
>
>
> To reproduce get the mina_test_2.0.zip from DIRMINA-609.
> It seems to be working even worse with the current trunk version, it takes ~5
> seconds between messages and then times out after the first message, if wait
> is increased to 10 seconds, it times out after the second message:
> time = 03:49:36.320
> remaining = 1024
> limit = 1024
> capacity = 2048
> time = 03:49:41.619
> remaining = 2048
> limit = 2048
> capacity = 2097156
> java.lang.AssertionError: No message received
> The issue differs from DIRMINA-609 as it affects not only large messages, but
> any message that doesn't fit into buffer (when doDecode returns false) and
> also all the subsequent messages (when doDecode returns true).
> It's a serious issue making CumulativeProtocolDecoder completely useless.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.