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

fog-view poll timing #4005

Merged
merged 8 commits into from
Sep 5, 2024
Merged

fog-view poll timing #4005

merged 8 commits into from
Sep 5, 2024

Conversation

jgreat
Copy link
Contributor

@jgreat jgreat commented Sep 4, 2024

Motivation

Make fog-view database polling interval configurable.

Before this change 1 view-store generated about 300 postgresql transactions/s in development.
After this change 1 view-store generated about 150 postgresql transactions/s in development.

Moving from default of 100ms to 250ms reduced number of transactions/s by just over half.

  • add MC_DB_POLLING_INTERVAL_MS env var for fog-view-store
  • add pg_stat_statements lib to the dev postgres install.
  • fix a couple of minor comment typos.

Future work

Investigate view queries. Look in to only doing update queries on stores with incomplete block ranges.

Copy link

github-actions bot commented Sep 4, 2024

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

@jgreat jgreat marked this pull request as ready for review September 4, 2024 21:16
Copy link

github-actions bot commented Sep 4, 2024

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

Copy link
Contributor

@joekottke joekottke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I'm not a Rust dev, this generally does make sense. But I'd rather have someone else confirm it.

Copy link
Collaborator

@nick-mobilecoin nick-mobilecoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, some nits on naming and ownership logic

fog/view/server/src/db_fetcher.rs Outdated Show resolved Hide resolved
fog/view/server/src/server.rs Outdated Show resolved Hide resolved
fog/view/server/src/server.rs Outdated Show resolved Hide resolved
fog/view/server/src/server.rs Outdated Show resolved Hide resolved
fog/view/server/test-utils/src/lib.rs Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Sep 4, 2024

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

Copy link

github-actions bot commented Sep 5, 2024

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

Copy link

github-actions bot commented Sep 5, 2024

⚠️ Downstream repo mobilecoinofficial/full-service failed to build. Check actions status for details.

@jgreat jgreat merged commit 9fde94f into release/v6.1 Sep 5, 2024
96 checks passed
@jgreat jgreat deleted the fog-view-poll-timing branch September 5, 2024 22:00
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.

3 participants