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

[Deliverable] PostgreSQL Maintenance #119

Open
1 of 2 tasks
chair28980 opened this issue Feb 4, 2024 · 8 comments
Open
1 of 2 tasks

[Deliverable] PostgreSQL Maintenance #119

chair28980 opened this issue Feb 4, 2024 · 8 comments
Assignees
Labels
Deliverable Tracks a Deliverable

Comments

@chair28980
Copy link
Contributor

chair28980 commented Feb 4, 2024

Work on how to best handle PostgreSQL database growth and pruning is in progress and must completed to enable node operators to handle database growth in an easy and non-disruptive manner. Also, the PostgreSQL should bring an acceptable QoS from the Status PoV.

Milestone:

Summary

Provide clear strategy and tooling on how a node operator should prune/reduce the PostgreSQL DB size while minimizing service disruption.

Perform the required optimizations so that the PostgreSQL works smoothly and without blocking. The optimization is related to analyzing the `EXPLAIN PLAN' of the most usual queries and adding required indexes or prepared statements to enhance those queries.

We need to perform this optimization in StoreV3.

We will consider this as completed after one week of intense QA performed around Status with no new Postgres-related issues.

Justification

Store database grows linearly with the number of messages on the network. Regular deletion is needed, deletion should be done on older messages.

Operators need to keep Postgres database size controlled and it to support standard queries in the most possible performant way.

Epics

@chair28980
Copy link
Contributor Author

Add to scope: waku-org/nwaku#1885, legacy from 2023 milestone.

@fryorcraken
Copy link
Contributor

Note that waku-org/nwaku#1885 may not make sense to do, which is the whole point of this milestone.

@Ivansete-status
Copy link

Note that waku-org/nwaku#1885 may not make sense to do, which is the whole point of this milestone.

Sorry, I'm a bit puzzled now. I think is important to allow the size constraint.

Regarding scope, this falls under nwaku team umbrella.

@Ivansete-status
Copy link

@chair28980 @fryorcraken - this can be closed as per the work made in waku-org/nwaku#2506
It suffice to establish a retention policy to maintain the database size bounded:
e.g.:
store-message-retention-policy = "size:100MB"
store-message-retention-policy = "size:10GB"

@chair28980 chair28980 reopened this May 9, 2024
@fryorcraken
Copy link
Contributor

@chair28980 @fryorcraken - this can be closed as per the work made in waku-org/nwaku#2506 It suffice to establish a retention policy to maintain the database size bounded: e.g.: store-message-retention-policy = "size:100MB" store-message-retention-policy = "size:10GB"

We need some dogfooding to happen. Has it happen? Can we make it happen in our fleets?
Also, can you clarify from what version are we using the new strategy with nwaku-compose?

@Ivansete-status
Copy link

We need some dogfooding to happen. Has it happen? Can we make it happen in our fleets? Also, can you clarify from what version are we using the new strategy with nwaku-compose?

Yes, I agree with that. That already happened in waku.test and waku.sandbox.

The "size" retention policy is properly working, freeing disk space when applied, from version v0.26.0 (March 2024.)

On the other hand, we completed the "time" retention policy in v0.28.0 (May 2024.) With that, the oldest partitions get removed up to the time derived from the applied "time" retention policy. And this is interesting from the Status PoV.

Components running v0.28.0 ( thanks @gabrielmer for that version and the deployments ❤️ ! :)

  • waku.test
  • waku.sandbox
  • nwaku-compose

We are aiming to update the shards.test (used by Status) the next 29th of May.

@chair28980 chair28980 changed the title [Milestone] PostgreSQL Maintenance [Deliverable] PostgreSQL Maintenance May 31, 2024
@fryorcraken
Copy link
Contributor

We are aiming to update the shards.test (used by Status) the next 29th of May.

We should do shards.staging first, right?

@Ivansete-status
Copy link

We should do shards.staging first, right?

Yes, you are right! I didn't mention it properly.

@chair28980 chair28980 added this to the Store Service Upgrade milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deliverable Tracks a Deliverable
Projects
Status: In Progress
Development

No branches or pull requests

3 participants