diff options
author | Håvard Pettersen <havardpe@oath.com> | 2021-06-15 08:04:22 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2021-06-15 08:12:54 +0000 |
commit | 8690905f7bcb32b12ba70ed722ee1bd29d268811 (patch) | |
tree | 7f781a08cdc60843b3b215d58743759f249f34b9 /jrt | |
parent | 4521c56ba2f790999a96feb3e7cb2d5bd9134f2b (diff) |
drop empty buffers instead of using small buffers
Diffstat (limited to 'jrt')
-rw-r--r-- | jrt/src/com/yahoo/jrt/Supervisor.java | 10 | ||||
-rw-r--r-- | jrt/src/com/yahoo/jrt/slobrok/server/Slobrok.java | 2 |
2 files changed, 1 insertions, 11 deletions
diff --git a/jrt/src/com/yahoo/jrt/Supervisor.java b/jrt/src/com/yahoo/jrt/Supervisor.java index d7c2c83ea69..5975e191a5b 100644 --- a/jrt/src/com/yahoo/jrt/Supervisor.java +++ b/jrt/src/com/yahoo/jrt/Supervisor.java @@ -37,16 +37,6 @@ public class Supervisor { } /** - * Will optimize buffers size for small memory footprint - * Use this when you have many connections with very little traffic. - **/ - public Supervisor useSmallBuffers() { - setMaxInputBufferSize(SMALL_INPUT_BUFFER_SIZE); - setMaxOutputBufferSize(SMALL_OUTPUT_BUFFER_SIZE); - return this; - } - - /** * Drop empty buffers. This will reduce memory footprint for idle * connections at the cost of extra allocations when buffer space * is needed again. diff --git a/jrt/src/com/yahoo/jrt/slobrok/server/Slobrok.java b/jrt/src/com/yahoo/jrt/slobrok/server/Slobrok.java index 854cd973e4d..6d66a38406a 100644 --- a/jrt/src/com/yahoo/jrt/slobrok/server/Slobrok.java +++ b/jrt/src/com/yahoo/jrt/slobrok/server/Slobrok.java @@ -39,7 +39,7 @@ public class Slobrok { public Slobrok(int port) throws ListenFailedException { // NB: rpc must be single-threaded - orb = new Supervisor(new Transport("slobrok-" + port, 1)).useSmallBuffers(); + orb = new Supervisor(new Transport("slobrok-" + port, 1)).setDropEmptyBuffers(true); registerMethods(); try { listener = orb.listen(new Spec(port)); |