Pocketmine-mp: Server use only one core

Created on 11 Jan 2018  路  11Comments  路  Source: pmmp/PocketMine-MP

Issue description

For some reason my server use only one core.
image

OS and versions

  • PocketMine-MP: a0683db
  • PHP: 7.2.1
  • Server OS: Linux Debian 8.6 jessie
Invalid

Most helpful comment

Due to the nature of PHP pthreads it is particularly inconvenient to do anything about this. If you search this issue tracker, the old repo issue tracker, and countless forks and spoons, you will find that the same question has been asked many times. I don't care to go into detail on why PHP threading is such a pain in the ass.

Work is being done to break things down into more independent things that can be threaded, however this is ongoing and extensive work, and again due to the nature of PHP pthreads has to be kept away from anything involving plugins. Don't expect magic.

Things such as network chunk serialization and compression use the async workers, as does level generation. Work is planned for the future to split network into more threads (zlib compress/decompress has a drastic impact on performance) and testing is in process to move chunk I/O onto per-level threads (see #1895).

For getting the best out of PocketMine as it is now, I suggest you read this: http://forums.pocketmine.net/threads/importance-on-hardware-memory.9379/
It's a few years old, but still very much relevant.

All 11 comments

Why "Invalid"?

check your pocketmine.yml and set the cores to 4

im

@Frago9876543210 Yes.

I already had it installed in the config.

It's invalid because it's not a bug.

You're far from the first person to notice this. PocketMine is well known for being main-thread biased.

@dktapps what can you recommend?

@Frago9876543210 Get a good CPU with high GHz per core.

Due to the nature of PHP pthreads it is particularly inconvenient to do anything about this. If you search this issue tracker, the old repo issue tracker, and countless forks and spoons, you will find that the same question has been asked many times. I don't care to go into detail on why PHP threading is such a pain in the ass.

Work is being done to break things down into more independent things that can be threaded, however this is ongoing and extensive work, and again due to the nature of PHP pthreads has to be kept away from anything involving plugins. Don't expect magic.

Things such as network chunk serialization and compression use the async workers, as does level generation. Work is planned for the future to split network into more threads (zlib compress/decompress has a drastic impact on performance) and testing is in process to move chunk I/O onto per-level threads (see #1895).

For getting the best out of PocketMine as it is now, I suggest you read this: http://forums.pocketmine.net/threads/importance-on-hardware-memory.9379/
It's a few years old, but still very much relevant.

I use top server from them.. performance is bad!! when comes to load 40+ players.. Better go to ovh directly @kenygamer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XDqrkneZ picture XDqrkneZ  路  3Comments

JoshuaACasey picture JoshuaACasey  路  3Comments

dktapps picture dktapps  路  3Comments

sergeysova picture sergeysova  路  3Comments

Ox531 picture Ox531  路  3Comments