Ad Widget

Collapse

TimescaleDB and/or preprocessing discard ?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jbdenis
    Junior Member
    • Apr 2020
    • 4

    #1

    TimescaleDB and/or preprocessing discard ?

    Hello,

    I'm in the process to migrate to TimescaleDB and I'm wondering if using preprocessing discard step is still pertinent, from a storage usage and performance perspective considering the compression features of TimescaleDB. I found that using discard in a preprocessing step makes writing triggers difficult in certain situation since they are not evaluated if the item value does not change. If I could get rid of the discard step and keep a low update interval (< 5min) for my items, I'd rather do it.

    I didn't explore the schema used by zabbix or if the segmentby colums are used (timescaledb.compress_segmentby, timescaledb.compress_orderby) to make the compression efficient (https://docs.timescale.com/timescale...#order-entries).

    EDIT:
    It's right here in the source code, with compress_segmentby='itemid' :
    Code:
    DBexecute("alter table %s set (timescaledb.compress,timescaledb.compress_segmentby='%s',"
                  "timescaledb.compress_orderby='%s')", table_name, ZBX_TS_SEGMENT_BY,
                  (ZBX_COMPRESS_TABLE_HISTORY == type) ? "clock,ns" : "clock");
    Any opinions ?

    Thank you.
    Last edited by jbdenis; 21-07-2022, 17:21.
  • Answer selected by jbdenis at 21-07-2022, 17:21.
    Glencoe
    Zabbix developer
    • Oct 2019
    • 152

    I don't have any scientific evidence, but I guess it's ok to not discard data from the storage perspective (provided you have compression on). TSDB does a very good job compressing such data. However, discards do also save DB writes so your database still can benefit from throttling. It all boils down to how many items, how different are the values and how long are the intervals.

    Comment

    • Glencoe
      Zabbix developer
      • Oct 2019
      • 152

      #2
      I don't have any scientific evidence, but I guess it's ok to not discard data from the storage perspective (provided you have compression on). TSDB does a very good job compressing such data. However, discards do also save DB writes so your database still can benefit from throttling. It all boils down to how many items, how different are the values and how long are the intervals.

      Comment

      • jbdenis
        Junior Member
        • Apr 2020
        • 4

        #3
        It makes perfect sense. Thank you for your input !

        Comment

        Working...