Is it possible to have multiple dynamic TSDBs on the same flash partition? #361
Replies: 2 comments
-
Hello ValterMinute, Thank you for your inquiry regarding the possibility of creating multiple dynamic Time Series Databases (TSDBs) within the same Flash partition using FlashDB. This is a common question, and I'd like to provide some insights and recommendations based on the current design and capabilities of FlashDB. 🧠 Understanding FlashDB's DesignFlashDB is designed to be lightweight and efficient, particularly for embedded systems with limited resources. The
✅ Recommended ApproachesTo achieve the desired functionality of differentiating data for each session while maintaining data integrity and performance, consider the following approaches: 1. Use Separate Flash Partitions for Each TSDBAllocate a separate Flash partition for each session's TSDB. This approach ensures that each TSDB has its own dedicated space, preventing metadata overlap and GC interference.
This method provides clear separation between sessions and ensures optimal performance and data integrity. 2. Dynamic Partition Allocation (If Supported)If your platform supports dynamic partition allocation, you can create new partitions at runtime to accommodate additional TSDBs.
This approach provides flexibility in managing TSDBs dynamically, but it requires that your platform supports dynamic partition management.
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick and detailed answer. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I describe my usage scenario.
I have a device that captures time series data in different "sessions" and I need to differentiate captured data for each session.
The sessions can overlap in terms of time (ex: I can acquire some data for "session A", then capture some in "session B" and then switch back to "session A" to do some more captures.
I can have a single TSDB with a session ID field, but this will force me to iterate through all sessions when doing data transfers etc. while for my purposes, it would be more efficient to be able to iterate each session separately.
My idea is to use fdb_tsdb_init to create multiple tsdbs (one per session) in each partition, add records etc.
If this works, would it be possible to do TSL adds in multiple sessions?
And what if I need to remove a tsdb/session completely (ex: when I uploaded it to the cloud or when the user ask to delete it)? Should I use fdb_tsl_clean or fdb_tsl_deinit? Would that free all the storage used by the session or there will be some flash space still in use?
Beta Was this translation helpful? Give feedback.
All reactions