Jump to content

Minimize lag on Minecraft server

Go to solution Solved by Ser James Acinonyx of Compactis,

I hereby choose to let you know I have fixed the issue, via some tweaking of settings with the firewall and some other knick-knack. I thank you all for your suggestions and answers, although I never got an answer to my initial suggestion (not that it's necessary anymore).

So I've been wanting to play Minecraft LAN with my brother. Now, due to some network issues (I suspect the router might be the culprit, but I cannot know for sure), sometimes it goes smoothly, other times it's laggy as hell. And in worst case scenario, one of us gets periodically disconnected from the server. So that led me to wonder what I could do to minimize the issues. I'm just starting to learn networking myself, so forgive me if I ask about stupid things.

 

Now, seeing as using cables gives more stability and capacity than wireless, I thought maybe use a patch cable and connect between the two computers (the machine I'd play on would run the server). Both computers have WiFi capability, so that should take care of login IDs and skins, while the cable would take care of the multiplayer server business.

I am aware that connecting both units to the router could yield better results, but without modifying the house, or running cables through the hallways and downstairs, my desktop can only connect through wireless.

CPU: Intel Core i5-6600K @ 3,5GHz

-Cooler: Cooler Master Hyper TX3i

Motherboard: MSI B150 PC Mate LGA1151 ATX

Memory: Kingston HyperX Fury 16GB DDR4-2133MHz

Case: Corsair Carbide Air 540 White

-Fans: 3x Corsair HD120 1x Corsair AF140L

GPU: EVGA GeForce GTX 1070 FTW

PSU: Corsair CX600M

Storage: Crucial BX200 240GB SSD (System disk) + Seagate Barracuda 1TB HDD (Storage)

Operating System: Windows 8.1
 

Partpicker: https://pcpartpicker.com/list/wPhTtJ

Link to comment
https://linustechtips.com/topic/662149-minimize-lag-on-minecraft-server/
Share on other sites

Link to post
Share on other sites

It could be laggy due to the server running off your laptop rather than the network. Give your run.bat like 1G min and anything more than that is great. Plug the host pc into thr outer for it to be more stable but having run servers off wifi I haven't had any problems.

[Case Mod] Operation: The Division --- > Here

[CUSTOM WATER COOLED TABLE] Project: Ravage ---> Here

-== QUOTE ME IN YOUR REPLY IF YOU WANT ME TO RESPOND ==-

 

 

Link to post
Share on other sites

23 minutes ago, ClownFace1511 said:

It could be laggy due to the server running off your laptop rather than the network. Give your run.bat like 1G min and anything more than that is great. Plug the host pc into thr outer for it to be more stable but having run servers off wifi I haven't had any problems.

 
 

I have also used a RAM disk to store the server files. This was before I got an SSD.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites

2 hours ago, ClownFace1511 said:

It could be laggy due to the server running off your laptop rather than the network.

The desktop is the server/gaming rig. The laptop is my brother's comp.

2 hours ago, ClownFace1511 said:

Give your run.bat like 1G min and anything more than that is great.

There is no run.bat. I use the Singleplayer "Open to LAN" option. Would dedicating more RAM to Minecraft work as well?

2 hours ago, ClownFace1511 said:

Plug the host pc into thr outer for it to be more stable but having run servers off wifi I haven't had any problems.

Again, my desktop is the host, and that's the one I can only use wireless for without stretching cables or hire someone to modify the house with internal LAN ports.

 

1 hour ago, vorticalbox said:

I have also used a RAM disk to store the server files. This was before I got an SSD.

Never heard of a RAM disk before. What's special about it?

CPU: Intel Core i5-6600K @ 3,5GHz

-Cooler: Cooler Master Hyper TX3i

Motherboard: MSI B150 PC Mate LGA1151 ATX

Memory: Kingston HyperX Fury 16GB DDR4-2133MHz

Case: Corsair Carbide Air 540 White

-Fans: 3x Corsair HD120 1x Corsair AF140L

GPU: EVGA GeForce GTX 1070 FTW

PSU: Corsair CX600M

Storage: Crucial BX200 240GB SSD (System disk) + Seagate Barracuda 1TB HDD (Storage)

Operating System: Windows 8.1
 

Partpicker: https://pcpartpicker.com/list/wPhTtJ

Link to post
Share on other sites

31 minutes ago, Ser James Acinonyx of Compactis said:

Never heard of a RAM disk before. What's special about it?

 

You section off a part of your ram and it acts as a normal drive this allows you can very high read and writes.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites

3 hours ago, Ser James Acinonyx of Compactis said:

So I've been wanting to play Minecraft LAN with my brother. Now, due to some network issues (I suspect the router might be the culprit, but I cannot know for sure), sometimes it goes smoothly, other times it's laggy as hell. And in worst case scenario, one of us gets periodically disconnected from the server. So that led me to wonder what I could do to minimize the issues. I'm just starting to learn networking myself, so forgive me if I ask about stupid things.

 

Now, seeing as using cables gives more stability and capacity than wireless, I thought maybe use a patch cable and connect between the two computers (the machine I'd play on would run the server). Both computers have WiFi capability, so that should take care of login IDs and skins, while the cable would take care of the multiplayer server business.

I am aware that connecting both units to the router could yield better results, but without modifying the house, or running cables through the hallways and downstairs, my desktop can only connect through wireless.

Allocate more RAM to the server? A few friends and I run a school Minecraft Server Club and we fixed a lot of performance issues by increasing RAM on server and client side.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to post
Share on other sites

Minecraft runs on Java, meaning it is out-of-the-box going to be a memory hog. And given everything it tries to do, you need to put as much memory at this as possible. Given you're trying to run this off a laptop, I'm going to guess that you don't have a lot of memory to begin with, meaning if you're running the server on the same machine you're playing on, you're only hurting yourself even more.

 

Buy a cheap used system. You can find refurbished systems for very cheap through sites like refurb.io and Arrow Direct. They don't come with a lot of memory out of the box, but memory is cheap, especially DDR3 now that DDR4 is gaining more of a foothold. Have a dedicated server set up that has at MINIMUM 8GB of RAM, 16GB preferred, and the more the better, especially if you intend to later open this up to friends.

Wife's build: Amethyst - Ryzen 9 3900X, 32GB G.Skill Ripjaws V DDR4-3200, ASUS Prime X570-P, EVGA RTX 3080 FTW3 12GB, Corsair Obsidian 750D, Corsair RM1000 (yellow label)

My build: Mira - Ryzen 7 3700X, 32GB EVGA DDR4-3200, ASUS Prime X470-PRO, EVGA RTX 3070 XC3, beQuiet Dark Base 900, EVGA 1000 G6

Link to post
Share on other sites

9 minutes ago, brandishwar said:

Given you're trying to run this off a laptop

[SNIP]

that has at MINIMUM 8GB of RAM, 16GB preferred, and the more the better, especially if you intend to later open this up to friends.

As I stated in a previous comment, I am using a desktop computer, not a laptop. I have 16GB of RAM (see my PcPartPicker in my signature or check my profile).

CPU: Intel Core i5-6600K @ 3,5GHz

-Cooler: Cooler Master Hyper TX3i

Motherboard: MSI B150 PC Mate LGA1151 ATX

Memory: Kingston HyperX Fury 16GB DDR4-2133MHz

Case: Corsair Carbide Air 540 White

-Fans: 3x Corsair HD120 1x Corsair AF140L

GPU: EVGA GeForce GTX 1070 FTW

PSU: Corsair CX600M

Storage: Crucial BX200 240GB SSD (System disk) + Seagate Barracuda 1TB HDD (Storage)

Operating System: Windows 8.1
 

Partpicker: https://pcpartpicker.com/list/wPhTtJ

Link to post
Share on other sites

1 hour ago, Ser James Acinonyx of Compactis said:

As I stated in a previous comment, I am using a desktop computer, not a laptop. I have 16GB of RAM (see my PcPartPicker in my signature or check my profile).

Apologies for the oversight. Then the concern is likely your setup. One thing to check is that Minecraft is running on the 64-bit (Windows x64) version of the Java Runtime. If you're not using that, it will be hard-capped on how much memory it uses. It's a common oversight, so double-check that. If you're not using the 64-bit Java Runtime, do that first.

 

Second thing to check is your Wi-Fi. Most Wi-Fi routers are set to automatically select your channel, and they're typically not that great about it either, and this can be a problem if you live in an area with a lot of Wi-Fi traffic (such as an apartment building or neighborhood with a lot of people nearby). If you have an Android phone or tablet, there is a tool called "Wi-Fi Analyzer" that can help you determine the best channel. Switching the channel for your Wi-Fi will benefit a lot more than just your Minecraft setup as well.

 

Depending on your existing router, you may need to get a new router as well, or a second one to allow for better Wi-Fi coverage in your home so that everything involved has a nice strong signal.

Wife's build: Amethyst - Ryzen 9 3900X, 32GB G.Skill Ripjaws V DDR4-3200, ASUS Prime X570-P, EVGA RTX 3080 FTW3 12GB, Corsair Obsidian 750D, Corsair RM1000 (yellow label)

My build: Mira - Ryzen 7 3700X, 32GB EVGA DDR4-3200, ASUS Prime X470-PRO, EVGA RTX 3070 XC3, beQuiet Dark Base 900, EVGA 1000 G6

Link to post
Share on other sites

1 hour ago, brandishwar said:

Apologies for the oversight. Then the concern is likely your setup. One thing to check is that Minecraft is running on the 64-bit (Windows x64) version of the Java Runtime. If you're not using that, it will be hard-capped on how much memory it uses. It's a common oversight, so double-check that. If you're not using the 64-bit Java Runtime, do that first.

I have now made sure Minecraft is running with 64-bit Java. I have yet to test how it all works, but that step is at least taken care of.

1 hour ago, brandishwar said:

Second thing to check is your Wi-Fi. Most Wi-Fi routers are set to automatically select your channel, and they're typically not that great about it either, and this can be a problem if you live in an area with a lot of Wi-Fi traffic (such as an apartment building or neighborhood with a lot of people nearby). If you have an Android phone or tablet, there is a tool called "Wi-Fi Analyzer" that can help you determine the best channel. Switching the channel for your Wi-Fi will benefit a lot more than just your Minecraft setup as well.

The router is already configured for best performance.

1 hour ago, brandishwar said:

Depending on your existing router, you may need to get a new router as well, or a second one to allow for better Wi-Fi coverage in your home so that everything involved has a nice strong signal.

The router we have is a combined modem/router provided by our ISP, so swapping it isn't the most attractive idea. However, I have a WiFi range extender installed in the hallway between the rooms where the host computer and "guest" one will be.

As said earlier, I haven't yet tested if it works, but I have done what I can of what you have suggested.

CPU: Intel Core i5-6600K @ 3,5GHz

-Cooler: Cooler Master Hyper TX3i

Motherboard: MSI B150 PC Mate LGA1151 ATX

Memory: Kingston HyperX Fury 16GB DDR4-2133MHz

Case: Corsair Carbide Air 540 White

-Fans: 3x Corsair HD120 1x Corsair AF140L

GPU: EVGA GeForce GTX 1070 FTW

PSU: Corsair CX600M

Storage: Crucial BX200 240GB SSD (System disk) + Seagate Barracuda 1TB HDD (Storage)

Operating System: Windows 8.1
 

Partpicker: https://pcpartpicker.com/list/wPhTtJ

Link to post
Share on other sites

You could set up ICS with a patch cable bridging your wireless internet over into the patch cable allowing the minecraft server and clients to listen on the NIC but still have access outside for resource downloading if it needs to. I've only done this for Hyper-V to allow VM's outside access but not require the DHCP server to issue more IP Addresses to them. If done correctly the internal IP address between you and your brothers computer would be probably 192.168.137.XXX.

Link to post
Share on other sites

the MC server is notorious for useing SO MUCH

the best advice i can give is expand the amount of RAM is can use, that sometimes works

****SORRY FOR MY ENGLISH IT'S REALLY TERRIBLE*****

Been married to my wife for 3 years now! Yay!

Link to post
Share on other sites

I hereby choose to let you know I have fixed the issue, via some tweaking of settings with the firewall and some other knick-knack. I thank you all for your suggestions and answers, although I never got an answer to my initial suggestion (not that it's necessary anymore).

CPU: Intel Core i5-6600K @ 3,5GHz

-Cooler: Cooler Master Hyper TX3i

Motherboard: MSI B150 PC Mate LGA1151 ATX

Memory: Kingston HyperX Fury 16GB DDR4-2133MHz

Case: Corsair Carbide Air 540 White

-Fans: 3x Corsair HD120 1x Corsair AF140L

GPU: EVGA GeForce GTX 1070 FTW

PSU: Corsair CX600M

Storage: Crucial BX200 240GB SSD (System disk) + Seagate Barracuda 1TB HDD (Storage)

Operating System: Windows 8.1
 

Partpicker: https://pcpartpicker.com/list/wPhTtJ

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×