Git Product home page Git Product logo

Comments (4)

tidwall avatar tidwall commented on July 17, 2024

Thanks for mentioning this. I agree that some more clarification can be made around this topic. I also look forward to providing optional fsync policies of Always, EverySecond, and Never.

Salvatore Sanfilippo talks about the same thing. http://redis.io/topics/persistence#how-durable-is-the-append-only-file

from buntdb.

tidwall avatar tidwall commented on July 17, 2024

I updated the README and added a SyncPolicy which can be set to Always for fsyncing after every write. b4e23eb

from buntdb.

funny-falcon avatar funny-falcon commented on July 17, 2024

Redis is awful database to learn from. Just keep it in mind. It did almost all wrong internally. Single thing it did well is user API.

You may batch and pipeline fsync requests:

  • several request made within 1ms are batched, written and fsync request is sent. Batch waits on this particular fsync to return. (you may consider using Future: https://godoc.org/github.com/Workiva/go-datastructures/futures#Selectable )
  • next batch will sent next fsync request without waiting for previous batch to return. Modern Linux systems performs well this way.

Combining batching with pipelining you may reach acceptable throughput without sacrificing durability.

Of course, it will not as fast as fsyncing once a second, and it will have large latency.

from buntdb.

tidwall avatar tidwall commented on July 17, 2024

Very helpful information. Thank you for sharing with me. I'm starting to lean towards setting the sync policy to Always by default. Then the user can choose what's best for their application, even turning it off altogether.

from buntdb.

Related Issues (20)

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.