Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history DB compression #81

Closed
visualDust opened this issue Dec 4, 2023 · 3 comments
Closed

history DB compression #81

visualDust opened this issue Dec 4, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@visualDust
Copy link
Owner

According to @lideming , neetbox backend is storing a lot of duplicate data. For example, when the number of CPU cores is large, the field about the CPU in status will repeat a large number of words "frequency" (one for each core). This is just an example, just to illustrate that we do store a lot of unnecessary duplicate data. Therefore, compressing the data before storing it will be a solution

Therefore, we are planning to add compression on columns which store json data using zstd

Further updates will be posted here.

image

@visualDust
Copy link
Owner Author

according to pyzstd doc, If use pre-trained zstd dictionary, the compression ratio achievable on small data (a few KiB) improves dramatically. We are going to create a table in history db to store zstd dictionary as a very initial try.

image

@visualDust
Copy link
Owner Author

visualDust commented Dec 9, 2023

good news: in ed614b8 we have broken down the status table. configs will not be stored more than once. information of hardware monitoring is in another table now. later we would add row limit to the table to keep only recent values.

@visualDust
Copy link
Owner Author

#110 added the feature that EventMsg sender can control the length of history. Close this issue before further problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants