[
https://issues.apache.org/jira/browse/IGNITE-4646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004263#comment-16004263
]
Yakov Zhdanov commented on IGNITE-4646:
---------------------------------------
[~gvvinblade] can you please share any benchmark results here?
> Try to unmarshall direct messages in striped pool
> -------------------------------------------------
>
> Key: IGNITE-4646
> URL: https://issues.apache.org/jira/browse/IGNITE-4646
> Project: Ignite
> Issue Type: Improvement
> Components: general
> Reporter: Yakov Zhdanov
> Assignee: Igor Seliverstov
> Fix For: 2.1
>
>
> During marshalling in NIO thread the following should be added to the write
> buffer and sent to peer:
> 1. chunk size - 16 bits (this probably puts limitation on max write buffer
> size of 64k or will require some changes to direct writer)
> 2. last chunk - 1 bit
> 3. pool policy - 8 bits
> Here is the scheme to explain how this should work.
> {noformat}
> [chunk size] [pool policy] [partition] [last flag] [chunk data] X <-- no more
> space in write buffer
> [next chunk size] [last flag] [chunk data] <<-- we write next chunk once some
> space is available in write buffer, but we skip partition and policy flags
> and maybe others that should be sent only once.
> ...
> ...
> [next chunk size] [last flag] [chunk data] <<-- last flag is true here
> {noformat}
> Examples
> Write buffer - 64k
> Message - 84k
> # sender reserves space for chunk size
> # reserves space for policy and last chunk flag
> # marshalls message to buffer while it has free space (64k - SPACE will be
> written to buffer)
> # puts size and flags to reserved space in the beginning
> # sends buffer or part of it which makes some space available to further
> writes
> # reserves space for next chunk size and flags
> # marshalls message to buffer while it has free space (lets assume the rest
> of message fits)
> # puts size and last=true to the reserved space and sends
> Receiver:
> # reads chunk size, stores the target pool and partition
> # allocates heap buffer and copies chunk data to it from read buffer
> # once all message chunks are fully read message should be submitted to a
> pool where it will be unmarshalled and processed
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)