pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.24k stars 1.51k forks source link

Raising level "world" tick rate to 50 ticks #2031

Closed eqMFqfFd closed 6 years ago

eqMFqfFd commented 6 years ago

Issue description

The server laggs a lot when a player joins the server, and the console spams a level tick rate (debug is enabled). I do /status and the world ms is ~10,000

Steps to reproduce the issue

  1. Install a PocketMine-MP server
  2. Join the world. (also attempted deleting the world and letting PocketMine regenerate it)

OS and versions

Plugins

Crashdump, backtrace or other files

dktapps commented 6 years ago

Please use an up to date build. Older builds have bugs that may cause issues like this.

Also, it appears you have modified your configuration. Please link to it.

eqMFqfFd commented 6 years ago

pocketmine.yml

# Main configuration file for PocketMine-MP
# These settings are the ones that cannot be included in server.properties
# Some of these settings are safe, others can break your server if modified incorrectly
# New settings/defaults won't appear automatically in this file when upgrading.

settings:
 #Three-letter language code for server-side localization
 #Check your language code on https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
 language: "eng"
 #Whether to send all strings translated to server locale or let the device handle them
 force-language: true
 shutdown-message: "Sorry server crashed, try join again or let our staff know!"
 #Allow listing plugins via Query
 query-plugins: true
 #Show a console message when a plugin uses deprecated API methods
 deprecated-verbose: true
 #Enable plugin and core profiling by default
 enable-profiling: false
 #Will only add results when tick measurement is below or equal to given value (default 20)
 profile-report-trigger: 20
 #Number of AsyncTask workers.
 #Used for plugin asynchronous tasks, world generation, compression and web communication.
 #Set this approximately to your number of cores.
 #If set to auto, it'll try to detect the number of cores (or use 2)
 async-workers: 1

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: 9999

 #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: 9999

 #Main thread hard memory limit in megabytes. Set to 0 to disable
 #This will stop the server when the limit is surpassed
 main-hard-limit: 9999

 #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: 9999

 #Period in ticks to check memory (default 1 second)
 check-rate: 1

 #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: 1

 garbage-collection:
  #Period in ticks to fire the garbage collector manually (default 30 minutes), set to 0 to disable
  #This only affects the main thread. Other threads should fire their own collections
  period: 1

  #Fire asynchronous tasks to collect garbage from workers
  collect-async-worker: true

  #Trigger on low memory
  low-memory-trigger: true

 #Settings controlling memory dump handling.
 memory-dump:
  #Dump memory from async workers as well as the main thread. If you have issues with segfaults when dumping memory, disable this setting.
  dump-async-worker: true

 max-chunks:
  #Cap maximum render distance per player when low memory is triggered. Set to 0 to disable cap.
  chunk-radius: 80

  #Do chunk garbage collection on trigger
  trigger-chunk-collect: true

 world-caches:
  #Disallow adding to world chunk-packet caches when memory is low
  disable-chunk-cache: false
  #Clear world caches when memory is low
  low-memory-trigger: false

network:
 #Threshold for batching packets, in bytes. Only these packets will be compressed
 #Set to 0 to compress everything, -1 to disable.
 batch-threshold: 0
 #Compression level used when sending batched packets. Higher = more CPU, less bandwidth usage
 compression-level: 8
 #Use AsyncTasks for compression. Adds half/one tick delay, less CPU load on main thread
 async-compression: true
 #Experimental, only for Windows. Tries to use UPnP to automatically port forward
 upnp-forwarding: false
 #Maximum size in bytes of packets sent over the network (default 1492 bytes). Packets larger than this will be
 #fragmented or split into smaller parts. Clients can request MTU sizes up to but not more than this number.
 max-mtu-size: 1464

debug:
 #To enable assertion execution, set zend.assertions in your php.ini to 1
 assertions:
  #Warn if assertions are enabled in php.ini, due to assertions may impact on runtime performance if enabled.
  warn-if-enabled: true
 #If > 1, it will show debug messages in the console
 level: 2
 #Enables /status, /gc
 commands: true

player:
 #Choose whether to enable player data saving.
 save-player-data: true
 anti-cheat:
  #If false, will try to prevent speed and noclip cheats. May cause movement issues.
  allow-movement-cheats: false

level-settings:
 #The default format that levels will use when created
 default-format: pmanvil
 #Automatically change levels tick rate to maintain 20 ticks per second
 auto-tick-rate: true
 auto-tick-rate-limit: 50
 #Sets the base tick rate (1 = 20 ticks per second, 2 = 10 ticks per second, etc.)
 base-tick-rate: 1
 #Tick all players each tick even when other settings disallow this.
 always-tick-players: false

chunk-sending:
 #To change server normal render distance, change view-distance in server.properties.
 #Amount of chunks sent to players per tick
 per-tick: 80
 #Radius of chunks that need to be sent before spawning the player
 spawn-radius: 80

chunk-ticking:
 #Max amount of chunks processed each tick
 per-tick: 999
 #Radius of chunks around a player to tick
 tick-radius: 80
 light-updates: false
 clear-tick-list: true
 #IDs of blocks not to perform random ticking on.
 disable-block-ticking:
  #- 2 # grass

chunk-generation:
 #Max. amount of chunks in the waiting queue to be generated
 queue-size: 999
 #Max. amount of chunks in the waiting queue to be populated
 population-queue-size: 999

ticks-per:
 autosave: 1

auto-report:
 #Send crash reports for processing
 enabled: true
 send-code: true
 send-settings: true
 send-phpinfo: false
 use-https: true
 host: crash.pmmp.io

anonymous-statistics:
 #Sends anonymous statistics for data aggregation, plugin usage tracking
 enabled: false #TODO: re-enable this when we have a new stats host
 host: stats.pocketmine.net

auto-updater:
 enabled: false
 on-update:
  warn-console: true
  warn-ops: true
 #Can be development, alpha, beta or stable.
 preferred-channel: beta
 #If using a development version, it will suggest changing the channel
 suggest-channels: true
 host: update.pmmp.io

timings:
 #Choose the host to use for viewing your timings results.
 host: timings.pmmp.io

console:
 #Choose whether to enable server stats reporting on the console title.
 #NOTE: The title ticker will be disabled regardless if console colours are not enabled.
 title-tick: true

aliases:
 #Examples:
 #showtheversion: version
 #savestop: [save-all, stop]

worlds:
 #These settings will override the generator set in server.properties and allows loading multiple levels
 #Example:
 #world:
 # seed: 404
 # generator: FLAT:2;7,59x1,3x3,2;1;decoration(treecount=80 grasscount=45)
dktapps commented 6 years ago

Closing due to absurd configuration.

Some of these settings are safe, others can break your server if modified incorrectly

eqMFqfFd commented 6 years ago

Couldn't agree more with you, I'm going to test using the default pocketmine.yml file. I will only need to set the MTU size to 1464 due to the "no session opened" RakLibServer issue.

eqMFqfFd commented 6 years ago

The issue is still ocurring.

Level "world" took 23369ms, setting tick rate to 20 ticks