-
Notifications
You must be signed in to change notification settings - Fork 21
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
tap-agent taking too long to start up #355
Comments
@gusinacio Please assign this to me. |
@gusinacio I have a few questions:
Could you please elaborate on this?
Parallel tasks?
Please can you elaborate on this? Sorry, I am new to indexer-rs |
I think just using tokio::spawn is enough to speed up. Right now one can only be created after the previous one was created. Maybe you could spawn all the tasks and loop over and join them using JoinSet.
Maybe this is a different PR related to #8. Don't worry about this for now.
Yeah, using tokio::spawn and joining all of them before proceeding.
Actually, you don't need to worry about this, we need to create indexes inside the database but this is in |
Hey, are you still planning to do this? |
@gusinacio Yes. I have a FT job, I mostly start issues on the weekends. Is that okay? |
Hey, I have to take this one because it became a higher priority. |
Problem statement
Indexers with high performance create tons of receipts and have multiple allocations. We need to speed up start-up by parallelizing the SenderAllocation creation and also look at indexes in our database that may be affecting the initialization.
This can be done by spawning tasks for the initialization for
SenderAccounts
andSenderAllocations
.The code is currently sync:
indexer-rs/tap-agent/src/agent/sender_accounts_manager.rs
Lines 149 to 152 in 6f24558
indexer-rs/tap-agent/src/agent/sender_account.rs
Lines 487 to 490 in 6f24558
This is just a suggestion. If you find any other performance improvement opportunity, feel free to add to the PR as well.
There are indexers that have around 600 allocations open. It would be good to have a benchmark for this.
Also we need to create some indexes for ravs
The text was updated successfully, but these errors were encountered: