Giter Site home page Giter Site logo

Configuration for time interval about btfu HOT 4 CLOSED

elytra avatar elytra commented on June 12, 2024
Configuration for time interval

from btfu.

Comments (4)

alexbobp avatar alexbobp commented on June 12, 2024 1

Glad to hear you're interested! (I also see you posted two other issues, I will go through them soon).

I hear you. I will say, the decision to make a non-configurable 5 minute backup interval was well considered. I'm definitely open-minded but you will have to convince me. Let me give you my reasoning.

The nature of disk space use, and performance cost, for something like this, is not totally straightforward (particularly with the logarithmic pruning). I was afraid that if I make the backup interval configurable, almost everyone will end up raising it out of fear of performance cost, and I think that's a mistake.

On direct performance impact: doing the backup every 5 minutes should pretty much ensure that your entire server file tree stays hot in the system cache, and the files that were changed in the last 5 minutes are likely to have their contents hot in the cache, so each individual backup will have barely any read cost.

On space use: because of the hardlinks, the disk cost does not go up linearly with number of backups, and the closer together backups are, the lower each individual backup's added disk cost. The one thing that makes denser backups take up more disk space is files with changes, and if a file is changing often, then having more snapshots of that file is not a bad thing. The pruning strategy keeps the overall disk cost under control, and highly granular recent backup history is one of the big points here.

You mention wanting to capture a large window of change. 128 backups with 1 hour intervals is less than a week! I'm not sure if I'm misunderstanding you. I definitely think the logarithmic pruning is the way to go. If you mean starting with hourly backups and still doing logarithmic pruning, then other than the very recent backup history, that has the same results as taking 5 minutely backups and applying the same pruning strategy.

I'm not against choice and it would have been easy to make it a setting, but I also wanted a minimal config file that doesn't make people worry about pointless settings. I really do think making it longer would be the wrong decision for an end user, but the idea of backing up every 5 minutes tends to worry people a lot more than in my opinion it should.

from btfu.

alexbobp avatar alexbobp commented on June 12, 2024 1

Thanks, I'm glad to hear you appreciate the logarithmic pruning in general. Your suggestion to implement a more traditional style backup pruning scheme does make sense. One reason I chose logarithmic pruning, though, is that BTFU doesn't take backups aligned to a fixed schedule. It just takes the backups every 5 minutes while a server is running, and then later does the backup cleanup based on their timestamps. It would still be quite possible to implement something to approximate this scheme, though it will just be an approximation and you won't get a perfect pattern like eg daily backups at the same time each day.

I haven't seen the use for a feature like this, honestly. I've been getting awesome results from the logarithmic pattern, and most of the time there are still 5 to 10 minute backups in the time ranges when I need to look for things (like people's old playerdata). That said I'm not against the feature, but if you really want it, please make a new issue. This issue was about being able to configure the 5 minute backup interval, which I was not convinced on and am still against. I'm usually pro-settings, but this mod in particular is designed to give people good out-of-the-box defaults so there's no room to angst about settings. If you can make a case for why approximating GFS style backup rotation is useful, please convince me on another issue (and of course if you want to write it yourself and submit a pull request, you don't have to convince me it's worth writing. let me know if you want me to point you towards the part of the code you'd want to work in)

from btfu.

KazroFox avatar KazroFox commented on June 12, 2024

I know this is an old issue but I've started including BTFU in my modded servers and figured I would toss in my two cents.

Certainly the logarithmic pruning is better than every other modded backup solution that just saves every 30 minutes. That being said, if more precision over a longer amount of time is desired you could implement a GFS backup rotation scheme. I.E. keep 5 minute backups for an hour, hourly backups for a day, daily backups for a week, weekly backups for a month... and so on. The time to retain hourly, daily, monthly backups could then be adjusted in the btfu config.

from btfu.

KazroFox avatar KazroFox commented on June 12, 2024

No that 100% makes sense to me. I haven't ran into a need for that much precision further back, just making a potential case if you were trying to justify adding it. Appreciate the hard work!

from btfu.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.