Skip to content

Use file-based store instead of Postgres DB #25

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

Closed

Conversation

sevanspowell
Copy link
Contributor

  • Store metadata in the file system instead of a Postgres DB. PR Provide memory usage statistics for each commit #24
    demonstrates that a large user of memory is the Postgres store,
    specifically building the query for large batch-style requrests. This
    could be investigated further, but a quick fix is simply to use a
    file-based store. There is no need to build a query, and files can be
    looked up quickly using their filename.

@sevanspowell
Copy link
Contributor Author

This is still in a DRAFT state, e.g. errors aren't handled properly atm.

@sevanspowell
Copy link
Contributor Author

sevanspowell commented May 13, 2021

Artifacts here.

Current total memory usage at ~1,048,720,760 bytes, a ~18x decrease from existing levels.

@sevanspowell sevanspowell force-pushed the feature/ADP-869-provide-memory-usage-stats branch from 93308e7 to 7753b36 Compare May 18, 2021 04:44
@sevanspowell sevanspowell force-pushed the feature/ADP-869-fix-memory-leak branch 3 times, most recently from eb1d54a to 8c780a5 Compare May 18, 2021 05:57
- Adds a script that queries the GH repository and sets the state of
metadata database to match.
- Add NixOS service.
- Add integration tests that check that the write part of the script
writes correctly, and doesn't touch the database at all if an
exception occurs.
@sevanspowell sevanspowell marked this pull request as ready for review May 19, 2021 01:12
@sevanspowell sevanspowell requested a review from rvl May 19, 2021 01:12
Piotr Stachyra and others added 4 commits May 19, 2021 09:31
- Add a memory usage NixOS test that provides an overview of
  metadata-server's memory usage under high load. It doesn't actually
  "test" anything, only provides statistics.
- Store metadata in the file system instead of a Postgres DB. PR #24
demonstrates that a large user of memory is the Postgres store,
specifically building the query for large batch-style requrests. This
could be investigated further, but a quick fix is simply to use a
file-based store. There is no need to build a query, and files can be
looked up quickly using their filename.
@sevanspowell sevanspowell changed the base branch from feature/ADP-869-provide-memory-usage-stats to feature/ADP-895-fix-desync May 19, 2021 01:34
@sevanspowell sevanspowell force-pushed the feature/ADP-869-fix-memory-leak branch from 8c780a5 to bf50f66 Compare May 19, 2021 01:34
@sevanspowell sevanspowell force-pushed the feature/ADP-895-fix-desync branch from 68a6f13 to 8ebf937 Compare May 21, 2021 01:14
@iohk-bors iohk-bors bot closed this May 25, 2021
@iohk-bors iohk-bors bot deleted the branch feature/ADP-895-fix-desync May 25, 2021 05:01
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 this pull request may close these issues.

1 participant