Ancient Warfare 2

Ancient Warfare 2

6M Downloads

Dedicated Server Capabilities.dat bloat

SevArktic opened this issue · 3 comments

commented

The Issue tracker is mainly used for reporting bugs.

New features, general discussion and suggestions should happen in our Discord server. You'll also get your answers faster and can discuss with the dev team there.

Please use our Discord server for suggestions, we have a #suggestions channel for this purpose. We also have a list of all the existing suggestions here.

The 1.7.10. version of the mod is not supported anymore, 1.12.2 is the actively developed version. Issues for the 1.7.10 version are automatically closed.

Consult our other resources for more information about the mod: Treatise on principles of Ruling (Ingame Manual book), Online Wiki, FAQ, Discord FAQ, Announcements

Context Environment

Minecraft version: 1.12.2

Ancient Warfare 2 version: ancientwarfare-1.12.2-2.7.0.1038

Minecraft Forge version: Forge-14.23.5.2860

Link to your crash log (if the game crashes):

If you are using a modpack, link to the pack: https://www.curseforge.com/minecraft/modpacks/messengers-return

Expected Behavior

Ideally, on a dedicated server, not cause 1.5s lag spikes every 45 seconds on server auto saves while "/save-on" is true

Current Behavior

With a large enough list of entries in capabilities.dat located in the /data folder of your world save, a dedicated server's TPS will tank for a ~1.5s interval while the capabilities.dat file is being saved along with every other operation that runs on the autosave interval. Cause is capabilities.dat bloat.

Steps to Reproduce

  1. Have Dedicated Server.
  2. Have many friends who explore a bunch at maximum possible velocity.
  3. Watch the capabilities.dat grow from roughly 11KB in size to 5MB in size over a few weeks.
  4. Watch the millisecond response time/TPS diminish every 45 seconds.

Possible Solution

My proposition? Either:
A) Clear the capabilities.dat data, either by incrementally pushing it's changes to another data structure, or by routinely wiping the Ancient Warfare data from it.
B) Stop using the capabilities.dat for data storage.

Capabilities&Configs.zip

commented

btw I love the work that ya'll are doin', the mod is fantastic, I simply want to look into methods to reduce the mod's overhead and tick expenditures on chaos/survival servers

keep on keepin' on, and I look forward to a dev response <3

commented

I can confirm that after about a month of playing with friends on a server the tps stutter every 45 seconds started to become unpleasant.

My capabilities.dat file, currently 1.08 MB:

image

My solutions are the same as SevArktic. Any of them would be enough in my opinion.

commented

Thanks guys. Yes, confirmed, this is an issue. Coders will try and fix.