1

This isnt the typical Minecraft bandwidth question. Im more wanting to know WHY the usage is so high, even on vanilla.

By default just starting out, MC stabilizes to around 3-6KBps transfer rates. Thats fine. I so much as cut down a tree and build a 10x10 house out of the wood planks, this shoots up to and stabilizes around 32-42KBps.

Id like to know WHY this is happening. What on earth is needing updates so constantly that it cant send a "do you still exist?" "yes I do" exchange a few times a second for 1000x coords and what ID it contains, compress that and send it in a less than 5KB exchange? Why the constant 40KB exchanges? Im really curious because Im on a metered connection and this is killing my agility to play much with my friends. Also, when I leave these areas far enough the usage goes back down to 3-5. There are no machines. Just planks.

3

Minecraft's networking is not the most effective and as soon as you edit a chunk it sends all of the data of that chunk back and forth from there on out.

That is basically it... chunks are not small data and when it can no longer do that 'this chunk is clean nothing to see here' check, well then it just sends it all.

| improve this answer | |
  • Yikes, thats really bad. Chunks are small data though, so I dont fully understand why the issue is as massive as it is. 4096 cords with IDs each (approx). Worst case would be 16x16x16 (last block) id 9999. So lets say all blocks needed 10 digits to have a place in a chunk. Now lets say in the MC universe (or a typical play area of my size) its 16 by 16chunks. So 14 digits in my play area to ID a block within it so MC can paint it and apply whatever special things it needs to to that block. Im ignoring entities etc. due to compression should be more than enough to make that irrelevant. – Paul Duncan Oct 27 '15 at 2:26
  • So 14 digits x 20 ticks per second. is 280 bits of data per second. Still uncompressed. What in gods name is minecraft doing even if its updating every single block 20 times per second for a 16 chunk range in every direction?? There is bad networking code then there is an atom bomb of bad. – Paul Duncan Oct 27 '15 at 2:29
  • @PaulDuncan Each block is 8+4 bits (ID+data), plus another 4 bits for block ids > 255 ("Add"). (16x16x16)x(12..16)/(8*1024) = (6..8) kB/section. Block and Sky Lighting have to be calculated server-side as well, since they pertain to the mob spawning algorithm, adding another 8 bit/block, bringing the number up to (10..12) kB/section. It's also possible that the game doesn't update per Section (16x16x16), but per full chunk (16x256x16), making every modified chunk (160..192) kB. This is before entities (both mobs and TileEntities), and compression, and per tick. – MrLemon Oct 27 '15 at 9:12
  • And yes, there is a ton of useless bytes in there, such as 16 block states (data) for stone brick stairs (which uses all of 1), but that's the core game code, not the networking code at fault. – MrLemon Oct 27 '15 at 9:16
  • Thanks MrLemon. I find it fascinating. I wonder how much this could be improved if the networking code was redone? Sure easy thing to say I know. Does anyone know if compression is applied at all before the data is sent to the client? That alone would smooth over most of the usless data without being that much of a CPU hog. Even light compression works crazy well on data transfer like this I imagine. Something like 10:1 at the very least. I'd image this would be huge for servers of 100+ people. – Paul Duncan Oct 27 '15 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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