Added MemoryManager, new memory properties, improved performance, updated RakLib, fixed misc. bugs

This commit is contained in:
Shoghi Cervantes
2015-04-18 20:13:52 +02:00
parent ddc152ae0a
commit b2c25eaf36
32 changed files with 652 additions and 164 deletions

View File

@ -21,7 +21,48 @@ settings:
#Number of AsyncTask workers.
#Used for plugin asynchronous tasks, world generation, compression and web communication.
#Set this approximately to your number of cores.
async-workers: 2
#If set to auto, it'll try to detect the number of cores (or use 2)
async-workers: auto
memory:
#Global soft memory limit in megabytes. Set to 0 to disable
#This will trigger low-memory-triggers and fire an event to free memory when the usage goes over this
global-limit: 512
#Main thread soft memory limit in megabytes. Set to 0 to disable
#This will trigger low-memory-triggers and fire an event to free memory when the usage goes over this
main-limit: 320
#Period in ticks to check memory (default 1 second)
check-rate: 20
#Continue firing low-memory-triggers and event while on low memory
continuous-trigger: true
#Only if memory.continuous-trigger is enabled. Specifies the rate in memory.check-rate steps (default 30 seconds)
continuous-trigger-rate: 30
garbage-collection:
#Period in ticks to fire the garbage collector manually (default 10 minutes), set to 0 to disable
#This only affect the main thread. Other threads should fire their own collections
period: 12000
#Fire asynchronous tasks to collect garbage from workers
collect-async-worker: true
#Trigger on low memory
low-memory-trigger: true
max-chunks:
#Limit of chunks to load per player, overrides chunk-sending.max-chunks
trigger-limit: 96
#Trigger on low memory
low-memory-trigger: true
world-caches:
disable-chunk-cache: true
low-memory-trigger: true
network:
#Threshold for batching packets, in bytes. Only these packets will be compressed
@ -51,9 +92,9 @@ level-settings:
chunk-sending:
#Amount of chunks sent to players per tick
per-tick: 8
per-tick: 4
#Amount of chunks sent around each player
max-chunks: 256
max-chunks: 192
#Amount of chunks that need to be sent before spawning the player
spawn-threshold: 56
#Save a serialized copy of the chunk in memory for faster sending