Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize time SQLite file is missing during restart #731

Closed
otoolep opened this issue Jan 22, 2021 · 9 comments
Closed

Minimize time SQLite file is missing during restart #731

otoolep opened this issue Jan 22, 2021 · 9 comments

Comments

@otoolep
Copy link
Member

otoolep commented Jan 22, 2021

https://news.ycombinator.com/item?id=25873029

I'll need to think about this.

cc @mrkurt

@mrkurt
Copy link

mrkurt commented Jan 22, 2021

Oh nice! I have been hesitant to ask for these features because the problem we're tackling is not all right for rqlite. But if it can do this, it gets us closer!

@otoolep
Copy link
Member Author

otoolep commented Jan 23, 2021

Maybe checksumming the file might help, but I'm not sure.

@mrkurt -- what's your write request rate?

@otoolep otoolep changed the title Minimize time SQLite node is missing during restart Minimize time SQLite file is missing during restart Jan 23, 2021
@otoolep
Copy link
Member Author

otoolep commented Jan 23, 2021

Note to myself: opening up the log before fully initializing the store, might help understand how many entries are to be applioed.

@otoolep
Copy link
Member Author

otoolep commented Jan 24, 2021

If I do decide to make improvements in this area, which would help start-up times generally with an SQLite file on disk, #733 may be relevant.

@mrkurt
Copy link

mrkurt commented Jan 24, 2021

@otoolep we're doing about 700-1200 writes per second to Consul right now. Not all of those should be going to consul (or rqlite). Only about 100/s of those make sense for Consul or rqlite.

The rest is state that should really be gossiped around.

@otoolep
Copy link
Member Author

otoolep commented Feb 1, 2021

I have a new idea that I think will work -- build the SQLite database in RAM first, which is very fast. Then, if in on-disk mode, write it over the disk file just before the node completes coming up. I hope to release this functionality in the next release if I can make it work, without introducing risk into the code base.

@otoolep
Copy link
Member Author

otoolep commented Feb 2, 2021

@mrkurt -- I think I've made a big improvement here. I'm now seeing on-disk nodes start as quickly as in-memory nodes. The SQLite file will only be missing for a very short time.

See PR #750 for details. Can you build master, and try it out? I'd rather not release a new version until some other folks have tested the work.

@otoolep otoolep closed this as completed Feb 2, 2021
@otoolep
Copy link
Member Author

otoolep commented Feb 2, 2021

If you use Windows, there is a build available already:

https://ci.appveyor.com/api/buildjobs/mt7k2mm6139sut9x/artifacts/rqlite-latest-win64.zip

@otoolep
Copy link
Member Author

otoolep commented Feb 7, 2021

@mrkurt -- 5.10.0 is available now. In this release on-disk based systems restart almost as quickly as memory-based systems. Try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants