Skip to content

Commit

Permalink
#8161 add mod and xml config to configure RetainableByteBufferPool
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
  • Loading branch information
lorban committed Jun 14, 2022
1 parent 00e33d6 commit 7a0b80c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.io.ArrayRetainableByteBufferPool">
<Arg type="int"><Property name="jetty.retainableByteBufferPool.minCapacity" default="0"/></Arg>
<Arg type="int"><Property name="jetty.retainableByteBufferPool.factor" default="-1"/></Arg>
<Arg type="int"><Property name="jetty.retainableByteBufferPool.maxCapacity" default="-1"/></Arg>
<Arg type="int"><Property name="jetty.retainableByteBufferPool.maxBucketSize" default="2147483647"/></Arg>
<Arg type="long"><Property name="jetty.retainableByteBufferPool.maxHeapMemory" default="0"/></Arg>
<Arg type="long"><Property name="jetty.retainableByteBufferPool.maxDirectMemory" default="0"/></Arg>
</New>
</Arg>
</Call>
</Configure>
31 changes: 31 additions & 0 deletions jetty-server/src/main/config/modules/retainablebytebufferpool.mod
@@ -0,0 +1,31 @@
[description]
Configures the RetainableByteBufferPool used by ServerConnectors.

[tags]
retainableByteBufferPool

[xml]
etc/jetty-retainablebytebufferpool.xml

[ini-template]
## Minimum capacity of a single ByteBuffer.
#jetty.retainableByteBufferPool.minCapacity=0

## Maximum capacity of a single ByteBuffer.
## Requests for ByteBuffers larger than this value results
## in the ByteBuffer being allocated but not pooled.
#jetty.retainableByteBufferPool.maxCapacity=65536

## Bucket capacity factor.
## ByteBuffers are allocated out of buckets that have
## a capacity that is multiple of this factor.
#jetty.retainableByteBufferPool.factor=1024

## Maximum size for each bucket.
#jetty.retainableByteBufferPool.maxBucketSize=2147483647

## Maximum heap memory retainable by the pool (0 for heuristic, -1 for unlimited).
#jetty.retainableByteBufferPool.maxHeapMemory=0

## Maximum direct memory retainable by the pool (0 for heuristic, -1 for unlimited).
#jetty.retainableByteBufferPool.maxDirectMemory=0

0 comments on commit 7a0b80c

Please sign in to comment.