Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

eth,les/downloader: improve the throttle threshold when syncing #272

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

minh-bq
Copy link
Collaborator

@minh-bq minh-bq commented May 8, 2023

Currently, the new threshold is calculated when fetching the result from result queue and is applied to the next reserve/fetch result. However, the result processing may take too much time when data is large, the threshold is not updated early enough to slow down further reserve/fetch. As a result, the memory can peak so high. In this commit, we re-calculate threshold when handling response. In case the result queue is throttled, we discard the response and queue the fetch task back to queue for later re-fetch. This may increase the cost in network bandwidth but help to regulate the memory usage.

@minh-bq minh-bq requested a review from DNK90 May 8, 2023 09:19
@minh-bq minh-bq force-pushed the feat/improve-sync-throttle branch 2 times, most recently from 40d4167 to cc08041 Compare May 8, 2023 09:57
@minh-bq minh-bq force-pushed the feat/improve-sync-throttle branch from cc08041 to 977d580 Compare May 18, 2023 09:26
@minh-bq minh-bq changed the title feat: improve the throttle threshold when syncing eth,les/downloader: improve the throttle threshold when syncing Feb 7, 2024
Currently, the new threshold is calculated when fetching the result from result
queue and is applied to the next reserve/fetch result. However, the result
processing may take too much time when data is large, the threshold is not
updated early enough to slow down further reserve/fetch. As a result, the memory
can peak so high. In this commit, we re-calculate threshold when handling
response. In case the result queue is throttled, we discard the response and
queue the fetch task back to queue for later re-fetch. This may increase the
cost in network bandwidth but help to regulate the memory usage.
@minh-bq minh-bq force-pushed the feat/improve-sync-throttle branch from 977d580 to b8ed269 Compare February 21, 2024 03:23
@minh-bq minh-bq merged commit c499bf5 into axieinfinity:master Feb 21, 2024
1 check passed
@minh-bq minh-bq deleted the feat/improve-sync-throttle branch February 21, 2024 04:11
Francesco4203 pushed a commit to Francesco4203/ronin that referenced this pull request Jun 18, 2024
Currently, the new threshold is calculated when fetching the result from result
queue and is applied to the next reserve/fetch result. However, the result
processing may take too much time when data is large, the threshold is not
updated early enough to slow down further reserve/fetch. As a result, the memory
can peak so high. In this commit, we re-calculate threshold when handling
response. In case the result queue is throttled, we discard the response and
queue the fetch task back to queue for later re-fetch. This may increase the
cost in network bandwidth but help to regulate the memory usage.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants