Tips for reducing server lag on tiny home server?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • 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

abobabo

New Member
Jul 29, 2019
76
0
0
So, I run a tiny home server for me and three friends (though only one is regularly on so we're usually two people on at the same time) but I'm having very heavy latency issues.
The blocklag is horrible, especially (and this is kinda weird) on the laptop I play on in the same house. It's worst if I connect via LAN but also bad if I connect via internet. The "did system time change?" warning is pretty much bombarded constantly.

The server computer is dedicated, and while it's specs are mediocre they should be enough for this purpose. The specs are something like:
8 GB RAM, Intel dualcore processor @3.16GHz, basic mechanical HDD. The connection is a wired network to a router with wired access to the modem.

The mods I'm using are a fairly small list, only 30 mods including all dependancy mods, and the world is very new so we haven't really built anything yet. The mods are these plus JABBA, MrCrayfish' furniture and OpenComputers.

The only JVM arguments used at this time is -Xmx4G and -Xms4G as that's the only thing I know what it does, and my attempts to just copy-paste various jvm argument blocks I've seen on the internet haven't improved the server notably.

I read the suggestion of using a RAM disk instead of the old mechanical HDD, but that just made the whole thing far worse.

I'm quite poor and couldn't put more than about 20 bucks tops towards improving the server, and that by itself feels like a lot too much to spend on a computer I'm otherwise not using that much.

Ideas?
Any JVM arguments that I'd benefit from using on a rig like that? Know of any free server host sites that allow mods? Any other ideas?

Thanks a lot // ilja
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
Well, not knowing the full list, as the link you linked said a "rough idea" of what you had, I wouldn't know exactly... but a few things I have found that helps drastically. I use only 3GB and I have an almost lag free (when 3+ players are on, it starts to lag) experience with 150 mods installed ;)

First off: EVOC, if you don't have this mod, install it straight onto the server. The clients don't need it, but ANY server can benefit from this, as it reduces CPU/RAM usage of plain old vanilla stuff, like hoppers and spawners, which are freakishly server intensive.
Next off, Applied Energistics, go into the config and tell it to not need power. As soon as I did that, the server improved 10 fold (yes, it is cheap, but powering AE isn't hard)
Make sure people aren't placing hundred of chunkloaders. Maybe disable chunkloaders in any mod that you have that has them (Railcraft, you mentioned) and add Dimensional Anchors. And have it so that people can only load X chunks (maybe 9 per player) as that will mean less stuff can be loaded by a single player.
Finally, just sort out player limits... If you have 20 players on your server, you will have issues, but ~5-10 players on what you have should be fine :)
 

abobabo

New Member
Jul 29, 2019
76
0
0
Thanks a lot for the tips!
EVOC sounds great, I'll install that immediately
We haven't even gone so far as to build any AE stuff, and there are no chunk loaders yet. We'll probably have no more than one or two in total, and we're not nearly 5-10 players, we're usually 2 but might get up to 4 at most.
 

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
As far as using a RAM disk goes: You will only notice an improvement really if the disk is decent quality(read expensive), and only with chunk generation. Also, are you using the client on the same computer as the server? If yes, don't. You need at least a quad core processor for that(Thread each for server, client, garbage collection, and OS).
 

midi_sec

New Member
Jul 29, 2019
1,053
0
0
As far as using a RAM disk goes: You will only notice an improvement really if the disk is decent quality(read expensive), and only with chunk generation.
ramdisk is a bit different. it's where you tell your computer to treat a block of primary storage as secondary storage.

ram to pseudo-hdd. water to wine.

edit: OP, I wouldn't consider a ram disk unless you have a server board with lots of memory. the addon cards are pricey, but again so is any system running a ram disk :p
 

Qazplm601

Lord of the Tumbleweeds
Sep 21, 2013
2,754
3,282
308
Where else?
As far as using a RAM disk goes: You will only notice an improvement really if the disk is decent quality(read expensive), and only with chunk generation. Also, are you using the client on the same computer as the server? If yes, don't. You need at least a quad core processor for that(Thread each for server, client, garbage collection, and OS).
what if you have a dual core with 4 threads?
 

zemerick

New Member
Jul 29, 2019
667
0
1
Have you considered purchasing a server?

Depending on your electricity price, the usage of your computer, and time it's on...it's actually quite likely that renting a server is cheaper. Especially if it's the difference kicking you up to a higher tier of pricing.

If you're not sure how to calculate that, just post your full computer specs, electric price, and hours per day its on on average and we can tell you the monthly cost you're looking at.

Switching to a server saved me money ( and I'm under 9 cents per kw/h ), and vastly improved our performance.
 
  • Like
Reactions: abobabo

abobabo

New Member
Jul 29, 2019
76
0
0
Also, are you using the client on the same computer as the server? If yes, don't. You need at least a quad core processor for that(Thread each for server, client, garbage collection, and OS).
In general I don't. It happens occacionally when I have a friend over, but I'm okay with it being more laggy on those occacions.

But how do I manually thread the processors? Should I do that now with my server?

Have you considered purchasing a server?
Yes, but there's several reasons I won't; the primary is that I'm quite poor and don't want to risk various online money transfers, so I keep my money in cash as much as possible because it helps my budget go around. In theory I have cash for it, but it's a lot of work and hassle and lots of places where I could accidentally do something wrong in a way that costs me more money.

Potentially I could buy server space if it's a one-time cost, I could perhaps solve that with cash and a little help of my friends. But I'm kinda strapped for money and can't spend more than tops 20 bucks. Do you know of a place that has small servers with one-time-only paying, and that supports mods?

Though also:
Depending on your electricity price, the usage of your computer, and time it's on...it's actually quite likely that renting a server is cheaper. Especially if it's the difference kicking you up to a higher tier of pricing.
My electricity is paid flat as part of my rent, so I could keep the large hadron collider in my basement without it affecting my energy price :)
(and the same goes for water, so let's say it like this: I may be quite poor, but at least I can bathe. Every day, for at least three hours. :D)
 

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
Well, Java automatically does the threading. But cores are physical. Your processor is only dual core.
Although, your laptop should not be having these problems. I run a ME^3 server(which has 103 mods including dependencies). on my netbook for me and my friend, and I never hit 11 milliseconds, much less block lag. Your laptop giving the Cant keep up errors means the processor isn't strong enough. Try running the server on a Linux distribution, such as Lubuntu or Xubuntu. That should take some load off the server. Also try upping permgen to 128 and using the -server and the -nogui flags in your start script.
 

ljfa

New Member
Jul 29, 2019
2,761
-46
0
Have you tried Opis? Maybe there's some evil tile entity which lags the entire server.
Was the lag there from day one or did it become gradually worse?
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
This is mostly true for vanilla, but I think mods can make better use of threads.
except most don't, they just use whatever thread that called their methods

only a few actually bother spinning up a new thread for stuff
 

ScottulusMaximus

New Member
Jul 29, 2019
1,533
-1
1
opis opis opis... See the tick rate to see if it even is server lag and find what's causing it.

If the CPU usage on one of the cores is maxing out, HDD usage high or RAM remains close to maximum, then your server is getting overloaded.

If you're on an old HDD a RAMDisk will help massively, download 'RAMDisk' and put your MC instance on there, 2gig to the disk and 3gig allocated to MC, helps with write and save times.

For high CPU and RAM, use some JVM arguments... If none of that works then you're out of luck I'm afraid
 
  • Like
Reactions: GreenZombie

abobabo

New Member
Jul 29, 2019
76
0
0
Well, Java automatically does the threading. But cores are physical. Your processor is only dual core.
Although, your laptop should not be having these problems. I run a ME^3 server(which has 103 mods including dependencies). on my netbook for me and my friend, and I never hit 11 milliseconds, much less block lag. Your laptop giving the Cant keep up errors means the processor isn't strong enough.
Oh, the laptop doesn't have the error messages, the server is on a stationary computer.
I have a stationary computer with the above mentioned specs that acts as server.
I have a laptop with specs , except a 2GHz quadcore.

Try running the server on a Linux distribution, such as Lubuntu or Xubuntu. That should take some load off the server. Also try upping permgen to 128 and using the -server and the -nogui flags in your start script.
I might try running on linux, but it feels like it _shouldn't_ be this slow regardless.
I guess I get what the -nogui flag does, but what does -server and permgen do? Good to know before I implement them xD

Have you tried Opis? Maybe there's some evil tile entity which lags the entire server.
Was the lag there from day one or did it become gradually worse?
From what I've understood, Opis only monitors where specific ingame sources of lag may be. The issue has been from day one on the server (which was literally the day before starting this thread), and not only on this server but basically _every_ minecraft server I start on the computer (but no other games).
It's also remained through various reinstallations and testings of different Java (including java 8), and a full formatting of the disk and reinstalling everything.

Right now it's affecting every server I start and the comp was cleaned yesterday, including de-dusting the hardware.

I feel like I'm either doing something _wrong_, or there is something wrong with the computer.[DOUBLEPOST=1410777743][/DOUBLEPOST]
opis opis opis... See the tick rate to see if it even is server lag and find what's causing it.
It is server lag, and again, from what I know opis only checks for in-game causes, which this is not.

If the CPU usage on one of the cores is maxing out, HDD usage high or RAM remains close to maximum, then your server is getting overloaded.
I know this. RAM is fine, the processor often goes high though. The HDD is old, and I do think that could be part of the problem.

Reducing the load on the processor would probably be good, but I don't think that's the whole issue.

If you're on an old HDD a RAMDisk will help massively, download 'RAMDisk' and put your MC instance on there, 2gig to the disk and 3gig allocated to MC, helps with write and save times.
Not to sound ungrateful - I'm really grateful for all the ideas and help I've gotten on this forum, but it was literally in the OP that I've already tried a RAMdisk and that it did not help.

For high CPU and RAM, use some JVM arguments... If none of that works then you're out of luck I'm afraid
And then I ask, what JVM arguments? That's kind of the question in the OP. I've tried copy-pasting various "server optimization guides" but that didn't help, and since I don't know what anything does and can't find a guide over what does what, I couldn't figure out what arguments I should have and not.[/quote][/quote]
 
Last edited:

Wagon153

New Member
Jul 29, 2019
3,148
-3
1
-server tells java to run the instance as a server. -XX:MaxPermSize=128M will tell Java to dedicate 128 megabytes of RAM to the permgen, giving the mods some breathing room. Also, Opis is the other way around. Opis is for server side lag.[DOUBLEPOST=1410778237][/DOUBLEPOST]-server tells java to run the instance as a server. -XX:MaxPermSize=128M will tell Java to dedicate 128 megabytes of RAM to the permgen, giving the mods some breathing room. Also, Opis is the other way around. Opis is for server side lag.
 

ScottulusMaximus

New Member
Jul 29, 2019
1,533
-1
1
Do you have Java64 installed on the server?

FFS get OPIS and run it, not using a diag tool just cos you don't THINK it will work is silly, if you knew what the issue was you wouldn't be here, if it gives you nothing at least you've tried it.

Those JVM's you're using are allocating 8GB to MC, a RAMDisk as well with only 8gig of RAM installed would cripple your server, a RAMdisk WILL help if you set it up right...

JVM argument thread here: http://forum.feed-the-beast.com/thr...-thread-on-java-arguments-been-updated.48285/, not going thru all of it to spoon feed you, should get you started on how to set up JVM's though
 

Vilmos

New Member
Jul 29, 2019
84
0
0
If you tried a RamDisk and that did not help then the HDD is out of the equation as nothing for storage is faster than a RamDisk.

The problem will be your CPU being overloaded.

OPIS might help you find the source of the excessive burden on your CPU.
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
If you tried a RamDisk and that did not help then the HDD is out of the equation as nothing for storage is faster than a RamDisk.

The problem will be your CPU being overloaded.

OPIS might help you find the source of the excessive burden on your CPU.
or the ramdisk is overloaded