From 8690905f7bcb32b12ba70ed722ee1bd29d268811 Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Tue, 15 Jun 2021 08:04:22 +0000 Subject: drop empty buffers instead of using small buffers --- jrt/src/com/yahoo/jrt/Supervisor.java | 10 ---------- jrt/src/com/yahoo/jrt/slobrok/server/Slobrok.java | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'jrt/src') 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 @@ -36,16 +36,6 @@ public class Supervisor { new MandatoryMethods(this); } - /** - * 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 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)); -- cgit v1.2.3