Skip to content

Commit 9299c66

Browse files
committed
Update config defaults (#69)
1 parent e3a0464 commit 9299c66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/me/lucko/bytebin/Bytebin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public Bytebin(Configuration config) throws Exception {
112112
// setup executor
113113
Thread.setDefaultUncaughtExceptionHandler(ExceptionHandler.INSTANCE);
114114
this.executor = Executors.newScheduledThreadPool(
115-
config.getInt(Option.EXECUTOR_POOL_SIZE, 16),
115+
config.getInt(Option.EXECUTOR_POOL_SIZE, 64),
116116
new ThreadFactoryBuilder().setNameFormat("bytebin-io-%d").build()
117117
);
118118

@@ -174,11 +174,11 @@ public Bytebin(Configuration config) throws Exception {
174174
serverOpts.setPort(config.getInt(Option.PORT, 8080));
175175
serverOpts.setCompressionLevel(null);
176176
serverOpts.setMaxRequestSize((int) maxContentLength);
177-
serverOpts.setIoThreads(config.getInt(Option.IO_THREADS, 32));
178-
serverOpts.setWorkerThreads(config.getInt(Option.EXECUTOR_POOL_SIZE, 32));
177+
serverOpts.setIoThreads(config.getInt(Option.IO_THREADS, 16));
178+
serverOpts.setWorkerThreads(config.getInt(Option.EXECUTOR_POOL_SIZE, 64));
179179

180180
ExecutionMode executionMode = ExecutionMode.valueOf(
181-
config.getString(Option.EXECUTION_MODE, "EVENT_LOOP").toUpperCase(Locale.ROOT)
181+
config.getString(Option.EXECUTION_MODE, "WORKER").toUpperCase(Locale.ROOT)
182182
);
183183

184184
this.server = new JettyServer(serverOpts);

0 commit comments

Comments
 (0)