So I have made a server with about 30-70 players online and 4 GB of RAM. My issue is that my server freezes every 1-2 seconds for 0.5 seconds. I thought the main owner and developer fixed that issue but he actually made the server freeze for less than before. There were almost 14k chunks saved in the Lobby world when only 22 of them were needed. We restored a backup of that level/world and disabled auto saving through a plugin. The chunks are still 22 so the lag is kinda fixed but as I said before, it still lags for 0.5 seconds every 1-2 seconds. All the plugins are custom so we are sure there are no plugins that sleep(0.5) every 40 ticks. Here is how the lag looks like: Skip to 55:31 Already asked my host provider and the owner told me it may be a plugin bug or the server software. Note: My server's TPS drops to 3 or 2 when the server starts and the players join a SkyWars arena.
Sounds like a heavy plugin, or maybe a light plugin but the hardware couldn't keep up with it. Do you have more CPU specs?
I use RAMShard, there is no information like that provided. It is a SkyWars plugin with over 10k lines of code, an addon for it with 1k lines of code, LobbyCore with 5k lines of code (some of them are not in use though) and some other simple plugins like BuycraftPM, an antispam plugin, your world edit plugin, the addon the main owner made for that, pureperms, purechat... hmm those seem a lot. I will remove those that are not in use and let you know.
Removed like 7 or more. Here is what I get when running /plugins: Plugins (15): Slapper v1.4.0, ColorfulArmor v1.0.0, DevTools v1.13.0, Fireworks v1.0.2, AlwaysDay v2.0.0, PurePerms v1.4.2, MentionsPlus v1.0.0, Broadcaster v1.5, MultiWorld v1.4.3, SlapperRotation v1.2.0, PureChat v1.4.11, LobbyCore v1.0.0, HyperSkyWars v0.8dev, SkyWarsAddon v1.0.0, NameTagFixer v1 Only MultiWorld is not actually in-use but we may use it for trolls, who knows. The TPS was still 20, checked 2 minutes after I restart the server. After 5 minutes it dropped to 6. Maybe the server overloads with the worlds of the arenas? Would I unload them when a game ends? The skywars plugin is based on SW_svile, so the arena system is pretty much the same.
The TPS is 20 now, I don't really know why. This is what I get when running /status Code: 21.08 13:58:08 [Server] Server thread/INFO ---- Server status ---- 21.08 13:58:08 [Server] Server thread/INFO Uptime: 17 minutes 21 seconds 21.08 13:58:08 [Server] Server thread/INFO Current TPS: 20 (21.69%) 21.08 13:58:08 [Server] Server thread/INFO Average TPS: 18.51 (25.94%) 21.08 13:58:08 [Server] Server thread/INFO Network upload: 0 kB/s 21.08 13:58:08 [Server] Server thread/INFO Network download: 0 kB/s 21.08 13:58:08 [Server] Server thread/INFO Thread count: 14 21.08 13:58:08 [Server] Server thread/INFO Main thread memory: 104 MB. 21.08 13:58:08 [Server] Server thread/INFO Total memory: 200 MB. 21.08 13:58:08 [Server] Server thread/INFO Total virtual memory: 1,204 MB. 21.08 13:58:08 [Server] Server thread/INFO Heap memory: 3 MB. 21.08 13:58:08 [Server] Server thread/INFO Maximum memory (system): 1,204 MB. 21.08 13:58:08 [Server] Server thread/INFO World "Lobby": 288 chunks, 16 entities, 345 tiles. Time 1.71ms 21.08 13:58:08 [Server] Server thread/INFO World "Winterhelm": 9 chunks, 0 entities, 8 tiles. Time 0.01ms 21.08 13:58:08 [Server] Server thread/INFO World "Martian": 0 chunks, 0 entities, 0 tiles. Time 0.01ms 21.08 13:58:08 [Server] Server thread/INFO World "Tribute": 0 chunks, 0 entities, 0 tiles. Time 0.01ms 21.08 13:58:08 [Server] Server thread/INFO World "Elven": 274 chunks, 5 entities, 58 tiles. Time 0.54ms 21.08 13:58:08 [Server] Server thread/INFO World "Congo": 336 chunks, 39 entities, 54 tiles. Time 1.64ms 21.08 13:58:08 [Server] Server thread/INFO World "Dragonice": 250 chunks, 8 entities, 59 tiles. Time 1.74ms 21.08 13:58:08 [Server] Server thread/INFO World "Shire": 225 chunks, 7 entities, 58 tiles. Time 0.61ms 21.08 13:58:08 [Server] Server thread/INFO World "Onionring": 224 chunks, 3 entities, 48 tiles. Time 0.34ms 21.08 13:58:08 [Server] Server thread/INFO World "Aegis": 341 chunks, 14 entities, 52 tiles. Time 2.16ms 21.08 13:58:08 [Server] Server thread/INFO World "Fossil": 0 chunks, 0 entities, 0 tiles. Time 0.01ms 21.08 13:58:08 [Server] Server thread/INFO World "Tribal": 0 chunks, 0 entities, 0 tiles. Time 0.01ms 21.08 13:58:08 [Server] Server thread/INFO World "Memorial": 305 chunks, 8 entities, 47 tiles. Time 1.37ms The CPU is not the issue, it is maybe the plugins or the worlds and who knows?, maybe PocketMine. The main owner asked the host provider so there is nothing related to the host.
Do /timings on /timings off /timings paste . Note : Its not always your server. It can be your device too
Sorry for the bump. I fixed this issue but... there is a new one and I do not want to create a new thread for that. The server lags. Like the sleep() function. I have 5 GBs of RAM which are a lot, a very fast internet connection (1GB upload) and pretty good written plugins. I also have one of the better CPUs out there. This would be another type of DDoSing since I already had an issue that did not allow the players to join but, dktapps helped me resolve it. The DDoSer did not message me again for asking money so I am not sure if it is that. This occurs after the Team SkyWars update we made, but the fun fact is that it does not happen all the time like before (first post here - check the video), it happens in random periods which makes me think it is not a plugin issue and it is DDoSing. The plugin uses the same system with the Solo SkyWars plugin, which means only a couple of things are changed. The TPS is 20 all the time when I run /status and I do not think I can get the RAM in use with PocketMine. Any ideas?