-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Compress the EventRaws table #12
Comments
Hi JackBister, |
@aminsalami Hey man, go ahead! Let me know if there is anything you need help with. I haven't dug too deeply into this except for reading the link in the issue, but my thinking is that the compress/uncompress functions may need to be implemented in C to avoid losing too much performance from crossing back and forth between C and Go, but it might be worth trying out Go implementations and measuring what the performance is like. I think the tricky bit is going to be making sure that this actually has a benefit in terms of storage without costing too much read/write performance. There is some more useful info about SQLite extensions here in case you need it: |
@JackBister Hey. Sorry It took so long. I have free times only on weekends. So, Is this normal or maybe I missed something here? Should I push my codes? |
@aminsalami Hi, sorry for the late response. It's a very interesting result! If you push the code to your fork I could check it out and test it too. I guess it is as you say that longer lines compress better, so maybe it's not worth having compression depending on how long you expect your log messages to be. It might also be interesting to try different compression algorithms than the one on the SQLite page in case they work better for short lines. |
Check out my latest commit. Thanks in advance. |
SQLite has support for compressing FTS tables: https://sqlite.org/fts3.html#the_compress_and_uncompress_options
This should be supported by Logsuck to prevent the database file size from growing out of control. Depending on how much it affects insert performance this might need to be configurable so that users with high throughput needs can disable it.
The text was updated successfully, but these errors were encountered: