Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

There are lots of articles on how to decrease lag by tweaking graphics settings, setting up graphics cards appropriately etc. That solves the problem for most, and while that helps, that doesn't get at all my problems.

I have a very large farming area, with mobs (hostile and passive), tons of redstone circuits, water channels, literally 1000's of hoppers, chests, 100's of minecarts, etc.

So, what (if any) of these cause more lag than others?

Clearly MOBS are a resource hog. If I have 100's spiders in my spider trap, or 1000's of chickens in my chicken farm the game is essentially unplayable. So, I've tweaked all the farms to reduce mob populations dramatically, and the iron golem farms have absolute minimal (16) numbers of villagers. This has helped enormously, but as I continue to grow the farming operations into new products, I'm starting to see more lag appear.

Any anecdotes or data on how much CPU various other in game mechanics consume? Things like:

  • Hoppers Dispensers
  • Redstone Circuits
  • Lava (still, or flowing)
  • Water (still or flowing)
  • Running Minecart?
  • Stationary minecart?
  • Item Frames and Paintings? (Both are entities, so do they consume more CPU resources?)

other things I've missed?

Thanks

share|improve this question
    
Well if you have a lag machine it's going to lag :P. But seriously, change your render distance and kill unnecessary graphics. –  Jeffrey Lin Mar 30 '13 at 14:55
    
I have changed both render distance, shut off all unnecessary graphics, and it's still very laggy. One of my farms is killing perforamnce, and while I could dismantle them one at a time to figure out what's causing the problem, I was hoping to go into it a bit more ... scientifically? –  John Mar 30 '13 at 15:41
4  
shift-F3 will provide a debug profiling pie chart, you can press 1-9 to go into a section and 0 to go back to root –  ratchet freak Mar 30 '13 at 23:27

4 Answers 4

up vote 3 down vote accepted

Other than the typical solutions such as installing optifine, you can also dive deeper into the game mechanics and modify those to improve performance.

Vanilla achieves 'random' growth by selecting several thousand blocks each server tick, checking if they can grow or decay, and if they can, applying the growth or decay. This is the 2nd biggest drain on CPU, behind entities.

Seeing as its a farm... there's going to be a lot of calculations going on.

You can of course reduce this number of blocks per tick by installing Spigot and changing the config there, at the cost of slower growth of your crops on your farm.

There are various options you change to be checked at slower intervals, just a few are:

  • Snow form
  • Ice melt
  • Reducing number of mobs that spawn (those in caves under your farm still use up resources)
  • Leaf decay

Of course, upgrading your hardware is probably the most effective solution. It is most likely that the CPU will be your bottleneck, but RAM may also be the issue. Use F3 to check the RAM usage in-game.

share|improve this answer

Hoppers definitely can introduce lag. I had a large drop-collecting area without about 1k hoppers that I replaced with a hoppercart (which is able to pull though full blocks). Still creates server-side lag, but not nearly as much as a huge field of hoppers.

Not sure why iZanoVic suggested furnaces to cap hoppers-- I'd assume that any block would "cap" a hopper and make it stop searching for items to slurp up. I've noticed lag improvements (as measured by number of 'cannot keep up' messages in the bukkit log) simply by putting cobble blocks on top of long hopper ducts.

share|improve this answer

water doesnt get random updates, it needs a block update to see if it needs to flow somewere. If you have a dispencer dispencing water, it causes lagg, if it is already at its max length or standing water, it doesnt cause lagg. Hoppers cause a lot of lagg, since it checks for items above the hopper, a tip to reduce the lagg here is use water-streams to transport items horizontal. Also you can put furnaces above hoppers to reduce lagg (it cant take items anymore then, so wont check for items above). Question: Are (not moving) storage minecarts (filled with items), way more laggy then normal chests (filed)?

share|improve this answer

Redstone circuits require a lot of calculations, as do flowing water and lava when it is changing the path if its flow. Those are the two things most often responsible for lag in Minecraft. If you have constantly-changing flows and many redstone circuits, that will bring the world to its knees.

Hoppers are the unknown element here. They're so new that their performance behaviour and code is not well known, so there's very little received wisdom about them. However, being a new feature, it's very likely that they're not efficiently programmed yet – having thousands of them might be significantly contributing to lag. If you reduce or eliminate excess moving fluids and redstone circuits and still have significant lag, this is where I'd look.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.