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

Move database to temporary storage #1309

Closed
pinkwah opened this issue Jan 21, 2021 · 1 comment · Fixed by #1310
Closed

Move database to temporary storage #1309

pinkwah opened this issue Jan 21, 2021 · 1 comment · Fixed by #1310
Assignees

Comments

@pinkwah
Copy link
Contributor

pinkwah commented Jan 21, 2021

We are running the ert storage database from NFS, which is slow.

Instead, at startup, copy the database to /tmp. Split up the Db fastapi depend into ReadDb and WriteDb. ReadDb simply reads from the /tmp database. WriteDb writes to the real database, then copies the db to /tmp when it's done. We might need to recreate the SqlAlchemy engine between runs, which is a bummer.

@pinkwah pinkwah self-assigned this Jan 21, 2021
@oysteoh
Copy link
Contributor

oysteoh commented Jan 22, 2021

@ManInFez had this comment while discussing

I think having a snapshot created in temp on startup of ertviz, and then, on demand from the user, “refresh” the snapshot

so - it is like what you have stated here almost, and i think it sounds like a good approach. Let's deal with the read bottleneck first ( I argued yesterday about having the writes also to a tmp-db, but let's face one thing at the time... )

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

Successfully merging a pull request may close this issue.

2 participants