Problem Server lag/freezing on Chuck Load & Generation

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

XAM

New Member
Jul 29, 2019
14
0
0
My server is having huge issues with chunk loading and generation. If one person decides to travel fast in an already generated area it causes the server to lag a lot. So much everything freezes until it has loaded the chunks. And chunk generation is even worse (even with normal traveling speed). It can make the server unrespondable for minutes.

Server Specifications
AMD Athlon 64 X2 6000+ (3,0GHZ Socket AM2)
6GB DDR2
320GB HDD 7200rpm
Linux Debian 6.0.6 running Oracle Java 7u17 (64bit)
Ultimate Package with MCPC+ running without any Bukkit mods. Also running forge/mcpc version of dynmap on seriously tuned down settings. Only rendering the original world and only the surface with the normal-lowres template (Flat & Cave disabled).
Hosted on a 100/100 mbit fiber connection.

Server start parameter (After some googling and reading threads. Don't trust everything in this line is 100% correct.)
Code:
java -server -Xincgc -Xmx4G -Xms2G -Xmn1G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1
-XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC
-XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90
-XX:+UseConcMarkSweepGC -XX:UseSSE=3 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=2
-XX:+AggressiveOpts -XX:+UseLargePages -XX:ReservedCodeCacheSize=1G -cp mcpc.jar -jar mcpc.jar

Server also restarts every 24 hours.

Any help on what the cause of the super lag could be would be awesome. Also, the only reason I'm running mcpc+ is cause someone told me it could help with the server lag since it has spigot in it. So I'm also wondering if it's true that MCPC reduces server lag.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Is it only on chunk generation/large areas being loaded? Its likely your CPU or HDD, both are fairly old, I would suggest finding out the read/write speed of that drive along with the IOPS. IOPS is Input Output Per Second, solid state drives are extremely adept at all 3. If its not your hard drive try the command /tps. Servers are supposed to try and stay at 20, anything below 16 is considered quite bad. In that case look at a new CPU. Fair warning, thats an older CPU, so upgrading would mean a new motherboard and memory as well.
 

XAM

New Member
Jul 29, 2019
14
0
0
Is it only on chunk generation/large areas being loaded? Its likely your CPU or HDD, both are fairly old, I would suggest finding out the read/write speed of that drive along with the IOPS. IOPS is Input Output Per Second, solid state drives are extremely adept at all 3. If its not your hard drive try the command /tps. Servers are supposed to try and stay at 20, anything below 16 is considered quite bad. In that case look at a new CPU. Fair warning, thats an older CPU, so upgrading would mean a new motherboard and memory as well.
The lag is only during chunk generation/loading. It also depends on which world the player is in. Chunk loading in the regular world doesn't generate as much lag as if it was a mystcraft world. Twilight Forest loading casues a little more lag than the regular world.

TPS during world generation:
Code:
09:57:00 [INFO] [TPS] 20.0
>tps
09:57:24 [INFO] [TPS] 20.0
>tps
09:57:52 [INFO] [TPS] 20.0
>tps
09:57:54 [INFO] [TPS] 17.9
>tps
09:57:57 [INFO] [TPS] 18.9
>tps
09:58:03 [INFO] [TPS] 20.0

CPU/MEM during world generation:
CPU Usage: ~60-70%
MEM: 35%
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
I can see your TPS is holding fairly steady, with slight dips to below 18. For comparison, would you mind doing the same test again with this start script?

java -server -Xmx4G -Xms4G -jar mcpc.jar nogui

If that doesn't help then make a complete backup of your server, and carefully follow the directions on this page and do your test once more.

https://github.com/nallar/TickThreading/blob/master/INSTALL.md

If that doesn't help, then I am afraid its your HDD, in which case there is no easy fix except getting a new HDD or SSD.

Edit: If you do decide to get any new parts for your server, PM me and I will point you in the right direction.
 

XAM

New Member
Jul 29, 2019
14
0
0
I can see your TPS is holding fairly steady, with slight dips to below 18. For comparison, would you mind doing the same test again with this start script?

java -server -Xmx4G -Xms4G -jar mcpc.jar nogui

If that doesn't help then make a complete backup of your server, and carefully follow the directions on this page and do your test once more.

https://github.com/nallar/TickThreading/blob/master/INSTALL.md

If that doesn't help, then I am afraid its your HDD, in which case there is no easy fix except getting a new HDD or SSD.

Edit: If you do decide to get any new parts for your server, PM me and I will point you in the right direction.
Thanks, I will try that later.
Regarding computer parts I have a fair knowledge myself from building computers.
 

XAM

New Member
Jul 29, 2019
14
0
0
I've changed the launch parameters, it's somewhat better. But the freezing still occurs. But not as frequent as before.
Don't know if I want to use TickThreading as it could corrupt the world, even though I have automated backups. But I'll do it as a last resort.

Isn't it possible to do some tweaking with mcpc tick settings?
Code:
world-settings:
  default:
    growth-chunks-per-tick: 650
    mob-spawn-range: 4
    item-merge-radius: 3.5
    exp-merge-radius: 3.5
    random-light-updates: false
    aggregate-chunkticks: 4
    wheat-growth-modifier: 100
    cactus-growth-modifier: 100
    melon-growth-modifier: 100
    pumpkin-growth-modifier: 100
    sugar-growth-modifier: 100
    tree-growth-modifier: 100
    mushroom-growth-modifier: 100
    verbose: false
  world:
    growth-chunks-per-tick: 1000
  world_nether:
    view-distance: 5
    growth-chunks-per-tick: 0
    random-light-updates: true
    water-creatures-per-chunk: 0
spawn-limits:
  monsters: 70
  animals: 15
  water-animals: 5
  ambient: 15
chunk-gc:
  period-in-ticks: 600
  load-threshold: 0
ticks-per:
  animal-spawns: 400
  monster-spawns: 1
  autosave: 0
auto-updater:
  enabled: true
  on-broken:
  - warn-console
  - warn-ops
  on-update:
  - warn-console
  - warn-ops
  preferred-channel: rb
  host: dl.bukkit.org
  suggest-channels: true
database:
  username: bukkit
  isolation: SERIALIZABLE
  driver: org.sqlite.JDBC
  password: walrus
  url: jdbc:sqlite:{DIR}{NAME}.db
orebfuscator:
  enable: false
  update-radius: 2
  disabled-worlds:
  - world_the_end
 

XAM

New Member
Jul 29, 2019
14
0
0
So I installed TickThreading and my console is getting spammed by this:
Code:
04-10 14:07:01 [INFO] [TickThreading] Processed unload of 77 chunks in unload queue
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 28,17 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 0,214 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 14,210 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 34,-29 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 29,17 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 27,17 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at -3,210 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 34,-31 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 27,18 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 26,17 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 26,18 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 27,19 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 25,18 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 26,19 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 28,19 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 24,18 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 25,19 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 28,18 too early.
04-10 14:07:05 [WARNING] [TickThreading] Reloaded chunk at 24,19 too early.
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 901943132174
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 906238099453
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 77309411352
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 77309411353
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 73014444058
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload -124554051550
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 73014444059
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 77309411355
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 73014444060
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 73014444061
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 77309411354
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 81604378651
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 81604378652
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 81604378649
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 77309411356
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 81604378648
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 81604378650
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload -133143986142
04-10 14:07:05 [WARNING] [TickThreading] Couldn'nt unload 919123001344
04-10 14:07:05 [INFO] [TickThreading] Processed unload of 93 chunks in unload queue

Is this caues I have chunk loaders?