#Server heavy lag, hundreds of ticks behind

55 messages · Page 1 of 1 (latest)

thorn bay
#

My server keeps showing that its 100-500+ ticks behind, dont know whats causing it

weary oriole
#

Hi there!
Are you experiencing any lag on the server?
If that's the case, next time it happens and you could run a spark report that can really help us figure out what might be going on!

#

!spark

wraith ironBOT
#

Spark
How to provide a Spark sampler.

  1. Stop your server.
  2. Download Spark: https://spark.lucko.me/download
  3. Upload the mod to your server:
    Filemanager > mods (for modded servers)
    or Filemanager > plugins (for plugin based servers)
    (Just drag & drop the file)
  4. Start the server.
  5. Use the command /spark profiler --only-ticks-over 70
  6. Wait 10-15 minutes.
  7. Use the command /spark profiler stop
  8. Copy the link it generates and paste it here.
sour trout
#

@thorn bay Do you still need help with this at all? grabbing that spark report whilst your having lag is a great place to start and will help us dive into troubleshooting.

thorn bay
#

Hi yes sorry, i posted this last night and just woke up. Ill get the spark report as soon as i can.

sour trout
#

That would be awesome

thorn bay
#

just downloaded it to my server will run asap

#

should i be in the server while its running or just running it through the console is fine?

weary oriole
#

Spark can't measure lag that isn't happening, so yes you would have to be on the server! :)

sour trout
#

being in server when its lagging is best - the report takes a snapshot of the processes going on at that time... if the lag isnt happening or your not there to trigger them the report is kind meh lol. Is that ok?

weary oriole
#

Whenever you're playing and find that the server is lagging, start a report, let it run for ~15 minutes or so, then stop it and send it over so we can take a look!

sour trout
#

Jupie is spot on, thet're a real angel

thorn bay
#

gotcha ok, ill log into the server to see if it still is lagging and then ill also run it again later today when more people are on the server to get a better read

#

also could the server render distance cause the tick issue?

weary oriole
#

Having a high render distance could definitely put strain on the server resulting in issues, yes

thorn bay
#

Gotcha ok, yeah i suspected that but my brother who is also running the server with me was insisting that it doesnt

#

We have the render distance set to 32 atm

sour trout
#

Generally, we recommend 10 or less for simulation distance and render distance. Personally I dont go above it much, as it can have impacts on performance

weary oriole
#

32 is definitely quite high 😬
If you want to be able to see further without putting strain on the server, client side mods like distant horizons or farsight can be a great alternative

thorn bay
thorn bay
#

Are there any mods that would help the server have a better time with large render distances?

rotund agate
#

Chunky/WorldPregenerator!

Then it isn't generating the terrain to show you, it just has to have the memory to keep those ready to send down.

Just keep the simulation distance down.

#

Exploring any areas outside the pregen will cause lag, so consider a worldborder if going that route.

thorn bay
rotund agate
#

No, what would it do client side?

thorn bay
#

Idk, i dont know alot about mods and stuff

rotund agate
#

You couldn't trust the player's PCs to generate world bits and send them up to the server, they could be doing it differently and stuffing in globs of diamonds where they don't belong.

thorn bay
#

gotcha ok

#

i stopped the spark profiler, where would it provide the link to copy and share. im looking the console atm but dont see it

rotund agate
#

Chunky helps by getting all of that terrain generated and put on disk so it isn't happening as you explore - which is the laggy bit.

thorn bay
#

ill check them out, thanks

weary oriole
thorn bay
#

found it thanks, im just blind apparently

#

ill run it again when theres a large amount of people online for a better reading

#

after i get another read later, ill lower the render distance and see if theres a noticeable difference

thorn bay
#

i was able to run the spark profile again with a bit more lag

weary oriole
#

Yeah personally I would attribute this to the render and simulation distance being so high.

I looked at a few spark reports I've checked over the past few weeks and with multiple players on spark registered a few hundred chunks, 400 at most

With 3 people on, yours is showing almost 2000 chunks, and almost 4500 entities that the server is trying to keep alive. There's 2200 items on the ground.

I would lower them to the recommended amount and see if you notice any change, if it doesn't improve a new spark report with the lower distances would be super helpful!

thorn bay
#

this one has a more people

#

sorry never saw the response

weary oriole
#

Yeah 2855 chunks on this one and 6553 entities in this one 😬

thorn bay
#

yikers

thorn bay
#

ran it again at 12 render distance

#

distant horizons was added tho

weary oriole
#

Even without rendering them you're still keeping chunks around every player actively ticking, so it's still keeping 4500 items alive in over 2000 chunks.

#

This already looks a whole lot better though! With the simulation distance down we should be pretty much good.

thorn bay
#

Ah ok, i didnt see an option for simulation distance on the server dashboard but ill check again