-
Notifications
You must be signed in to change notification settings - Fork 21
Replace samples with batches of samples in the data pipeline #348
Copy link
Copy link
Open
Labels
part:coreAffects the SDK core components (data structures, etc.)Affects the SDK core components (data structures, etc.)part:data-pipelineAffects the data pipelineAffects the data pipelinepriority:lowThis should be addressed only if there is nothing else on the tableThis should be addressed only if there is nothing else on the tabletype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Metadata
Metadata
Assignees
Labels
part:coreAffects the SDK core components (data structures, etc.)Affects the SDK core components (data structures, etc.)part:data-pipelineAffects the data pipelineAffects the data pipelinepriority:lowThis should be addressed only if there is nothing else on the tableThis should be addressed only if there is nothing else on the tabletype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Type
Projects
Status
To do
What's needed?
We have designed the flow of data inside the sdk's data pipeline such that each sample is handled individually. That implies that in each node of a frequenz-sdk data pipeline we're having an async context switch which eventually lead to poor performance.
We can generalize this concept when replacing the role of the
Samplein the data pipeline with a batch of samples. When setting the batch size to one we're getting the current approach as a special case.The advantage is that in certain cases we can fill up a batch with a fixed number of samples.
The batch size might be adaptable depending on e.g. the incoming sample period and the resampling period.
Proposed solution
In a first step we can introduce a batch type that represents a list of samples and update all parts of the data pipeline accordingly.
That opens space for performance optimizations that can be addressed in succeeding steps.
Use cases