Difference between revisions of "Lag"

From Pandorabox
Jump to navigation Jump to search
(better grammar)
 
Line 1: Line 1:
=== lag ===
+
=== Overview===
Maybe take some words about lag.
+
Lag is the "delay" that happens between inputs/events, be it caused by the client or the server.
  
=== what is lag ? ===
 
lag is a situation your "game" doesn't do what you expect as a break / delay of time, late show you a new set node, not deleting a dogged node or stop your move.
 
  
 +
=== Sources of Lag ===
 +
Lag has 3 sources:
 +
* The Server, with its own game and collection of mods
 +
* your Internet Connection, this depends on the distance to the server and your internet quality
 +
* your Client & Hardware, maybe your computer can't render all the 1582678 nodes you have from the 1000 viewing range
 +
or simply:
 +
* server lag, can be seen from https://monitoring.minetest.ch/d/YUpouLmWk/overview?orgId=1&refresh=5s&var-instance=pandorabox.io and /status
 +
* connection lag, can be seen from /status
 +
* client lag, see your FPS (frames per second)
  
=== danger of lag ===
+
==== Server ====
* no fun
+
Server lag can be caused by:
* falling down from just set nodes you step on, and die
+
* intense load on the CPU because of mods
* bad basic to fight monsters
+
* not enough RAM/slow access to RAM
 +
* slow data storage when saving
  
 +
You can mitigate the CPU issue with a better selection of mods and some fine-tuning of the settings of them.
 +
The RAM issue can also be mitigated by having more real RAM (that is, not stored on the disk).
 +
The disk issue can also be solved... by not having a molasses hard-drive. And having a SSD instead.
  
=== where does lag come from ? ===
+
==== Connection ====
3 sources:
+
Connection lag can be caused by:
* Server with its hardware and software, the game and mods
+
* bad server internet connection
* the internet connection data go through incl. local at client with fiber down to wifi
+
* distance to the server
* your client + your hardware
+
* bad internet connection
so I define lag as follow:
 
* server-lag, can see with /status
 
* distance lag,
 
* mainly clients throughput lag
 
* client-lag
 
but at least: too many gamer for this hardware, config ...
 
  
 +
If the server has bad internet connection, then you can ask the server owner to get a better one, or (if you are the server owner) get a better internet connection.
 +
If you distance to the server is large, there is nothing you can do other than just ''moving closer''.
 +
If ''your'' internet connection is bad, then you should get a better one.
 +
===== How to Fix Your Internet Connection =====
 +
Many people use wireless connections to connect to the internet. As such, your internet probably depends on the position and orientation of your router. Moving them around might cause a lot of time-outs or it might solve your internet problem.
 +
* Make sure your router antenna is pointing straight up or down.
 +
* Every. Single. Thing. in between your computer and router decreases your connection strength.
 +
* Try out different positions. They may increase your connection strength.
  
=== server ===
+
==== Client ====
Besides a server should be fast
+
Client lag is when your client just "freezes" and any inputs won't register. Notice that client ''lag'' is different from ''crashes''*.
* better less than a lot of CPU = frq better than threads, but 2 better 4 is good
 
* a lot of real RAM (not shared or Swap) to keep data in most fast area available (and also let it us by settings in mts conf and system cache)
 
* a fast hard-drive to store and read: HDD read/write about 120-150, SSD about 500-550, M.2 about 2.500-3.300 !!!
 
  
The choise and settings of mods are also important, there is a lot can be done tuning them.
+
* Client lag is mainly caused by graphics. Maybe turn down your view distance, or tune some settings.
 +
* Try to improve your setup. Nothing beats a computer upgrade, or something does. I have no idea.
  
so, have fast access to Store, a huge RAM to keep it, and faast CPU to process it.
 
  
At least then the fast/wide internet connection out in the wild.
+
'''*''' Crashing is when your client quits out, not when it freezes.
  
 
+
=== Examples ===
=== Internet ===
+
* Client lag happens when you have a very large view distance and you load a lot of nodes, and your FPS drops.
Most server have good connection out.
+
* Connection lag happens when you mine some [[Coal Ore]], but you don't get [[Coal]], and the particles don't appear.
But it depends on your location (distance to server location) if it might be a problem. An idea to see debug F5 the RTT (lower 0.8 is good, over somewhere .250 getting a problem)
+
* Server lag happens when you make a lag machine and the server hangs for 40 seconds (before promptly being timed out).
 
 
 
 
=== client connection ===
 
much use wifi to connect there tab, phone or even PC to routers wifi. As a connection depends also on the position and diection of the antenna of both (router and unit), the moving around the unit can cause a lot of times out.
 
Rule:
 
* routers antennas should be strait up or down, they are round sender/receiver - not pointing to something !
 
* every wall or even person (yes you gaming) are reducing the the wifi signal when your between router and unit.
 
* the more straight signal pass a wall the better
 
* check to hold your phone / tab different position and remember best one (there are even tools show your signal strength)
 
and at clients side the connection is thin, mean less data-transfer, and or other users of that connection (same house, or the line to provider) are transfer too much data (ftp, movie, video)
 
 
 
 
 
=== client hardware ===
 
At least some of the lags are gamer problem.
 
* to slow unit (CPU, ram)
 
* to high settings in resolution etc.
 
* to less tuning to reduce cpu work, and a bit force speed by cache in mtc
 
 
 
 
 
=== how to find out ? ===
 
difficult ! You have to keep in mind that most work together. Your client has to send your action (dog, place, ...) to the server, the server has to process it, and send you back the confirm. Here you might see that by dig a node and your client does it away, but as the confirm data from server is missing (server or internet slow), the client take the node back, and then after confirm data away.
 
 
 
So it need a lot of experience to determine where is the source. One thing to make sure some is play direct near the server to make sure no transport lag, and the client should be fast, that only servers reaction and processing is seen.
 
 
 
Also check the build in mod [[profiler]], what gives you data about what mod is most busy. And not forget data from the servers system to see if CPU 100% or most wait for I/O, mean slow HDD.
 
 
 
 
 
 
 
=== examples ===
 
where I am quite sure:
 
* you fall down a long shaft, near 1000 or more nodes and the view is not loading = server, slow hdd lag, as here is just load and send, NO processing at server OR your client cant handle that by GPU !
 
* you place an node, like a stone over a canyon and wanna step on it, but node is gone for 2 second, you fall die, node is back haha = not sure processing or transfer lag.
 
* digging or placing a lot fast, but dont get away or show ... here I think most it is a storage database problem, as no mod really included there.
 
  
  
 
[[Category:Server]]
 
[[Category:Server]]

Latest revision as of 21:31, 8 April 2024

Overview

Lag is the "delay" that happens between inputs/events, be it caused by the client or the server.


Sources of Lag

Lag has 3 sources:

  • The Server, with its own game and collection of mods
  • your Internet Connection, this depends on the distance to the server and your internet quality
  • your Client & Hardware, maybe your computer can't render all the 1582678 nodes you have from the 1000 viewing range

or simply:

Server

Server lag can be caused by:

  • intense load on the CPU because of mods
  • not enough RAM/slow access to RAM
  • slow data storage when saving

You can mitigate the CPU issue with a better selection of mods and some fine-tuning of the settings of them. The RAM issue can also be mitigated by having more real RAM (that is, not stored on the disk). The disk issue can also be solved... by not having a molasses hard-drive. And having a SSD instead.

Connection

Connection lag can be caused by:

  • bad server internet connection
  • distance to the server
  • bad internet connection

If the server has bad internet connection, then you can ask the server owner to get a better one, or (if you are the server owner) get a better internet connection. If you distance to the server is large, there is nothing you can do other than just moving closer. If your internet connection is bad, then you should get a better one.

How to Fix Your Internet Connection

Many people use wireless connections to connect to the internet. As such, your internet probably depends on the position and orientation of your router. Moving them around might cause a lot of time-outs or it might solve your internet problem.

  • Make sure your router antenna is pointing straight up or down.
  • Every. Single. Thing. in between your computer and router decreases your connection strength.
  • Try out different positions. They may increase your connection strength.

Client

Client lag is when your client just "freezes" and any inputs won't register. Notice that client lag is different from crashes*.

  • Client lag is mainly caused by graphics. Maybe turn down your view distance, or tune some settings.
  • Try to improve your setup. Nothing beats a computer upgrade, or something does. I have no idea.


* Crashing is when your client quits out, not when it freezes.

Examples

  • Client lag happens when you have a very large view distance and you load a lot of nodes, and your FPS drops.
  • Connection lag happens when you mine some Coal Ore, but you don't get Coal, and the particles don't appear.
  • Server lag happens when you make a lag machine and the server hangs for 40 seconds (before promptly being timed out).