Archive October 2015

Coding With Aikar – Live Streams!

Hello,

Lately I have been live streaming while working on various Empire Minecraft or Website related tasks! I like the idea of Live Coding as it invites others to learn from you, and on the flip side, allows others to offer constructive criticism to you to improve your code.

I’ve done some work to be able to split stream to 4 (or more if needed) services at the same time, so you can subscribe and watch on any of the following services:

NOTICE: Due to Mixer being a much superior platform, I’ve decided to end streaming to other platforms so that I can use FTL
Please subscribe and view my streams on Mixer only.
The method I used to stream to multiple before is still below.

 

Please subscribe to get alerts on when I go live!

discord-logo

https://aikardiscord.emc.gs

If you are interested in Live Streaming to multiple services at once, follow this guide:

http://linustechtips.com/main/topic/174603-how-to-live-stream-to-multiple-services-with-a-rtmp-server/

And here is my example config file:

I’m also using this fancy Bash Script using xdotool to automate switching scenes with OBS, install xdotool, assign 2 scenes a hotkey for control + alt + [ and control + alt + ]

0

Spigot Tick Limiter: Don’t use “max-tick-time”!

Something that many of us in the Spigot Development community really dislike is Spigot’s Tick Limiter. Here is my response to what a user wrote on a spigot thread:

PaperSpigot does not offers "max-tick-time", that's why I consider spigot over it^^

There’s a reason PaperSpigot doesn’t offer it: You shouldn’t use it! That system is fundamentally broken in implementation and can cause inconsistencies with your server.

I Strongly recommend using Paper Minecraft, which offers better performance than Spigot, WAY more features, and does not have this buggy system.

paper.emc.gs

Why it’s broken

With my Entity Activation Range implementation, I found it is not safe to skip ticking some entities, and then, on the entities that you do skip, you must call some elements of code to keep other parts in consistent and in an expected state.

Tick Limiter blows all of that out of the water, and ignores all of that research and code wrote to ensure entities stay consistent.

Additionally, Tile Entities have not even received a real full pass to ensure they all behave when skipping ticks, and I am confident that skipping ticks actually FULLY BREAKS Some tile entities, as they expect a consistent tick rate in relation to the servers current tick ID. Skip a tick? Now that code that acts on TickID % 20 == 0 will not even be hit!

Tick Limiter also suffers bugs that will skip ticking entities at random each impartial pass. You may have an entity that goes 2 seconds without a tick! I have an upcoming PR that will fix that specific bug though, but it doesn’t fix the overall flaws and design of the system

Then, the idea behind it is simply flawed. Entities and Tile entities are not some optional element of the server. It is unstudied/unproven what drastically bad things can happen when you now throw vanilla logic out the door about when an entity tick rate in comparison to the rest of the server.

Not to mention it skips ticking players! meaning things like chunk loading and Entity/Tile Entity state sent to the client gets delayed.

And finally, it’s not helping you. If your server is so lagged out that you are making the tick limiter kick into effect:

DO SOMETHING ABOUT IT

Don’t band-aid it with a system that HIDES the fact it’s lagging so bad. If Tick Limiter is ‘doing something’ for you, your server is overloaded and you’re not able to support the current load that is being presented to it. You should either reduce your player  count, reduce your entity count, upgrade your hardware, and consider ideas for adding new minecraft servers to your server to distribute the load.

Your server should be able to stay under 50 ms (20 TPS) within what Entity Activation Range provides you, which is a SAFE form of skipping Entity Ticking. Then your entities stay in sync with the servers tick rate, and results in less unknown state of your server.

How To Disable It

Set each settings for max-tick-time to 1000 to ensure it does not get ran on your server.

Getting it Removed / Future Improvements to Minecraft

I asked Spigot to remove this patch as it’s caused us to do extra / hard work just to figure out how to make REAL performance improvements work with that system. It would have been better for everyone if that system just didn’t exists, as I have 1 pending PR that was made difficult because of it. I have another idea that would DRASTICALLY improve server performance, that is simply not possible to support the idea of a tick limiter with it.

But, thankfully I’ve given this idea to Mojang and hopefully they will implement it and force Spigot to remove it.

Spigot doesn’t want to remove it because of uninformed users of the feature not realizing how bad it is, THINKING it’s ok to use and doing good for their server when it’s not.

Please, share this post and get users to stop using this broken Spigot feature and push for its removal.

Friends don’t let friends use the tick limiter.
Put in your Spigot signature:

[url=http://aikar.co/2015/10/08/spigot-tick-limiter-dont-use-max-tick-time/]You should not use Spigot's "max-tick-time" - Learn Why[/url]

0

I am Senior Software Engineer and Entrepeneur. I am an enthusiast and love creating things. I operate my own side company in my free time called Starlis LLC, working in Minecraft.

I enjoy doing things right and learning modern technologies.