Bookshelf is sending roughly 600 packets every second!
Darkhax opened this issue ยท 8 comments
For some reason, bookshelf is sending over 600 packets every second. This makes the mod a mess when installed on a server.
Which packet is being sent, if you can trace that then we can understand why. but i am guessing it is to do with entity properties
When adding Bookshelf-1.7.10-1.0.3.146.jar & EnchantingPlus-1.7.10-4.0.0.67.jar to our server, client network usage increase from 3 to 40kB/s download and increase from 10 to 15kB/s upload.
According to Opis shows notably:
S3FPacketCustomPayload 1396,80 packet/s 30,675 KiB/s 2,540 MiB
C17PacketCustomPayload 0 41,00 packet/s 10,573 KiB/s 936,769 KiB
Bookshelf 1499,60 packet/s 13,180 KiB/s 1,368 MiB
In other words, Bookshelf and a CustomPayload are sending 700 times too many packets to each client.
Furthermore, client is sending 2 packets of 257 bytes per ticks, which is both too fast and too big.
Issue is reproduced with Bookshelf-1.7.10-1.0.3.161.jar & EnchantingPlus-1.7.10-4.0.0.71.jar.
Issue is reproduced with just Bookshelf-1.7.10-1.0.3.161.jar.
This renders the mod unusable for most players.
I've fixed a network overload issue in ArsMagica2 recently. To put it simple:
- do NOT recreate extended properties or datawatcher
- do NOT set a value that is already set
Hey, I have already worked on solving this issue, but I have been busy spending time with family and such. The issue is caused by our packet for our IEEP. The issue isn't related to either of those things. We have a buff system which is essentially our own implementation of the Potion system. The way this was implemented was rather poorly, as a packet was being sent every time an entity joined the world, and every tick for every entity. There is also an additional packet sent for each potion on an entity. This lead to at least one packet per tick being sent per entity in the world, with additional packets in some situations.
In my brief tests, I managed to get it down to 1 packet per second per mob that has a potion effect, however I am not satisfied with the way I did it, and I think a conceptual rewrite of the potion system is required. Over all it should be an easy fix.
@lclc98 There is only one packet in the entire mod, so... I think it's pretty obvious what caused it :p
@LemADEC Thank you for helping us find out about this issue. This is a very big issue with our mod, and I am glad that we have found it before the official launch of E+. We should have a fix within the next few days.
I thought we had another packet but I am just confusing all our mods :P. I think a packet every 10 ticks isn't bad.
Glad I can be of help.
As I said above, there's 700 times to many packets. Decreasing to 1 every seconds, only gain 20 times.
I would recommend more like every 10 to 30 seconds for resync, and only send more frequently if there's an actual update.
Upon further investigation, the C17PacketCustomPayload isn't due to Bookshelf. It's a bug in Flaxbeard's Steampower. So, the bookshelf issue is only Server -> Client indeed.
The issue has been resolved to a point where I am comfortable with marking this as solved. As it currently stands, One packet will be sent when the effect is added, and another will be sent when an entity joins the world with an effect. This reduces the packet count down to virtually 0. I have run lengthy tests with the Bookshelf mod and entities with the effects and am satisfied with the change. Version 1.0.4.172 has been released, with the contained fixes.