I'd like to pick a few brains

  • 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

WTFFFS

New Member
Jul 29, 2019
768
0
0
I'll preface this with I'm running a roll your own pack on my home server and frankly it's starting to really annoy me I'm getting what looks like TPS lag (entities moving jerkily, block breaking "resetting" etc) but when I run the /forge tps command or the /tps command added by servertools my mean tick rate is 20 which is fine the mean tick time however is hovering around 30 which is I think maybe the cause of the issue?
I'm using opis and I have removed and\or rebuilt any of the machine lines that had a high usage via it's report and it hasn't made a difference I did /killall (servertools command love that mod) about 700 butterflies which made a small amount of difference but not much at all. I guess my question is does anyone know of any way, other than replacing the hardware (ran the same world on my system once again improved it a small amount) to regain the tickrate I used to have?
Using the Java Arguments from the thread in support with 3gig allocated (6gig in system total) processor is an E4500 HDD is 7200 80gig. My system which showed a small improvement, I seriously would have expected more, i5 4570, 4gig allocated (tried 6 no difference) of 16gig, SSD. With that I would have seriously expected a much greater improvement than was shown the mean tick time went from 30 to 26, it's got me stumped.
 

Bomb Bloke

New Member
Jul 29, 2019
612
0
0
A slow tick rate will typically cause things like blocks breaking some time after they should, days/nights taking longer then they should, and in general things completing but taking more time then usual to do so. This is not a form of lag, but rather just your server running slowly because it has more work to do then it can handle. That work may include, for example, programs that it's running in addition to MineCraft.

It sounds like what you're getting is a form of lag - this is where the client process is having some sort of difficulty in communicating with the server process. For example, you break a block, but the server doesn't get the full message about you picking away within the sort of time frame it expects, so it refuses to accept that the block is broken. When the client eventually cottons on that the server believes the block never got mined, it pops it back into your view. Likewise with jerking mobs - you don't see them moving smoothly because their movement path isn't being communicated smoothly.

Assuming the client and server are on different computers, start out by rebooting them along with the rest of your networking hardware (ideally, anything in your house that uses the network for anything, but at a minimum you should be restarting your modem and/or router). Make sure your modem and/or router aren't overheating - they should ideally have at least a foot of airspace around them, and placing them on a cloth/carpeted surface is a big no.

Have a think about what software gets used on that network which would generate such an amount of traffic that your game could experience lag. BitTorrent software in particular can put a heavy strain on networks due to the sheer number of connections it likes to open up (even if you aren't uploading/downloading any actual torrents while it's running).
 

WTFFFS

New Member
Jul 29, 2019
768
0
0
I tried resetting my network didn't do anything, didn't really expect it to since I imported the world from the server to my main system and it still exhibited the lag, ok fair enough overloaded\slow tick rate issues, which it really shouldn't have on the main system unless something in there is doing very wrong things.
 

netmc

New Member
Jul 29, 2019
1,512
0
0
The common piece in this is your system. Background processes can severely impact performance. If you have multiple anti virus programs running with an on access scan, that can impact it. Since you have tried it with both a hdd and a ssd without change, it probably isn't drive related. it isn't likely memory either as allocating more ram and changing the java configs didn't change things. I would look at IO bottlenecks. If you are on Windows, try running msconfig and boot with a diagnostic startup. Go to the services tab, hide the Microsoft services, then disable everything else. Disable all the startup items. Rebooting with this setup enabled should show the absolute power of your machine unhindered by all the other programs in your system. If you haven't already run an anti malware program like malwarebytes mbar. You may have picked up something that is causing you these problems with network lag. What you described sounds more like network lag than computational limitations. Many malware programs will cause excessive network lag creating fake ad clicks that you never see, but is normally not noticed when browsing the web or normal computer use. It is only when using network programs that need a low latency connection that these things become apparent.
 

WTFFFS

New Member
Jul 29, 2019
768
0
0
I tried it again with my main system acting as the server and connecting to it from my kids computer (CPU: E6750) (I have a third system which I have been using as a server) the tick rate issues were much lessened by running the server on my main system (CPU: i5 4570) vs the original server (CPU: E4500) but still present. I have nothing running in the background on any of the machines, I check for "odd processes" once or twice a week due to the kids comp being on the same network and due to kids being kids :)

It looks to be computational lag which is frankly somewhat discouraging an i5 4570 is not enough processor to run a heavily modified Minecraft (124 mods) cleanly?

I checked the performance monitor in task manager on both the E4500 and my i5 the basic one reports 50% cpu load on the E4500 and 20% on the i5 but the more detailed one (which gives a by core breakdown) shows the real picture, there is only 50% load on the E4500 but that means that one core is showing 100% usage and the i5 system is showing 85%+ usage on one of the 4 cores which is the core that java is running on. Minecraft (or at least modded Minecraft) really seems to need to be multi-core aware. I mean my i5, while not the best around, should be able to run a game (even heavily modified minecraft) competently.

I also installed and ran the JDK (7u51) to use the VisualVM profiler it shows the heaviest load in my world as being TE conduits which is to be expected since I have a lot of conduits and a lot of items moving through those conduits but they shouldn't be causing this sort of issue unless KingLemming has been lying to us or I've buggered something up. Going to try removing\retracing all my conduit runs to make certain I have no odd "tangles" in them anywhere which shouldn't be causing problems but hey it might.

Maybe someone can point me toward something else I can try, I mean for a 1-3 player world with not a huge amount happening (it's usually just me on the world and I don't have a huge amount of stuff compared to many I've seen) I would have thought the E4500 would have been ok, maybe a lil slow and the i5 shouldn't have any issues.
 

kaovalin

New Member
Jul 29, 2019
782
0
0
Effciency depends largely on how they are set as well. I read when TE item conduits can't send items they get a little laggy (in large numbers) trying to recheck a lot more often than if they were working normally. If many of your TE item conduits are backlogged it could really lag down a system. Hoppers are even worse on a system when they cant input into a system (at least that's what I've read). You may try to throttle your system to prevent this and the lag. Without seeing your setup in action it can be hard to be any more specific.

It could also help to use opaque versions to sidestep any rendering issues you may have.
 

Omicron

New Member
Jul 29, 2019
2,974
0
0
I've profiled my world with JVisualVM as well, and there's something regarding conduits (and itemducts and fluiducts) you should know: they show up so high in Opis and profilers because they are essentially multiblocks. A branching energy network of 100 conduits will show up and tick as a single tile entity. And obviously, that energy network of 100 conduits is going to take many times more to run than a single conduit would. That doesn't mean that conduits are inefficient; it just means that instead of 100 tiny entries, you get one large one.

While you are in JVisualVM, the first thing you should look for is the main server loop's self sleep time. If that is at 0, then that means your CPU (or rather, the single core that handles the server thread) is at 100% load all the time. I've had this happen through chunk leaking, where chunks that were once loaded didn't correctly unload. It's a creeping process. Over the course of a month or two on a server that was up a few hours each evening, this got so bad that nearly 80% of the CPU time was consumed by doing entity calculations in chunks that weren't even loaded. needless to say the game was unplayable at that point. I fixed it by switching to MCPC+, which includes countermeasures for this kind of thing. Depending on the mods you run, this may not be a option for you, since not all mods support runnng on MCPC+, but I was lucky and didn't run into any incompatibilities.

If you play singleplayer and find yourself CPU limited, you can also try switching to multiplayer. That is, set up a local server on your computer and connect to it (localhost or 127.0.0.1) with your client. This splits the calculations the client does apart from the calculations the server does, so instead of one thread you are now using two, and therefore are not bottlenecked as much by a single core. Of course, 90% of the work will still end up on one thread (the server thread), but sometimes a little breathing room goes a long way.

If your main server loop is finding time to sleep but you still get a stuttering experience, you may be having issues with garbage collector passes. This may result from assigning too much heap memory on either client or server side or both (or just client, if you play SSP). More than 2GB tends to do more harm than good, unless your pack doesn't even start with less. I personally run my server with 2GB (supporting 3-4 people concurrently) and my client with 1GB.

Garbage collector performance is often an issue with homebrew packs because you launch them differently than FTB packs. Prebuilt launchers like FTB or MultiMC sometimes pass default arguments to the JVM that aim to improve performance in large modpacks, but if you set yourself up a new profile in the vanilla launcher for your homebrew pack it generally comes without arguments. Try adding -Xincgc and see if it changes anything. It may or may not, so look at it carefully. JVM arguments are not a miracle cure, even if they can help a little on occasion.
 
  • Like
Reactions: MigukNamja

WTFFFS

New Member
Jul 29, 2019
768
0
0
I'm running a dedicated server already, I'm also using the Java Arguments from the thread in support on here for Multi-MC for my machine that is running the client, the server is using the arguments from the same thread, started via .bat, I've set the memory at 3gig out of 6 total on the server and my client is running 6 (cause I can, I've tried 2,3,4 and 6 it does nothing either good or bad lol) I'm looking at the heap size via JVisualVM right now it climbs to a little over 1g then the garbage collector fires and it drops to Around 500m, PermGen is happily chugging along at 90 out of 256, The server thread is getting 4-5% "sleep time".
All of that is why I started this thread I'm basically out of ideas and things to try to see why this bloody thing is being a PITA, I mean it should be working ok at least but it isn't. The only thing I haven't tried is MCPC+, time to do some more research looks like.

Edit: Well my server is now up and running on MCPC+ all the issues are gone and it seems stable with my current modlist guess only time will tell if it is. CPU usage has dropped from 50-80% (counting both cores) to 20-30% with very occasional 50% spikes, WTF "sleep time" is now at 67%.

Guess the vanilla server code is kinda crappy, well no it is crappy and bad and it smells terrible and it gave me herpes.
 
Last edited:

Omicron

New Member
Jul 29, 2019
2,974
0
0
Good to hear that it worked out for you! Personally I encountered only one strange issue, namely with Thaumcraft. After chopping down Silverwood trees that contain nodes, MCPC+ doesn't seem to correctly remember the fact that these nodes get removed. Then on next startup, it spits out a bunch of scary-looking error messages about failing to place a node in the world. However these messages eventually stop cropping up after a few more restarts and nothing actually breaks. It's just a little derp with a mod that offers no official MCPC+ support, so such things are to be expected.

I was honestly surprised that both TiC and IC2 Experimental ran without the slightest hiccup, I thought those would be the first to scream bloody murder.
 

WTFFFS

New Member
Jul 29, 2019
768
0
0
Well after running overnight I found that the issue is back but I am fairly certain I've discovered the root cause of it this time I have a TE itemduct run feeding charcoal to a group of 20 Steam Dynamo's it seems as though the duct is still outputting even when "stuffed" there was enough charcoal in the run that when I dismantled it (which I have to do again once the dynamo's have eaten a lot more) it crashed the world due to the sheer amount of charcoal hitting the ground, think spewing quarry\broken overstuffed pipe levels of items on the ground. Still going to use MCPC+ anyway as it was still much better loadwise under that as under a plain vanilla server.

Edit: Cleared the backlog in the ducts I have 20 dynamo's yet I pulled almost 350 stacks of charcoal out of the ducts. In some respects it just shows that the TE ducts are good I had 22k+ charcoal bouncing in that duct and while it did slow my tickrate to a crawl it didn't crash my server.
 
Last edited:
  • Like
Reactions: MigukNamja

MigukNamja

New Member
Jul 29, 2019
2,202
0
0
Edit: Cleared the backlog in the ducts I have 20 dynamo's yet I pulled almost 350 stacks of charcoal out of the ducts. In some respects it just shows that the TE ducts are good I had 22k+ charcoal bouncing in that duct and while it did slow my tickrate to a crawl it didn't crash my server.

I had major itemducts issues with a smaller, but similar setup in my previous world. I had a bank of Centrifuges fed by a "common rail" itemduct, which was fed by an Ender Chest. I also had a similar setup for squeezers. On several occassions, I would have to dismantle all the itemducts in the "common rail" to clear the "stuffed" items, and I would get an ungodly amount of stuffed items. However, that was a temporary fix only. The overstuffing would come back. I could swear this was causing excessive server CPU usage.

Note that was I using different kinds of combs to Centrifuge and different kinds of things to squeeze.

I'm not sure Itemducts handle different item ID inputs with different output possibilities, and both the input items and output item IDs changing over time. I never had an issue if the itemducts could be drained, i.e. always a place to put the items. I would only hit the issue when the itemducts got backlogged and there were different types of items on input attempts. I played around with filters on the input and/or the output (different combos), but that didn't help.

This world, I will not be using itemducts if there is a possibility of different input item IDs and backlogging. I will use AE in those situations. AFAIK, AE does not do intermediate buffering and does not "roll back" insertion attempts like TE3 itemducts do.

While I'm a huge, huge fan of TE3 and have a lot of respect for the code, I suspect the TE3 itemducts have issues in more complex situations.
 

Bomb Bloke

New Member
Jul 29, 2019
612
0
0
Good to hear that it worked out for you! Personally I encountered only one strange issue, namely with Thaumcraft. After chopping down Silverwood trees that contain nodes, MCPC+ doesn't seem to correctly remember the fact that these nodes get removed. Then on next startup, it spits out a bunch of scary-looking error messages about failing to place a node in the world. However these messages eventually stop cropping up after a few more restarts and nothing actually breaks. It's just a little derp with a mod that offers no official MCPC+ support, so such things are to be expected.
About that - I thought the nodes were supposed to stay, or did that change?
 

Tristam Izumi

New Member
Jul 29, 2019
1,460
0
0
How do you capture these nodes ?
Don't use an auto-chop tool/mod to cut down Silverwoods; that will destroy the node logs along with the normal logs.

You need to chop down any nearby logs and clear away the leaves around the node logs (they'll have a black spot on them so you can identify them, aside from the glowy node inside it). Then you can make a jar around the node log to bottle it like a normal node.
 
  • Like
Reactions: MigukNamja