Server lagging with low player count

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Hoiafar

New Member
Jul 29, 2019
8
0
0
First off, yes the server machine is really slow. But I have seen people with similar hardware run stable FTB servers with a few tweaks.

Problem is, I can't find any tweaks whatsoever. I've tried that TickThreading thing. Decreased CPU load by 30%, decreased server lag somewhat but it's still on unnacceptable levels.

I also feel I should add that I don't expect there to be more than 3 people online at any given time.

Here's relevant system information:

Manufacturer and model:
eMachines E525

OS:
Windows 7 x64

CPU:
Intel Celeron T300 @1.8GHz Duo Core

RAM:
4GB


Here's what I've tried:
TickThread; increased performance a bit, not enough.

The .bat editing thing with the codes that I understand very little of. Bat window instantly closes so I added a pause to the .bat file and I get this error message:
"Error occurred during initialization of VM
Too small initial heap for new size specified"
I reckon these codes are a bit personal however, I ripped them of someone else.
Here's the code:
Code:
java -server -Xincgc -Xmx3G -Xms1G -Xmn1G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=3 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -XX:ReservedCodeCacheSize=1G -cp ftbserver.jar -jar ftbserver.jar

While we're at it. There really should be a central stickied thread of any and all optimizations you can do to get your server up and running.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
My advice, cut your losses, get more powerful hardware. There is no miracle fix for this that I know of.
 

Hoiafar

New Member
Jul 29, 2019
8
0
0
I'd like to try everything first though. Getting a better computer just for hosting a Minecraft server is entirely out of the question.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Your not trying to host and play on the same computer right?

Also, I just googled your laptop model number, and like I said its a laptop. This word equates to less performance, unless your paying in the thousands of dollars.
Also, thats not the full model number, thats only part of it, but all the listed results are laptops, and I picked the one with the CPu you mentioned.

Lets get all the info, if you don't mind, download and run this program: https://www.piriform.com/speccy

If you have a similar program thats fine, but we need the gritty details of what your PC has hardware wise.
 

Hoiafar

New Member
Jul 29, 2019
8
0
0
No I am not using the same machine to game and host the server on. My desktop is conciderably faster. And that model number is the only thing even related to model number, except for the extremely long product number on the backside of it.
And I am aware of the laptop problems, this was given to me and I never use it except for hosting minecraft servers and the likes.

Here's everything that Speccy has told me:

Operating System:
Windows 7 Ultimate x64

CPU:
Intel Celeron T300 @ 1.8GHz
Penryn 45nm

RAM:
4,0GB Dual Channel DDR 2 (5-5-5-15)

Motherboard:
eMachines E525 (uPGA-478)

Graphics:
Generic PnP Monitor (1366x768@60Hz)
Mobile Intel 4 Series Express Chipset Family

HDD:
298GB Hitachi HTS545032B9A300 (SATA)

I reckon Audio and Optical Drive doesn't matter that much.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
You mentioned trying Tick Threading, look at this page for a good startup script that you can put into one a .bit file.

https://github.com/nallar/TickThreading/blob/master/INSTALL.md

Make sure where it says server.jar, change that to the name of your jar.

My next piece of advice is far more outlandish but would help a lot. Ditch Windows 7, if you feel comfortable going with something else, like a Linux distro. By itself Windows 7 is using a decent share of your CPU and memory. I also have a server on a low end laptop, and the OS I use is the following: http://minecraft.codeemo.com/

You mentioned not wanting to replace the whole computer, but changing the HDD out with an SSD of around 256gb would cost less than $200 and would greatly increase chunk loading speed and reduce boot times.
 

Hoiafar

New Member
Jul 29, 2019
8
0
0
Well, eventually I will build a new computer entirely out of parts that I've gotten from continually upgrading my desktop. But that time is still far away.

And I've tried installing Ubuntu on this laptop for just that reason, but it turns out that Ubuntu doesn't have native support for Intel video cards and won't even start properly with nomodeset in the boot script. And the forums seems to be the most elitist place you could ever find on the internet.

I just tried that script, and the server starts at least. Only thing left is to try it out.

Oh wow. That script helped tremendously. The lag is now next to completely gone when I am alone on the server. The only thing is a .1 second delay every 10 seconds or so.

Thanks a lot!
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
The little lag spikes are likely a result of the very old and slow HDD. A 120gb SSD would be more than enough to host a Minecraft server, and you can buy one for less than $130 US. I would personally suggest a Vertex 4, mine works great.

It might also be the garbage collection running, but that is far less likely, the only way that might be happening is if you set the startup script to more cores than the total in the server.

The OS that I linked, MineOS Crux, is a text only Linux Distro, no drivers or other stuff needed, its barebones. You manage it using FTP and SSH. It would reduce the amount of CPU cycles and memory your OS uses to get that little bit of extra performance.
 

Hoiafar

New Member
Jul 29, 2019
8
0
0
Well, turns out that lag was only temporary. It didn't appear after having been online for 2-5 minutes.
I'll wait and see how well it performs when I get a few machines going and a couple guys on at the same time before doing any more work for something that isn't nessecary though.
Thanks a lot for the help!
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Keep in mind the reason the lag went away is you likely stopped loading new chunks, so I would suggest looking into something called MCPC+, and the Bukkit plugin WorldBorder, to limit how far players can explore.

No problem, I enjoy helping people with servers. If you decide to go with a new OS or SSD, send me a PM, I can help with that stuff in greater detail.
 

dedbbs

New Member
Jul 29, 2019
28
0
0
Keep in mind the reason the lag went away is you likely stopped loading new chunks, so I would suggest looking into something called MCPC+, and the Bukkit plugin WorldBorder, to limit how far players can explore
No problem, I enjoy helping people with servers. If you decide to go with a new OS or SSD, send me a PM, I can help with that stuff in greater detail.
If you don't want to install MCPC+ and WorldBorder for some reason, there's a solution to the world generation issue that can actually be quite fun. I started doing this because I didn't know those things existed, but maybe you'd like it too, so I'm just going to say it. My solution was to use the RailCraft Tunnel Bore to make a ghetto rigged automatic world generator.

Manually put a long length of track down at height 13 (If you're in the Overworld - if you're attempting to generate Twilight Forest, simply put it on the surface as the surface is flat and there aren't any oceans.) Place the bore at the head of the track, and then place a long train of chest carts after it (maybe 15 or so?) with a World Anchor cart in the middle - the bore will put everything it mines in the carts and the World Anchor cart will keep the cart doing what it's supposed to - generating world for you. Then use a crowbar to attach each piece to the next piece and eventually everything will be one train. Fill the first few carts full of coal coke, unpowered rails (powered rails will cause the bore to break itself), and gravel, enough so that it can go for a few thousand blocks/meters ideally without your intervention - the bore will pull supplies from the chest carts. I'm not sure if World Anchor carts need Ender Pearls now like the regular World Anchors, so check to see if ti does and fill accordingly.Then, when the entire thing is connected, place the diamond bore head into the bore and it will start. It will pull track, coke, and gravel from the attached chests as needed. Sometimes the train will manage to go until it runs out of something it needs. Sometimes the bore will hit somewhere with lava or water flowing above it (it will fill in water or lava below with the gravel) and it will stop until you intervene to clear it out. If the bore appears to be stopped for no reason, 99% of the time it's because of that. tunnel above the bore and then forward and you will find the source of the liquid - get rid of it.

The bore goes at a speed that is quite slow compared to a human walking at full speed in the overworld, and so you can let it run while people are playing and you probably won't notice any lag.

Yeah, it may sound like a lot of work, but doing this with NEI's hybrid creative mode probably takes 5-10 minutes and not only does it generate a lot of world for you, it makes an awesome tunnel that the people who play with you will use because it will connect with all kinds of cave systems and ores across all kinds of biomes. This will in turn make more world generation because as people mine, they move slowly around underground, stopping and starting often, which is exactly how you generate Minecraft chunks slowly and unnoticeably. Do a few of these, and you'll have a nice chunk of your world generated - and with those tunnels available for convenient travel underground, people probably won't stray too far from them.

The only downside about this to me (I'm sure a lot of people could think of a bunch of downsides to this as this isn't their style) is that the rail is unpowered. Even if you don't use the rail, it's an awesome stretch of tunnel to walk along. You can use the modular system in Steve's Cart's to either have everyone make their own coal-powered cart, or make a track-remover cart that removes all the unpowered rail and a track placer cart slightly behind it placing powered rail and redstone torches.

Yeah, I wouldn't blame you at all for using the MCPC+ and WorldBorder thing. Just offering my own solution in case you're weirdo like me.