ChunkRetard 0.1.4.3

Slow and rearrange chunks on their way to clients

  1. Wizel603
    Aggressively rearranges chunks sent by the server in order to fill in areas nearest to the player first, and limits the outgoing speed of chunks to a configurable rate. This plugin is aimed towards servers hosted on connections that have a low outbound capacity but still have a good enough end-to-end delay to handle several players connected at once.

    Dependencies
    Features
    • Sends chunks slower to avoid saturating the connection.
    • Sends chunks in the best order for your players.
    You have a server, but the upstream capacity isn't too hot and your players scream "lag!" whenever someone logs in or uses a portal, either of which will trigger the server to push an enormous number of chunk packets over the connection all at once and causing momentary intolerable lag for all your players.

    ChunkRetard reduces the rate at which these large chunk packets are sent, while letting other packets through so the server remains responsive from the perspective of your users. It also rearranges the chunks into a more efficient order for transmission, so that players aren't left hanging in air while land in the distance slowly fills in.

    Commands

    /crbf [BurstFrequency]
    Set or show the burst frequency.​
    /crppb [PacketsPerBurst]
    Set or show the packets per burst.​
    /crdebug
    Toggle debugging output to console.​
    /crbypass
    Toggle observance of bypass list.​

    Permissions

    Currently only an OP can change settings. As this plugin affects bandwidth consumption and the wrong settings can effectively make the server unreachable from remote by saturating the uplink, this is probably for the best.

    Configuration

    BurstFrequency: 8
    How much delay between each burst of held packets, in ticks. (20 = 1 second) Lower values mean bursts happen more often and therefore more bandwidth is consumed. If you feel chunks are not filling in fast enough then try lowering this value. If players experience lag when someone logs in, respawns, or enters or leaves a portal, try raising this value. Also see my comments below on picking an initial value.

    PacketsPerBurst: 1
    Maximum chunk packets to allow to be sent in each burst. You will probably not need to change this unless you feel BurstFrequency is already too low and you still want to send out chunks faster. As there is some overhead to be expected each time a Burst is performed, if the server starts not keeping up then try increasing this (and raise the BurstFrequency value accordingly). Keep it as low as possible as that results in the smoothest outbound stream.

    ListenPriority: LOWEST
    Changing this may help compatibility with other plugins, or not. Possible values: LOWEST, LOW, NORMAL, HIGH, HIGHEST

    BypassEnabled: true
    The default state of the BypassList when the plugin is loaded.

    BypassList: []
    Any player names or subnetworks (eg. 192.168.0.0/16) for those who should not be affected by this plugin, such as LAN users whose traffic will not be crossing the uplink. This is important as the chunk bandwidth of all connected players not in this list is combined together against the configured limit. So if you're playing on the same LAN as the server, if you're not in the BypassList then you're effectively stealing bandwidth from your players, not to mention receiving your chunks at a slower rate for no good reason.

    Debug: false
    The default debug state when the plugin is loaded.

    Comments

    For a starting value for BurstFrequency, use this formula and then fine-tune it as needed.

    20 * PacketsPerBurst / ( bandwith / average_chunk_packet_size )​

    So if I want to permit chunk packets to take up to 40kB/s of the upstream the math is:

    BurstFrequency = (20 * 1) / (40 / 16) = 8​

    Note: 16K being the average chunk packet size is a big assumption. The average size will be larger in jungle biomes, and smaller in plains and even smaller in oceans. If you're using Orebfuscator the average size will be larger too. In short, the more complex the chunk, the less well it will compress, resulting in a larger size.
    Bas7, MatrixTunnel, LinsaFTW and 2 others like this.

Recent Updates

  1. fixed typo in plugin.yml