UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control

, Sat Jan 19 2013, 02:08PM

Hi All

The lure of BC pipes is their low cost. But they are a Bad Thing (tm). Everytime you place a BC pipe, a bunny/santa/$deityOfChoice cries.

So Pneumatic Tubes are the One True Way.

Here's a simple system for preventing quarries overflowing and lagging the server to the point of being unplayable. The odd thing is that it's quicker to make than explain so apologies for length...

TL;DR: Don't use BC pipes. Use Tubes. This is one way of not losing items and not killing the server. And bunnies.

Normal

The long tube to the right heads off to your Storage/Factory/Recyclers &c

Components:

Pneumatic Tubes
Redstone Tubes
Restriction Tube
Item Detector
Relay
Quarry
Energy Link

Tools:
Screwdriver/Sonic Screwdriver (to turn/rotate machines)

Summary:

The restriction tube (circled in red on the first image) makes the Item Detector (ID) the least preferred destination.

The single tube on the ID stops it spitting items on the ground. (Thus defeating the whole purpose of this exercise!)

The ID is set to "Stuffed Mode" by right clicking and pressing the button twice. (The other two modes are Item mode and Stack Mode). Stuffed Mode is easily recognised by the Red Cross through the button.

Setting

The ID's stuffed mode emits a redstone signal when stuffed (coincidentally enough...)

Jammed

This signal is sent via Redstone Tubes to the Energy Link, which halts power output. (You could use wire, dust &c but this is neatest imho)

The Quarry has internal energy storage and will continue to run even when the Energy Link no longer supplies power.

The Relay serves 2 purposes:

1) Sends items down the tubes without need of a timer or other redstone pulse source.

2) Provides somewhere for the excess items from the Quarry to go when your storage is full/jammed/etc. A Relay has 9 slots which should be sufficient to store items from the Quarry until it runs out of power.

Restarting the system:

1) When you note that your Quarry has stopped and the Redstone Tube is lit, you have a problem in your tube network. Find it, clear space, unjam the sorting machine, whatever is applicable.

2) Empty the relay - this will probably happen anyway when you unstuff the tube network.

3) Either remove and replace the Item Detector or rotate it with a screwdriver until it is back when you started. When you to this you'll notice an item being spat out.

Random:

The Item Detector has an annoyance - you can't see the item that is jammed in it, hence the need to remove or rotate. But I understand this choice - if you just pull the item out it'll immediately jam again but, well, um... there you go.

Thanks to all CFUK Tekkit players for their assistance and critiques this is a much smaller system than the hugely over engineered solution I first created! (Especially to Boriseng, Wintershot, TechMav and my guinea pig/victim of choice, Rakkazoid)

Apologies to diablothe2nd for appropriating his post format smile

Comments, Improvements, Reasons why I should be committed for my own safety and of those around me &c very welcome. Arguments over CamelCase not so much... wink
Re: UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control
boriseng, Sat Jan 19 2013, 08:22PM

I think its still effective if you put the item detector "inline". The difference is that if the downstream jam clears then the system quietly restarts.

Also the relay will accept items from the quarry through its side faces as well as the designated input, this should allow a dense 2x2 quarry control system.

Also further relays placed inline at intervals along a long tube will prevent stuffed items wandering up and down the length of the tube, though with redpower tubes it doesn't really matter. A dummy item detector may have the same effect (untested).
Re: UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control
, Sat Jan 19 2013, 09:59PM

Yeah, I thought about that, but putting relays in along the line means that you're running your system too close to the wire for my tastes, and just pushing the problem along. additional chests would do the same, but I'm not really looking at the receiving end, just looking to prevent entities around quarries and pipe joints &c

There's a fine line between optimal and squeaking at the edges smile

What worried me about having the item detector inline is that there is a greater possibility of quarry spitting items since the relay will fill before the item detector spots the problem. So the quarry will eject items onto the ground until internal storage runs out.

I may of course have completely misunderstood both your point and the functions of the machines smile

I like the principle as this reminds you to be aware of your tube network/quarry. A quiet restart is fine but that doesn't make people aware of potential problems. This approach is sort of diagnostic, perhaps?
Re: UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control
boriseng, Sun Jan 20 2013, 12:35PM

I'll try putting it to the test, but I'm almost certain the item detector reports stuffed as soon as the downstream storage fills up, and doesn't wait for the upstream storage to fill,meaning there should still be nine slots of buffering left.

The tubestuff buffer has some potential as a control as well.
If you use it to trigger a state cell set to about 1.5s then use the state cell to inhibit the energy link you should get a system where the power to the quarry is on for 3/4 of the time initially, then as the buffer fills the on time will drop and should cut off at 2/3 full.

I'm also intrigued as to why the item detector shows an
inventory, and I'm wondering if in item or stack detection mode does it have an "undocumented" matching function, where it only pulses on a specific item type.

Re: UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control
boriseng, Sun Jan 27 2013, 07:11PM

2016 Observations (well it said "update required")

There's been a distinct reduction in the number of "spammy" machines, replaced by machines with internal storage or machines that will only output to an inventory. Buildcraft (and the quarry) isn't even in the CC pack. I notice that some/possibly all MFR machines now only output if there is a valid destination.

Having said that some exceptions will still exist...

Vanilla solution: Place a single regular chest or hopper to collect items. Use a "safe" item transport to empty the chest. Then...
Monitor the chest with a redstone comparator. Set the length of the redstone trail so it allows the chest to get about half full before it inhibits the machine. As before make sure it doesn't cross a chunk boundry otherwise some other player approaching may cause your system to get only partly loaded so the machine gets loaded and the "turning it off" section doesn't.

JABBA solution: barrel with void upgrade. This will continue to accept items when full. Only effective for single item type per barrel but could be used for dirt and cobble?



OK this is kind of a correction to the above, the relay won't output directly to the item detector, which means it's not quite as neat as I'd hoped, but one tube and one redstone dust fixes it.

Regarding the overrun:

The quarry will output half a stack (maybe a full stack if HV/Energy Link powered) before it stops, so if you're incredibly unlucky its theoretically possible to drop a few items but in practice its not going to happen.

I'm not sure about a stop-start situation but I'm presuming the quarry won't restart instantly either, so if there is enough in the relay to keep the detector stuffed then it should stay stuffed and the quarry stay off till the relay clears.

The only scenario where I could see a potential problem is if there is an excessively long tube after the item detector. As far as I can tell when things block up downstream an item has to bounce back up the tube to the detector before it will report jammed. However the overrun that does make it through the detector will simply remain in the tube going back and fourth till the backlog clears, it won't reflect back into the relay.

That's one advantage of schizmat's method, it takes advantage of how tubes route and will respond sooner.

Also a final hidden "gotcha":

If you align your quarry's area up with chunk boundaries then its inevitable that one face of the quarry machine will lie on a chunk boundary. DON'T USE THAT FACE FOR THE RELAY or its remotely possible that the quarry could be loaded and the relay not. It can happen.

Ideally the quarry, relay, item detector and energy link should all lie within the same chunk.



Re: UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control
squaffle, Tue Feb 05 2013, 01:36PM

Just implemented the "schizmat method" with jacketed redwire and a lamp instead of the redstone tube (so I can see easier).
Also aligned inside one chunk as that's what caused my spill a bit back; only the quarry chunk loaded and rest of tube network didn't so effectively no'where to send items.

This seems genuinely spillproof so thanks ^.^
Will report any issues/nuances
Re: UPDATE REQ - Preventing Server Lag - Cheap and simple quarry overflow control
, Tue Feb 05 2013, 03:08PM

Would be good to see a screenshot of that (BT permitting of course) wink

I'd love to see varients on the idea.