0

I currently working on a Linux embedded application where I do some logging every second for numeric data (I really just need to plot data on a graph for the last 24 hours of operations).

Since SD cards degrade quickly, I am looking for a database that can store data in memory and only really persist on occasion (maybe on demand?). In this way, I am hoping to prolong the lifespan of the SD card. I came across Graphite, but apparently it cannot store data in memory. Any advice?

3
  • Can you hold data in memory in your own code until you've got enough? Or send the data somewhere else for storage? Or most important, have you faced SD card degradation problem with this particular application or are you just trying to optimize prematurely? – Alejandro Jul 17 '20 at 12:23
  • If I had wanted that kind of answer I would have asked a different question. Let me repeat: is there any software solution that lets me store time series data in memory? – user221200 Jul 17 '20 at 13:04
  • I’d suggest SQLite, but for so little data can’t you just keep it in an array in whatever programming language you are using? – Eric S Jul 17 '20 at 16:41
0

Suggest SQLite, with an in-memory option: https://www.sqlite.org/inmemorydb.html

Alternatively, can you just write to files in memory? In Linux this would be https://unix.stackexchange.com/questions/59300/how-to-place-store-a-file-in-memory-on-linux

The idea of a "database" is vague. Defined loosely as "an organized collection of data". A set of files could satisfy this. Persistence could be simply copying files to a permanent store. These files could be csv, or a serialization format like pickle https://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-pickle-protocol

If you require some special access to the data, that might dictate a better fitting solution. For example, do you need to perform SQL queries?

I can load csv files into excel and plot a graph, so that seems like it would work, barring any further information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.