1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Optimization for Large Servers aka PMMP vs. Genisys and The Future

Discussion in 'General discussion' started by MK500, Nov 21, 2016.

  1. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    I'd like to preface this with a big thank you to dktapps, Intyre, and all the others that have revived PocketMine-MP from stagnation. You have put massive effort into this; and it is greatly appreciated.

    My background: I provide a great deal of technical assistance to a popular non-profit (no donations) factions server that has been running for over a year. The world is over 20GB in size. Over a million players have registered.

    A little history from my perspective:
    Around the time of the PHP7 changeover; PocketMine-MP development began to slow considerably. Shoghicp was hired by Mojang, and too busy to really push forward. At the same time, a company in China open sourced a heavily modified version of PocketMine-MP that I understand they had been using to run their own servers. This was/is iTXTech/Genisys.

    At that time the server I work with was regularly running 60+ players. Our hardware is maximum performance available (3.5Ghz Xeons, 8 cores, 12GB RAM, SSD). With PocketMine-MP, over 30 players would generally begin to lag. Most of the other server operators at that time agreed that vanilla PocketMine-MP was really only "good" for around 30 players per server. It was quite easy to watch the TPS drop as players joined beyond 30. This was quite frustrating; because no amount of configuration optimizing would help. I began testing Genisys at this time; and was amazed that it performed well at up to 60 players (close to 20 TPS).

    My understanding is that dktapps took over as the primary developer/administrator of Genisys in the last few months. And now, with the help of Intyre and others, he has also "rebooted" PocketMine-MP as PMMP. I am excited by this development; but also concerned about a few things. I'm hoping dktapps (and other top contributors) might take a few moments to respond in this thread to the following:

    1) As you are cleaning up and fixing code; how high of a priority for you is performance optimization for large servers (30-60 players)? Is this a scenario you actively test against?
    2) As an expert on the code base of both PM and Genisys; do you have an understanding of why Genisys was/is so much more efficient? I'd love to understand this better.
    3) If PMMP is to become the standard bearer again; what innovations do you expect to bring back into PMMP from the "spoons"? I have suggestions; but will stop here to hear your thoughts.

    Thanks again for all the hard work you all give freely to the community.
     
    Levi and XenialDan like this.
  2. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    1. From what I've read, yes
    2. Dktapps manages a "Spoon" so yes
    3. Refer to 2
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Depending on your definition, we are cleaning up some code, and planning to rewrite some dirty code like the inventory code.
    Performance is always of utmost importance.
    There are plans to adopt Genisys's changes gradually into pmmp, in the condition that the code must be clean.
    What did you mean by "innovations"?
    Many spoons are packed with simple features like weather, or more complex features like redstone, but most are written badly. Apart from performance, clean code is also cherished, so we may be adding features more slowly, since the time required for planning may be longer.
     
    Last edited: Nov 21, 2016
    archie426, Lambo and HimbeersaftLP like this.
  4. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    Thanks for the thoughtful response. That is reassuring.

    This makes sense. By innovation I mean developer friendly features like running from source, as well as the features you mentioned (weather, redstone, minecart, enchantment, proxy server support, etc.). I can understand wanting these features to be well written; and clean code is indeed cherished by all.

    Thanks again.
     
    HimbeersaftLP and SOFe like this.
  5. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Also, just a quick note about performance: If you can get 4+Ghz with 4 cores that would be better for PocketMine.
     
  6. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    I hear you; but Xeons don't come in 4Ghz varieties. And high end hosting facilities tend to favor server class equipment; which is how they ended up with the Xeon.

    In our early days (prior to moving to the spoon), I realized single thread speed was what it was all about for PocketMine-MP. And we even tried running on a 4.2Ghz workstation instead of the server for a bit. It did help. But not enough. 4.2Ghz got us 20% more performance than 3.5Ghz; so we could comfortably run about 40 players instead of 30.

    But the spoon got us to 60 and was fine on the 3.5Ghz Xeon. It's not a hardware issue; it's code.
     
  7. Jack Noordhuis

    Jack Noordhuis Zombie Pigman Poggit Reviewer

    Messages:
    618
    GitHub:
    JackNoordhuis
    Bringing something like pocketmine-soft back in the future to remove features that aren't needed and hinder performance would be good :)
     
    Levi and imYannic like this.
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    I didn't know that PocketMine-Soft removed features. I only saw it adding advanced features.
     
    Primus likes this.
  9. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    This is a good idea; but the spoon did prove that you can have both many more features AND much better performance. So I'm hoping whatever those optimizations were...they make it back into PMMP. And it certainly sounds like that is the plan.
     
  10. Jack Noordhuis

    Jack Noordhuis Zombie Pigman Poggit Reviewer

    Messages:
    618
    GitHub:
    JackNoordhuis
    Yea, I was mainly thinking about other spoons/forks that removed or improved the performance os some features. My mistake :p
     
    Levi likes this.
  11. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    There shouldn't be any need for two different versions (Soft vs normal). If the core was modular as it should be, there wouldn't be any need for two of them.

    As for G*nisys vs PocketMine, I find your assessment quite surprising. G*nisys has always been significantly more laggy than PocketMine has for me.
     
    Infernus101 and SOFe like this.
  12. Primus

    Primus Zombie Pigman

    Messages:
    749
    What about katana?
     
  13. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Katana was a stripped-back everything with a lot of otherwise critical core features removed, specifically for the use of LBSG.

    https://github.com/Hydreon/Katana#design-philosophy
     
    SOFe and Primus like this.
  14. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    I'm with dktapps here, i cannot understand that you have worse performance with PM than Genisys. Try using the same pocketmine.yml settings maybe?
     
  15. Lambo

    Lambo Spider

    Messages:
    14
    GitHub:
    Lambo16
    The certain spoon that starts with a G wasn't very good in my opinion and caused many problems that were very annoying to me. I'd rather wait for a proper, working version of PocketMine instead of using that. I understand that this isn't possible for larger server networks though.
     
    Jack Noordhuis likes this.
  16. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    This was kind of the answer I was worried about. There is something(s) that was tweaked for large player count servers in the G* code when it was used for the large Chinese severs. I do not know what this is; but it is something significant.

    I have spend many hundreds of hours testing and tweaking both; and can assure you PocketMine was not working well at all in that 40-60 player range. As I explained in my first post; when I made the change to G*, many other server owners and admins were advising me they had the same problems. As it happened development had almost halted on PM at that time; so moving to the active developer community at G* was relatively painless. I was willing to put up with a lot of bugs for the performance improvements.

    There were desperate measures that could be taken to help things along with PocketMine; such as basically turning crop growth down so low that farming would be impossible.

    I'm curious if any other large factions server maintainers could chime in: Is anyone using PocketMine right now? What kind of TPS are you seeing at approximately 60 players? My experience shortly after the PHP7 changeover was around 8 or 9 TPS on a large world factions server -- with dips to 5. On that same server I was averaging 18 to 20 on G*.

    Sadly many servers are strictly tiny worlds or minigames these days; so maybe large-world factions servers like ours aren't something people are concerned about.

    For the time being; MANY thanks to dktapps for continuing to maintain G* in parallel. I will certainly begin testing PMMP in earnest to see if we could move back. But I'm worried.
     
  17. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Please test PMMP at first, and if it really has worse performance, please try to use the same pocketmine.yml settings.
     
  18. imYannic

    imYannic Baby Zombie

    Messages:
    113
    Katana is outdated, do you mean Steadfast2?
     
  19. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    I had 100 players on a server about a month ago using PocketMine, and it was still very playable. There was a short period when I felt that PocketMine had fallen behind G*nisys performance-wise, but that was before PHP7 and when the current Team took over, and didn't last long.

    One rather important thing that you forgot to mention is what kind of network speeds your host provides, and where the server is in relation to your players. There are other factors too that might be causing you problems such as poorly misconfigured PHP, pocketmine.yml as you already know, badly written plugins and corrupt maps for example. If you ran timings tests and everything looked OK then the most likely culprit is probably not PocketMine but your network.

    Here's the hardware that I've found works the best for me - the server I mention above only had 2GB RAM allocated at the time:

    CPU: Intel Core i7-4790K 4c/8t 4.0 GHz/4.4 GHz
    RAM: 32 GB DDR3 1333 MHz
    Disks: SSD
    Network: 1 Gbps
     
    Last edited: Dec 4, 2016
  20. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    4Ghz is indeed awesome for PM. The rest is pretty not-so-effective. (SSDs can help though)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.