CraftBukkit++ While I enjoyed maintaining CraftBukkit++, md_5 has shown that he can do a better job, so I recommend all users to migrate to Spigot. Spoiler (Move your mouse to the spoiler area to reveal the content) ELI5 (Explain like I am 5):CraftBukkit, slightly tweaked to make it run faster, and use less RAM. You use it instead of the craftbukkit.jar from dl.bukkit.org. Your plugins will work with it just fine.The Name:"++" is a programming statement in C/C++/Java and many other languages. It refers to incrementing a number by 1. In this sense, it is CraftBukkit and 1 version better. Frequently shortened to "CB++".Technical: CraftBukkit++ is an optimized build of Craftbukkit, with performance enhancements in mind. These enhancements are all configurable via the bukkit.yml file in your server folder. A partial list of the major enhancements are listed below: Enhancements (Move your mouse to the spoiler area to reveal the content) Optimized Growth/Decay Growth and Decay (Wheat, saplings, leaf decay, etc) are the single biggest tax on servers. For an understanding why, a 15x15 chunk area, with the player at the center is checked for growth each server tick. Vanilla growth area: Green squares are chunks checked for growth each tick. That's a lot. And this is per-player. Modified growth area: Oh, pretty colors. But what does it mean? The Red chunk (the one the player is standing in) will always experience growth/decay. This means that players won't be surprised by leaves not decaying, etc. The green chunks show likely growth areas. Instead of always searching nearby chunks, the server only grows/decays in a specific number of chunks each tick. The amount is in your config. If you have 200+ players, I recommend 1000. If you have less, increase that number. More chunks = more lag, but faster growth. You will need to experiment to find a happy medium. Anyway, likely growth areas *may* grow and decay, but are not certain. They will only grow/decay if the server has enough leftover chunks to check. HOW MANY CHUNKS SHOULD YOUR SERVER USE? Depends on the size. If you are a 50 man server or less, try 2500 chunks. If you are a 100 man server, try 1500 chunks. 200 man, 750. I don't advise going below 500. If you use zero, or less than zero, GROWTH WILL BE DISABLED. Optimized ItemStacks: Items near each other and of the same type and data will automatically merge into an itemstack, to save on calculations. This can drastically cut down on CPU, because each itemstack floating in the world can use the same time as a zombie or skeleton might. Merging them together will drastically reduce the amount of items on your server, and save memory and CPU. XP orbs will also merge, like items do, by combining xp. The radius at which items will merge together is in the config. If the radius <= 0, items will not merge. Optimized Redstone Torches Some changes have been made to how the game internally locates and registers the locations of redstone torches. It does not alter gameplay, and hence no config option is present. Disable Random Lighting Checks Each tick, the game randomly samples several thousand blocks to verify that the light levels are correctly. This is a huge waste of CPU, since light updates just fine from block placement, and very rarely needs to be correctly. With this disabled, light updates will only happen when new chunks are generated or blocks are placed. This is adjustable in the config. Mob Spawn Range This changes how far around players mobs will spawn. By default this range is 8 chunks, (or 16*16 blocks, [256 if you're not a math geek]). This is a pretty large area. By default, with CB++, this range has been reduced to 4 chunks around players. Players will still encounter the same mobs in each chunk, they will just be more centered around players. Monsters Per Chunk This is how many monsters (creepers, skeletons, etc) will spawn in each chunk of the world. The default value is 70 per chunk. Increasing this will increase the monsters spawned, decreasing it will reduce the monsters spawned. Land Creatures Per Chunk This is how many passive creatures (sheep, pigs, etc) will spawn in each chunk of the world. Acts the same as monsters per chunk. Default is 15. Water Creatures Per Chunk This is how many water creatures (at the moment, only squids) will spawn in each chunk of the world. Acts the same as the above 2 settings. Default is 5. Aggregate Ticks With the setting at 4 (the default) the server will skip the chunk-tick process 3 ticks and at the fourth tick it will decide what chunks to tick, select them and then applying growth 4 times. This means the server need to spend less time choosing chunks and more time growing. If you use a setting of 1, the server will not aggregate any ticks and work normally. Sugar Cane/Melon/Pumpkin/Wheat/Mushroom/Tree Growth Rates These modify how quickly food grows on your server. This settings do not affect performance in any way. They are a percentage of normal growth, so 100% is normal growth rate. 200% is 2x normal growth rate, and 50% is 1/2 normal growth. Experiment with to your liking. Filter Unsafe IPs Uses http://www.spamhaus.org/xbl/ unsafe ip address service to automatically block any unsafe connections to your server. Any known infected pc or botnet ip address will be blocked from connecting. New Commands: /merge - requires 'bukkit.command.merge' permission. Alters the item merge radius. /growth - requires 'bukkit.command.growth' permission. Alters the number of chunks that growth occurs on each tick. /mobspawn - requires 'bukkit.command.mobspawn' permission. Alters the range that mobs will spawn around players. Latest Download - All Builds - Source Code Have ideas for further performance fixes? Let me know. This is a personal project, unaffiliated with Spout, only posted here because Bukkit does not allow custom builds on their forums. If you appreciate this, donate for my time.
Shall be moving to this once a 1.1 stable build is out, Is this also how these things will work on the spout server?
Probably not. I'd decrease your view distance. I have some proto-ideas on how to compress chunk data, but that is likely to be more of a CPU/File access boost than a RAM saver.
If memory serves chunks are loaded in a square shape around a player, so view-distance of 10 means 21x21 chunk area is loaded, or 441 chunks. Would it be possible (and not too complicated) to have chunks load in a circular shape instead? A view-distance of 10 would result in only 314 chunks loaded (a 30% savings!). Circular loading with a view distance of 12 is about the same as square loading of 10.
How ever now my Massive farms won't grow.. unless there are less ppl online, tough they won't grow anyways when less than 10 tps Ouh disable "fast" or all redstone light updates from server side.
Turn up the number of chunks growth happens on. With vanilla and 100 players, it's rough 22500, so 5000 is not unreasonable.
well you and bergerkiller should get together... at least "bash" your head together on ideas.. will look at the version when you publish the next one... looks like an RB is around the corner
We will be doing some hardcore testing tonight on this - since =Herocraft= is now on 1.1 Are the item config changes still toggable in the config in the latest? I really dont mind the changes and it does make the server lag a lot less. Afforess - will a plugin like NoLagg will decrease the lag as well as a cb-server side fix?
Just for the record, what is the usual TPS for Herocraft around 200 players when not using CraftBukkit++?
Ok I like this, I used to barely get 10 TPS with 25+ players Now I get 20 all the time even when world editing. I fully recommend this.