Welcome to OMG boards community!
Community of friends where we talk about daily life, offtopic stuff, and what keeps us busy.

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

  1. Connect today Guest, to explore, mine, build and survive.
    1MB is a public, family-friendly #minecraft survival server, version 1.13.2.
    We're small, but have a friendly face. Invite your friends and come play!
    Features include: mcMMO RPG, Rewards for Achievements, a /market,
    Multiple worlds, sit on a chair, events, Economy, and more.

How to deal with Lag

Discussion in 'MineCraft' started by Floris, Dec 9, 2018.

  1. Floris

    Floris I'm just me :) Hi. Staff Member

    Threads:
    10,386
    Messages:
    36,942
    Likes Received:
    587
    Trophy Points:
    855
    Gender:
    Male
    This thread is to give some pointers on how to fight the big bad lag monster that affects some players, if you have any suggestions feel free to post them too.

    - Good Internet
    Obviously, this always helps. Ask your ISP (Internet Service Provider) what your current plan is, how much you're paying for it, and if they have something better for the same price.
    Why? Because it's easy to keep paying for the same thing, but providers always update, at least once a year. Sometimes for nearly the same money you could get a better upstream connection. Or get moved over to a plan that's using say cable or fibre, instead of old copper dsl. It never hurts to check!
    If you are underage, obviously you might have to ask your parents to do this for you.

    - Good LAN
    LAN stands for Local Area Network. What you can do at home, what the provider cannot do. Is optimize what you have. Putting the modem or router that feeds you the wifi in the basement while you're in the attic might result in packet loss. Having your modem/router nearby where you play games or browse the web, really benefits you. The signal of the wifi will get weaker and weaker of course each time it has to bounce against walls, or go through them.

    Additionally, the lowest latency right now is still usually a direct connection to the modem/router. A wired connection through a cat6 or cat5e ethernet cable gives the lowest latency. Something to consider if you are fighting serious lag and really want to squeeze out the most.

    If you do decide to go with wifi, that's fine. But understand what your modem/router can do. And then understand what your system can do. If you have a 5g router, and your system has 5g, but you still connect over the 2,4g, you will find you aren't utilizing your connection that well. Make sure they're both on 5g for the fastest possible LAN (for wifi).

    Sharing a household with multiple people, then asking your ISP or your parents to invest in wifi-boosters might help. Putting that at strategic locations around the house might help boost the signal and lower your latency and saturation. Giving you a better browsing experience, maybe even a better gaming experience. Sometimes using the router's QoS (quality of service) to better manage the variety of channels/streams will help you when you need the traffic the most.

    Usually when you have Internet through an ISP, they provide the modem. This is a locked down system that gives you some options, but it's not ideal. They also try to not overheat these things and they run custom firmware to better control that and other stuff. It's terrible! Why do they do this.. Anyway, sometimes if the ISP does allow your own custom modem, and you know what you are doing. It's perhaps worth investing in this if lag really is caused by the modem. But usually you skip this step. What you can look into is ask the ISP if you get your own Router and put the modem in what they call 'Bridge' mode.

    Putting your own router behind the modem of the ISP, and setting the modem in Bridge-mode will allow you to spread the workload. Your modem will just authenticate with the ISP, and parse the routing and traffic t:wave:from your LAN and WAN. The Router will then take over the routing features, and firewall stuff, and wifi stuff, etc. It's made 'more' to be a router than how a modem is made to be a router. Your modem will have less load and can do more when it's needed. And the router can do much more, especially when it's needed. You can also get a router that's overkill, and this helps improve the LAN to the fullest. All the family members will have optimal LAN connections, and then the bottleneck is just what the upstream to the ISP's Internet is. Plus, usually it's much more secure as well. And you have full control over the firmware of the router. You get bigger antennas for the wifi, there's probably better splitting between running 2,4g and 5g at the same time + guest networks, etc. Usually this benefits most people.

    Okay, that's all the techy stuff, let's get to gaming.

    - Minecraft

    For gaming there are a few things that cause lag, so let's explain that first. Just to clarify what we're dealing with.

    There is simply the performance of java on the System you're running Minecraft on. If you have a machine from 1995 and you play the latest version of Minecraft, you will not significant performance lag of course. The solution is obvious: Update the hardware on the system if you can, or maybe it's time to invest in a newer system. This is it's own discussion worth. My tip with older systems is: If you can run 8gb in the thing and you aren't already: do that. Upgrade the ram. If you have an old HDD and you can install an SSD in there, do that. If you have a small simple video card in there, but you can put a more modern one in there with more video memory on it, you will certainly benefit from this. Do that.

    Okay, that's system's performance. Next is graphics lag.. Like I said, if your graphics card is not up to par to keep up with Minecraft you have the option to change the hardware perhaps. However, if not.. or if you don't want to. You can 'tweak' the Minecraft performance through changing the vanilla settings. For example a big one is the view-distance. First of all, if the server you play on has their view distance set to massive, you will lag more. Usually servers are around 4 to 10, not higher. The lag you get on your computer with view-distance is client-side. Each chunk you load stays in memory until it goes out of view distance. So if you set your view distance to 48 you have loads and loads of chunks in memory. Your graphics card will need to do the work to clean that up, remember it all, give it back to you when you ask for it. You might experience lag. Your ram and cpu and gpu will all have to work together to give you what you want. Lower the view-distance to say 6 to fight lag like that.

    Another big one for Minecraft client-side tweaking to fight lag is using the mod 'optifine', you can find the thread I made about it here:
    https://omgboards.com/threads/1-13-2-particle-lag-optifine.261522/
    It allows you to tweak older systems and weaker cards with settings that use way less cpu/gpu/ram cycles and storage, etc. Making your gaming experience smoother. And newer systems can even squeeze out way more visually to make Minecraft look even better. But, fix your client-side settings, this will help you loads. Turn off the fancy stuff that takes up hardware resources, so you have less game-lag.

    The above stuff was mainly FPS (frames per second) lag. Running a smooth 24+ without drops is usually a smooth experience. Fancy newer cards can do 120+ with no drops. Finding the sweet spot for your system might take a little bit of testing, but you might notice a huge difference.

    Next: Actual Server Lag, the connection between you and the network the server is on. There are a few limits. And this is just because we're all on this big round globe called Earth. You are there, the server is here, that guy is over there, and she's in that other continent. We can't please everybody. People from Europe will benefit the most from a EU hosted Minecraft server. And the same for US hosted servers and US people connecting to it. Our server is in the EU, and our user-base is about 50/50 or 40/60 .. The distance between the US and the EU is long enough that there's always a tiny bit of lag. But we run rather optimized and do with what we have. Just like you and your system: you use what you got. To improve this network lag, there are a few things to consider.

    If your LAN and FPS are stagnating, saturated, and there's packet loss, and all that. You already have a bit of lag before you even connect to the server. Then if the server is in the EU but you're not. You might have to cross the distance, adding a bit more lag. Playing during low-hours instead of peak-hours will help you. When the EU has calmed down, and the US went to bed, or it's still morning, we notice that people sometimes have a lot less lag when they play. Less family members hogging the network also helps of course.

    A small tweak that benefits everybody with network connections is a good DNS / NS resolver. The ISP ones are poorly cached, forced, come with all sorts of privacy nonsense, and there are great public ones from Google, OpenDNS, and such. Changing your router's (or modem's) dns settings to a fast local dns solution will help you resolve domains and calls to addresses etc a lot faster. And in my opinion: every bit helps.

    I am sure you guys also have some great suggestions, I will just stop here and not make this too long. But.. if you combine 'better internet', with 'good hardware', and 'your own router', together with up to date java software, minecraft settings, and a mod like optifine, you might just notice that your lag (the ping) and your game experience when you walk, run, fly, swim around.. might go from stuttery or bouncy to silky smooth.

    It's all about finding the bottleneck.

    At my parents home for example. I have put all the iOS/Android devices on the 5ghz network, so they don't feel sluggish when they try to load pages, etc. I changed the router's dns to google's open dns settings, and since my dad usually is with his old laptop in the same room as the router, he is on the older 2.4ghz wifi. They also had a modem that when you moved almost already dropped the connection.. and now they have a router behind it. He has 90% of his bandwidth in each room. A few tweaks, a little thinking, and a $50 investment, and their internet went from 'argh' frustrating to 'omg, finally..' so nice. When I play MC at my parents place, they don't even notice someone else is on their network. Whereas before, if I opened a page in my iPad when I was there, my dad would complain the pages in his browser would stop responding.

    Oh, bonus tip: // entities.. The more tiles/entities around you in the chunk you are, the more data there's to process and upload back to your client. So if you have an area with 500 signs and item frames, armor stands, and 250 mobs like a turtle farm, sheep grinder,.. your ping will be higher than usual. This is why I have my auto sorter separate from my storage room, my storage room separate from my /home base, and my animals farms separate from all of that. We have enough /homes to teleport around in the same world, and I rather teleport a few times, than have lag the whole time.
     
  2. OP
    Floris

    Floris I'm just me :) Hi. Staff Member

    Threads:
    10,386
    Messages:
    36,942
    Likes Received:
    587
    Trophy Points:
    855
    Gender:
    Male
    What 1MB is doing to fight lag.

    This is more a bit of inside info, extra details, or whatever.. But might be helpful to let you guys know a few things.

    There's no lag.

    Simple as that. The server runs perfectly fine. It's a fast upstream connection, on a modern system that's not even being stressed when we have all of our friends playing at the same time.

    But there is lag, obviously.

    Sometimes when we all teleport or do something that requires the cpu/ram to make a big effort, it can spike. This happens on all the servers.

    We host at home. I do this server as my hobby, I have no intention of asking players for money to play (on this server), and in return players are to be okay that I don't pay $100/month or more to host the server somewhere. Hosting at the ISP/host is a bit more laggy than directly connected to a 10gbit or better network that's poking into a backbone connection. But, we're talking 20ms difference. And while that's not a lot, I understand there's a difference. But we aren't a 75+ player server, we don't ask for money, so there's no reason for me to consider choosing between paying my rent or my hosting ..

    And I take the suggestions from the first post to heart. I have a modern modem, I ask the ISP yearly to send me a new one. In fact, next week there's network maintenance to replace outdated cables with newer ones in preparation for a future docsis 3.1 update that pushes us to modern tech/protocols and allows me to yet again update the connection and improve latency. I also use the fastest possible ns resolves that I can, and I check monthly. I also invested in a modern router that is optimized for the minecraft server(s) I run on this connection. I split the workload and channels/streams, etc. The LAN ping in 2018 is 50% less than what it was in 2017, and it was very good in 2017. The cables have also been replaced with really short cables, they are now also 10gbit cables on cat6, and split. So there's not one stream being a bottleneck for the others. The system had an investment earlier this Summer from 16gb to 40gb ddr4 RAM, and a few external SSD solutions were added to split workload of different tasks over different drives.

    Minecraft server wise, we're using Spigot, which is great compared to Mojang's vanilla Server. And we're going through the options every so often. Each time we update something we make a note to review performance after a week or so, and adjust accordingly. We try to stay current on bug patches and such. Fixing memory leaks, improving our java garbage collection and all that sort of server related configuration stuff. We have a list for the Winter to improve performance for specifically 1.13.2, I can't wait to get started on that one.

    Okay, that's all for now :)

    Looking forward to your suggestions to help improve your gaming experience on 1MoreBlock.com's 1.13.2 Minecraft server :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice