ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-561

inefficient buffer management, inefficient gc, in NIOServer request handling

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: server
    • Labels:
      None

      Description

      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)

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        11d 4h 50m 1 Patrick Hunt 06/Nov/09 22:14
        Resolved Resolved Closed Closed
        139d 19h 10m 1 Patrick Hunt 26/Mar/10 17:25
        Patrick Hunt made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Patrick Hunt made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Hide
        Patrick Hunt added a comment -

        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

        Show
        Patrick Hunt added a comment - 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
        Patrick Hunt created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Patrick Hunt
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development