mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-25 12:23:48 +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;
|
$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){
|
if($this->getProperty("network.batch-threshold", 256) >= 0){
|
||||||
Network::$BATCH_THRESHOLD = (int) $this->getProperty("network.batch-threshold", 256);
|
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
|
#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
|
#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.
|
#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)
|
#Period in ticks to check memory (default 1 second)
|
||||||
check-rate: 20
|
check-rate: 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user