whats lag?

Discussion in 'General Discussion / Real life stuff' started by TheBlackHamood, Jan 8, 2015.

  1. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    Hello,

    today I take some time to explain lag


    lag is when the server (host) can't handle the event's coming from the connections, thus delaying them or canceling them

    but you ask where do those connections come from? from you
    Basicly everything you do on the server is a packet, and a packet is a request by the player to the server, and when you walk 1 block stright you (the connection) will send a request to the server that you changed your postion from here to there, simple right? but wait, what if there are 2k players seperated into 12 Servers? all of being recorded at the same time, and Bungeecord makes it worse because it gets the info from these servers, because the main host gets information from lets say 166 player on every server, thats includes: moving, chatting, jumping, swinging your sword, sounds, opening door, closing door, throwing projectile, getting the killer of the person, getting the killed person, getting the projectile shooter, getting the item the player/entity by, etc, all these actions recorded and sent to the server, if the server is strong and can handle the info, it will take and request will be done, but in the event of overfill, the server is forced to delay or cancel these actions thus making what we call today "lag", now you might say "pppfffft just add more ram" infact the server will need more than just Random-Access Memory to achieve no lag, it would connection speed and all that other shit, and saying "LAGGGG" won't fix the problem, that would cause more, the actual solution to lag when it happends everyone has to stop doing what they're doing to calm down the server overfill, if they more the lag will grow more and more into what we know named as a "Lag Spike" the lag spike is a complete stop of sending information for a period of time, which completely stops anything happening on the server from events, movements,etc, however this can be also avoided by every stopping what they're doing in a case of lag spike, say the server has 20 GB ram, but low connection getting, sure your fps will grow but still you will get lag, and DDOS or DOSers make it worse by sending more connections

    let me tell why you lag during joining

    It sends to server information about you connection to the connection
    It waits for the server to respond
    the server responds
    it loads your character
    it loads other's characters
    it loads your skin
    it also loads other skins
    it alarms the plugin that the player is joining
    the plugins check in thier code for anything for the player
    they apply it
    the server informs other connections that this connection is joining
    it applies the texture and all dat shiz

    done


    hope you people understand and thank you for reading this
     
  2. Spikegold

    Spikegold Donator

    Messages:
    1,469
    Likes Received:
    834
    Minecraft:
    ThrowingBricks
    Server lag is caused by 3 major reasons:

    -Bad connection / packet loss
    -Server RAM being maxed out
    -Server CPU being maxed out

    The main causes of each:

    There are 3 main bits of information that will determine your connection:

    -Ping
    -Download speed
    -Upload speed

    All of them have the potential of being a bottleneck. Let's explain what all 3 of those mean:
    Ping is simply how long it takes for 2 IPs to send data/packets to each other. In this case, those 2 IPs are your computer and the server. Ping is typically measured in milliseconds. The less time (milliseconds) it takes to connect, the better. So, if your ping is too high, what can you expect?

    -Rubberbanding. An example of why: You're standing somewhere, and you decide you want to move, so your computer sends packets to the server saying you're moving. So the server recieves the packets and sends some packets back to tell your client where you should be. On a good connection with low ping, this will work fine as if walking around in single player mode. However, with a high ping connection, it will take almost a whole second for you to send that info and for it to return. So if you move, the server will reposition you to where you were almost a second ago. This is one of the biggest rubberband causes.

    This works the same way with block lag and people taking damage after you hit them a while earlier.
    Download speed is how many packets your computer can recieve at a certain time, usually measures in megabits per second (mbps). The faster your downlpad speed, the better. So, if your download speed is slow, what can you expect?

    -Lower frame rates. Yes people, your computer hardware -although by far having the biggest impact- isn't the only thing that affects your frame rate. Frames are also sent as packets, and if your download speed is too low, it might lose those packets so your GPU has nothing to process and spit out onto your screen.
    Upload speed is the opposite of download speed - instead of how fast your computer downloads packets
     
    Last edited: Jan 8, 2015
  3. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    you know that I just shortend that in this thread :]
     
  4. Spikegold

    Spikegold Donator

    Messages:
    1,469
    Likes Received:
    834
    Minecraft:
    ThrowingBricks
    And so I decided to try and explain in detail c:
     
  5. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    <:
    #ITPeopleFTW
     
    Spikegold likes this.