Solved Massive lag on local server

  • 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

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
I've been having a lot of issues since starting my Unleashed server. There were some issues of minor block lag on Ultimate, but Unleashed is almost unplayable. I get a lot of block lag, rubber banding, server-client desyncing (I can move around, but animals and mobs are stuck in place), and quite a few client-side crashes (Java Timed Out errors) and disconnects. I'm the only one who plays on the server, and the computers are both connected to my router. I've changed network cables to both machines without any benefit and I don't have issues accessing the internet from either machine, so I don't expect it to be network-related. When I do a /tps in game, I have 20 tps in each of 3 realms that I have chunkloaded (overworld, nether, one mystcraft mining world) and my ping to the overworld is <25ms.

Here's my server stats:
CPU - Intel Pentium G870 (not using onboard video, so it's devoted to standard CPU duty, went with this over an older i5 since Minecraft doesn't multithread well/at all)
RAM - 8GB DDR3
HDD - 2x http://www.newegg.com/Product/Product.aspx?Item=N82E16822136891 HDD in a SATA3 RAID1 (Not the best, I know. Server was originally set up as data backup. My daughters got me a 128 GB SSD for my birthday next week, so I'll be migrating the server files to that soon).
OS - Ubuntu 12.X 64 bit
FTB - Unleashed 1.1.3, enabled BoP, Xeno's Reliquary, Power Converters, and Nether Ores
Chunkloading - 5 chunk radius in overworld, 4 chunk radius in mining mystcraft age, one enderthermic pump in nether.​

My ServerStart.sh is as follows:
java -Xmn2G -Xms3G -Xmx4G -jar ftbserver.jar
The only other activity for the server at the moment is running a Mumble server for my brother and me to use when we play vanilla together, but it's been unused for some time.
OK, I think that covers everything that you guys would need to help me. The only cause that I could see is my HDD being the culprit, but the machine runs a vanilla server flawlessly when I fire that up which I would think wouldn't have all that much less read/write attempts as Unleashed. Maybe I'm wrong. If I am, will the SSD make a big difference? Should I beg to open my gift early?
 

Staxed

New Member
Jul 29, 2019
1,019
-2
0
the i5 would have been better, even though MC doesn't support multithreading...the cpu itself is better even for single threaded applications. The pentium may have a higher clock speed, but the i5 has a more advanced architecture and although it may process a bit slower...it has less work to process.

http://www.cpu-world.com/Compare/329/Intel_Core_i5_i5-2500K_vs_Intel_Pentium_Dual-Core_G870.html

I'm willing the bet the issue is the cpu (this would explain block lag and rubber banding), the SSD upgrade will help as well when that happens.

As for your client crashes, that's a different issue and we'd need to know details on the client hardware as well.

Also, I don't think this will have any effect, but it might...you don't really need the -Xmn parameter set...Java7 is pretty good at self managing the heap size. (which prings another question, is Java updated on server and clients? Clients only have 1 java type installed?)
 

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
the i5 would have been better, even though MC doesn't support multithreading...the cpu itself is better even for single threaded applications. The pentium may have a higher clock speed, but the i5 has a more advanced architecture and although it may process a bit slower...it has less work to process.

http://www.cpu-world.com/Compare/329/Intel_Core_i5_i5-2500K_vs_Intel_Pentium_Dual-Core_G870.html

I'm willing the bet the issue is the cpu (this would explain block lag and rubber banding), the SSD upgrade will help as well when that happens.

As for your client crashes, that's a different issue and we'd need to know details on the client hardware as well.

Also, I don't think this will have any effect, but it might...you don't really need the -Xmn parameter set...Java7 is pretty good at self managing the heap size. (which prings another question, is Java updated on server and clients? Clients only have 1 java type installed?)


The 2500K was also nearly triple the price, and would have been more than I paid for the mobo, RAM, and PSU (and maybe the case) combined. It simply wasn't in the budget nor was the server built with the intention of hosting FTB, it was built for hosting vanilla. Don't get me wrong, my client runs an overclocked 2500K flawlessly and I love it, but the firepower of the G870 isn't all that far behind the 2500K, especially when you consider that the G870 is essentially *only* running FTB and is running a much lighter weight OS than Win7.

The server is running the flavor of JVM 7 that comes packaged with Ubuntu. Client-side is running 64-bit java and is up-to-date (even updated yesterday again to see if there were any new benefits). There haven't been any error logs generated by the crashes, which is frustrating. FTB just simply closes, although it usually happens when I'm fighting a mob.

The client stats are:

CPU - i5-2500K O/C'd to 4.0 GHz
RAM - 16GB DDR3
HDD - 120 GB SSD (OS & Java), 64 GB SSD (Minecraft) both SATA3
OS - Win7 Pro 64-bit
VC - 560ti, drivers last updated...? No idea. Probably 5 or 6 months ago.
Java - 64-bit, updated 8/29/2013
 

Staxed

New Member
Jul 29, 2019
1,019
-2
0
The i5 is 20% better in nearly every aspect, so I would beg to differ that it isn't that far behind, however...completely understandable to keep with a budget...probably the one I'd have gone for as well if the money was the determining factor :).

The server is running the flavor of JVM 7 that comes packaged with Ubuntu.


But did you update that version? Ubuntu might not come with the most recent version of java (I know CentOS doesn't).

Without crash logs it's gonna be hard to figure it out, the specs of both machines seem fine for what you are trying to do (other than the server cpu/drive..but I doubt that would be a problem with such a small server).

Also, just in case (you seem to know what you are talking about, but you never know so just making sure)...you did remove and leftover previous versions of java before/after updating right?

How much RAM have you allocated to FTB? Have any parameters set in the client? (Java Time Out Errors can sometimes also be caused by intermittent firewall/antivirus checks/scans running...rare, but it can happen).

Just throwing out some ideas.
 

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
But did you update that version? Ubuntu might not come with the most recent version of java (I know CentOS doesn't).


Yeah, updated everything as recently as last week. I'm not entirely sure that it's Java-related because the vanilla server runs flawlessly, although it is 1.6.

Without crash logs it's gonna be hard to figure it out, the specs of both machines seem fine for what you are trying to do (other than the server cpu/drive..but I doubt that would be a problem with such a small server).

Yeah, it's been frustrating.

> Also, just in case (you seem to know what you are talking about, but you never know so just making sure)...you did remove and leftover previous versions of java before/after updating right?

Completely wiped out everything Java in the program manager before reinstalling.

> How much RAM have you allocated to FTB? Have any parameters set in the client? (Java Time Out Errors can sometimes also be caused by intermittent firewall/antivirus checks/scans running...rare, but it can happen).

10 GB of RAM is allocated to FTB in the launcher. I haven't modified any other parameters client-side. I don't have any issues with frame rate lag on the client side, but the crashes *do happen* when I play on my SSP world as well.

For firewall, I'm just using Windows' firewall offering. For virus scan, it's AVG which is set to update at midnight and run at 2 am (well outside of my play timeframe).
 

Staxed

New Member
Jul 29, 2019
1,019
-2
0
Guess I'm going to let someone who might know a bit more about it come along, as I'm out of ideas as what it could be without a crash log :( sorry.
 

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
Guess I'm going to let someone who might know a bit more about it come along, as I'm out of ideas as what it could be without a crash log :( sorry.

Thanks for giving it the old college try, I really do appreciate your help... :(

My understanding is that if it was a server-side CPU bottleneck, that my TPS would be taking a hit, but I've never seen it under 18 in any realm, even during server-client desynchs. Is that right? The weird thing is that I didn't have any of these kinds of issues when I ran FTB Ultimate for the past 6 months with the exact same configs and rigs, but Unleashed has brought my server to its knees.

I'm hoping that it's those poor-performing hard drives. Maybe I can convince my wife to let me open the SSD this weekend...
 

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
Figure I should update this thread: Installing Tick Threading and tweaking the JVM arguments from Eyamaz solved my problems! The server now runs butter-smooth! I was even able to fire up my bank of industrial steam engines again without bringing the server to its knees!

Really can't say enough about all the awesome work that went into those two threads on these forums.
 
  • Like
Reactions: Staxed

Staxed

New Member
Jul 29, 2019
1,019
-2
0
That reminds me, I need to take a look at the Tick Threading thread still. Glad you got it fixed!
 

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
That reminds me, I need to take a look at the Tick Threading thread still. Glad you got it fixed!

I couldn't believe the difference those two changes made. It's now like I'm playing SSP on my main (client) gaming rig, there's that little lag. I haven't had a chance to see exactly what kind of CPU utilization they freed up (dealing with two sick kids and a 7-hour long power outage this weekend, bleh), but the performance speaks for itself.
 

Cozza

New Member
Jul 29, 2019
320
0
0
Be careful with TickTreading on Unleashed. It is very broken and nallar is no longer supporting it.

It still makes a server run like nothing else but it introduces a plenty of new bugs.
 

IlliniJeeper

New Member
Jul 29, 2019
24
0
0
Be careful with TickTreading on Unleashed. It is very broken and nallar is no longer supporting it.

It still makes a server run like nothing else but it introduces a plenty of new bugs.


My server has run for the better part of a week 24/7 with Tick Threading and I haven't noticed any bugs. I certainly haven't had any crashes or corruption issues, either. What, exactly, should I be on the lookout for?