Rollback worker thread count to be Runtime#availableProcessors()

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-11-21 14:12:11 +01:00
parent 098885cc7f
commit 8005d2bb3f

View File

@ -16,8 +16,7 @@ import java.util.Arrays;
import java.util.List;
public final class Server {
public static final int WORKER_COUNT = Integer.getInteger("minestom.workers",
Math.max(1, Runtime.getRuntime().availableProcessors() / 2));
public static final int WORKER_COUNT = Integer.getInteger("minestom.workers", Runtime.getRuntime().availableProcessors());
public static final int MAX_PACKET_SIZE = Integer.getInteger("minestom.max-packet-size", 2_097_151); // 3 bytes var-int
public static final int SOCKET_SEND_BUFFER_SIZE = Integer.getInteger("minestom.send-buffer-size", 262_143);
public static final int SOCKET_RECEIVE_BUFFER_SIZE = Integer.getInteger("minestom.receive-buffer-size", 32_767);