mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-24 20:04:28 +00:00
Reduce AsyncWorker default memory limit to 256MB
a worker shouldn't be using as much memory as the main server thread would, so 1024MB is extremely excessive.
This commit is contained in:
parent
2b5e6b790f
commit
5f7c884255
@ -1526,7 +1526,7 @@ class Server{
|
||||
$poolSize = (int) $poolSize;
|
||||
}
|
||||
|
||||
$this->asyncPool = new AsyncPool($this, $poolSize, (int) max(-1, (int) $this->getProperty("memory.async-worker-hard-limit", 1024)));
|
||||
$this->asyncPool = new AsyncPool($this, $poolSize, (int) max(-1, (int) $this->getProperty("memory.async-worker-hard-limit", 256)));
|
||||
|
||||
if($this->getProperty("network.batch-threshold", 256) >= 0){
|
||||
Network::$BATCH_THRESHOLD = (int) $this->getProperty("network.batch-threshold", 256);
|
||||
|
@ -40,7 +40,7 @@ memory:
|
||||
#AsyncWorker threads' hard memory limit in megabytes. Set to 0 to disable
|
||||
#This will crash the task currently executing on the worker if the task exceeds the limit
|
||||
#NOTE: THIS LIMIT APPLIES PER WORKER, NOT TO THE WHOLE PROCESS.
|
||||
async-worker-hard-limit: 1024
|
||||
async-worker-hard-limit: 256
|
||||
|
||||
#Period in ticks to check memory (default 1 second)
|
||||
check-rate: 20
|
||||
|
Loading…
x
Reference in New Issue
Block a user