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

Reduce Zebra CPU and memory usage during initial sync #7000

Closed
teor2345 opened this issue Jun 19, 2023 · 0 comments · Fixed by #7103
Closed

Reduce Zebra CPU and memory usage during initial sync #7000

teor2345 opened this issue Jun 19, 2023 · 0 comments · Fixed by #7103
Labels
C-enhancement Category: This is an improvement I-heavy Problems with excessive memory, disk, or CPU usage S-needs-investigation Status: Needs further investigation

Comments

@teor2345
Copy link
Contributor

teor2345 commented Jun 19, 2023

Motivation

A user has noted that Zebra 1.0.0's CPU usage is high during the initial sync:
https://forum.zcashcommunity.com/t/zebra-1-0-0-stable-release/44867/17

Another user asked us to track memory usage.

Complex Code or Requirements

We need to find out what is causing the CPU and memory usage before we can make progress on this ticket.

Ideally we should focus on things that make the sync faster.

Testing

Run any benchmarks or manual tests after making each change.

Check the full mainnet zebrad + lightwalletd sync time at:
https://github.com/ZcashFoundation/zebra/actions/workflows/continous-integration-docker.yml?query=branch%3Amain+event%3Aschedule

Related Work

Possible causes:

@teor2345 teor2345 added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage S-needs-investigation Status: Needs further investigation P-Low ❄️ I-heavy Problems with excessive memory, disk, or CPU usage labels Jun 19, 2023
@mpguerra mpguerra added this to Zebra Jun 19, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra Jun 19, 2023
@teor2345 teor2345 changed the title Reduce Zebra's CPU usage during initial sync Reduce Zebra CPU and memory usage during initial sync Jun 19, 2023
@mergify mergify bot closed this as completed in #7103 Jun 30, 2023
mergify bot pushed a commit that referenced this issue Jun 30, 2023
…a CPU busy-loop, Credit: Ziggurat Team (#6763), james_katz (#7000) (#7103)

* Stop busy-waiting in a Future for 45 seconds every minute

* Use the correct elapsed time calculation

* Add some TODOs for making the structure of the loop and wait times clearer
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Zebra Jun 30, 2023
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: This is an improvement I-heavy Problems with excessive memory, disk, or CPU usage S-needs-investigation Status: Needs further investigation
Projects
Archived in project
2 participants