Storage Scheduler Using Dual Budgets for Latency and Starvation Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing storage systems face challenges in efficiently scheduling storage tasks, particularly in balancing the execution of foreground and background tasks to maintain low latency and prevent resource starvation.
Innovation Solution
A storage system that employs a scheduler to manage two types of task queues—foreground and background—using a shared budget and a background budget, prioritizing foreground tasks but ensuring background tasks are not starved, and implementing a back-pressure mechanism to manage write buffers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If the scheduler prioritizes foreground tasks to maintain low latency, then foreground task performance is improved, but background tasks may be starved of computing resources
Solution Approach 1:
The patent segments computing resources into two distinct budgets: a shared budget accessible by both foreground and background tasks, and a dedicated background budget reserved for background tasks. This segmentation ensures that foreground tasks can utilize resources when needed (maintaining low latency) while background tasks have guaranteed access to the background budget (preventing resource starvation).
Solution Approach 2:
The scheduler implements partial action by allowing background tasks to execute only when the shared budget is available or when specifically allocated from the background budget, rather than continuously. This partial execution model prevents background tasks from monopolizing resources while ensuring they receive sufficient computing time to avoid starvation.
2Speed
If the scheduler allocates more computing resources to foreground tasks, then foreground task execution speed is improved, but background task execution may be delayed
Solution Approach 1:
The computing resources are segmented into a shared budget and a background budget. The shared budget can be dynamically allocated to foreground tasks for high-speed execution, while the background budget ensures background tasks receive dedicated resources and are not indefinitely delayed.
Solution Approach 2:
The scheduler dynamically adjusts resource allocation between foreground and background tasks based on system state. The shared budget can be flexibly allocated to foreground tasks when they require high execution speed, while the background budget provides a dynamic safety net that activates when background tasks risk delayed execution.
3Productivity
If the scheduler allows background tasks to execute frequently, then background task completion is improved, but foreground task latency increases
Solution Approach 1:
Background tasks are allowed to execute partially and intermittently rather than continuously. They can utilize the shared budget when resources are available and the background budget when needed, achieving sufficient task completion without continuously competing with foreground tasks for resources.
Solution Approach 2:
The scheduler implements periodic checking and allocation for background tasks through the background budget mechanism. Background tasks receive periodic opportunities to execute based on budget availability and system state, ensuring steady progress without causing continuous latency for foreground tasks.
Data Source
AI summary
A method for managing tasks in a storage system, the method may include: (a) obtaining, by a scheduler, a shared budget for background storage tasks and foreground storage tasks; (b) obtaining, by the scheduler, a background budget for background storage tasks; wherein the background budget is a fraction of the shared budget; (c) allocating, by the scheduler, resources to pending storage tasks according to the shared budget and the background budget; wherein the allocating comprises (i) allocating the shared budget while prioritizing foreground storage tasks over background storage tasks; and (ii) allocating the background budget to background storage tasks; and (d) participating, by the scheduler, in executing of storage tasks according to the allocation.


