You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2009/11/06 23:16:32 UTC

[jira] Resolved: (ZOOKEEPER-561) inefficient buffer management, inefficient gc, in NIOServer request handling

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt resolved ZOOKEEPER-561.
------------------------------------

    Resolution: Invalid

turns out this is best even though not great. buffer mgmt would prolly be worse than letting the gc
handle it - also we need to alloc buffers because the data is passed to many threads

> inefficient buffer management, inefficient gc, in NIOServer request handling
> ----------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-561
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-561
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Patrick Hunt
>             Fix For: 3.3.0
>
>
> for every request we allocate a buffer to read the body. in most cases the request (say for get) will be very small, but we
> always allocate a new buffer to store the request.
> There should be a way to improve the buffer handling here. In particular it seems that if we have a buffer of reasonable
> length (1k) preallocated we could use this to service all requests <= 1k and only allocate when requests are larger. seems
> like this would handle a large fraction of the requests we typically see (except for large sets for example)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.