News for hackers. Stuff that matters.
Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by etaioinshrdlu on Wednesday June 17, 2020 @01:37AM (#23548174)
This applies to all time series databases... What is special about time series that makes unique databases attractive? Is it the assumption that only 1 main index is created (time)? Is is that the data is append-only?

In particular, I'd love to know if theres anything major that generic RDBMS's could do better here.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by manigandham on Wednesday June 17, 2020 @07:35AM (#23550200)
Modern column-oriented relational data warehouses will handle time-series data fine in 95% of cases.

What "time-series" databases offer is more functionality around time being a primary component of the data. For example, automatic partitoning/sharding on time, various date handling techniques, better bucketing/gap filling/smoothing functions, data retention policies based on time, automatic rollups and aggregations, etc.

Some have custom data stores, some use key/value stores like Hbase or Cassandra, and others use relational databases. Using relational foundations offers more flexibility (like Timescale on top of Postgres) than the others like InfluxDB or OpenTSDB.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by dima_vm on Wednesday June 17, 2020 @02:07AM (#23548300)
Yes, time-dependence and only numbers allows to use a lot of tricks that cannot be done with generic data.

For example, double delta compression, or Gorilla for floating point numbers. For more, take a look at our open source VictoriaMetrics database, which uses all of such tricks.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by sharpy on Wednesday June 17, 2020 @03:03AM (#23548606)
Yep. The nature of the time series data does allow for storage optimizations like that. But there is the usage pattern aspect as well, that is more interesting in my opinion.

- Availability preferred over consistency (you want your metrics when bad things are happening, even if they may not be 100% accurate)

- Extremely write heavy, with most data never being read (they mentioned that only 2% of data is ever read. in my experience at another large company, it was way less than 2%)

- For the data that is read, most of reads are for most recent points (mostly alarms, but some dashboards as well)

- Different SLAs for queries based on usage - ie. queries for alarms must be fast. Dashboards, and trend analysis - not so much.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by citrin_ru on Wednesday June 17, 2020 @05:01AM (#23549329)
ClickHouse DBMS allows to combine delta, double delta, Gorilla with LZ4 or ZSTD for column compression. But it is not often used as DB for monitoring metrics so something else is probably expected from time series DB.
Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by redis_mlc on Wednesday June 17, 2020 @05:24AM (#23549464)
It would work, but Clickhouse is a Russian (Yandex) thing, and SQL isn't really needed for most monitoring and alerting use cases.

If I didn't want to use MySQL or Postgres, I'd rank Prometheus #1 and Clickhouse #2.

The killer thing for Clickhouse is that Percona supports it, so if you want to outsource the installation, mgmt. and support, you can just write a check and get good results.

Also, Clickhouse is a column store with SQL, so you could use an instance for monitoring and another to replace Vertica or Greenplum or whatever so long as it has the client libraries you need.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by rcatcher on Wednesday June 17, 2020 @11:59AM (#23552909)
ClickHouse is licensed under Apache License 2.0 and Yandex is incorporated in the Netherlands. What are your concerns with it being developed by russians (other than xenophobia)?
Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by redis_mlc on Wednesday June 17, 2020 @11:14PM (#23559435)
No, you're the xenophobe.

I'm concerned with there being a support issue, as well as a smaller user base also affecting support in the long term.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by akulkarni on Wednesday June 17, 2020 @02:18PM (#23554766)
It comes down to performance, usability, and cost.

Time-series databases make specific architectural decisions and introduce advanced capabilities that enable orders of magnitude better insert/query performance, while also reducing storage cost via compression.

For example, TimescaleDB (where I work), is a relational time-series database built on top of Postgres, which means it includes all of the goodness within Postgres, but also achieves:

* 96%+ compression (ie only uses ~4% of the storage of Postgres) [1]

* 100x-1000x faster queries than Mongo [2]

* 10x higher inserts and 50-1000x faster queries than Cassandra [3]

If your RDBMS is good enough - then please keep using it. :-) But if query latency, insert performance, or cost are becoming concerns, then I'd suggest looking at a relational time-series database.

[1] https://blog.timescale.com/blog/building-columnar-compressio...

[2] https://blog.timescale.com/blog/how-to-store-time-series-dat...

[3] https://blog.timescale.com/blog/time-series-data-cassandra-v...

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by snicker7 on Thursday June 18, 2020 @01:00AM (#23559933)
While those numbers are good, TimescaleDB does not even attempt to compete with the performance of purpose-built time series DBs (e.g. shakti, clickhouse).

Time series DBs (and OLAP dbs in general) have very different trade-offs/needs than transactional DBs.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by akulkarni on Thursday June 18, 2020 @10:41AM (#23563512)
> TimescaleDB does not even attempt to compete with the performance of purpose-built time series DBs

Not sure what you mean by this. TimescaleDB outperforms InfluxDB, another purpose-built time-series DB, on most workloads [0], especially on ones with high-cardinality [1].

In particular our key insight, which some may still find heretical and hard-to-believe, is that it is quite possible to produce best-in-class performance characteristics for time-series using a relational database. In particular, we have been able to add columnar compression to our row-oriented format resulting in 96%+ compression rates [2], and multi-node scale-out resulting in 10M+ inserts per second [3].

TimescaleDB is not designed for workloads where most queries touch all data points (ie full table scans). But that's not what time-series workloads look like.

[0] https://blog.timescale.com/blog/timescaledb-vs-influxdb-for-...

[1] https://blog.timescale.com/blog/what-is-high-cardinality-how...

[2] https://blog.timescale.com/blog/building-columnar-compressio...

[3] https://blog.timescale.com/blog/building-a-distributed-time-...

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by redis_mlc on Wednesday June 17, 2020 @05:03AM (#23549341)
> In particular, I'd love to know if theres anything major that generic RDBMS's could do better here.

Well, everybody with experience outsources monitoring now since it's a non-core cost center, unless there's a compelling scale or secrecy issue.

If RAM and CPU were free, I'd use MySQL or Postgres w/partitions because of their mgmt. features, tested replication and SQL.

But Prometheus or Clickhouse are 10-25x more efficient in terms of space, and often have much faster queries. The tradeoffs are bizarre HA gaps, lack of trained people, and ops groups are stuck supporting it.

I would never recommend monitoring with anything based on HDFS (OpenTSDB), written in Java (Cassandra), or in-memory for large clusters (InfluxDB.)

For monitoring under 200 nodes, anything will work.

If you only have a day to do something, just install Nagios and you'll get 99% of what you really need.

Source: DBA.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by kasey_junk on Wednesday June 17, 2020 @09:16AM (#23550968)
> Well, everybody with experience outsources monitoring now

That has not been my experience. Quite the opposite every place I’ve been that outsourced monitoring ended up bringing back significant portions of their observability stack either for needing more control, different feature sets or because the outsourced solution was cost prohibitive.

I think it is true that lots of teams continue to outsource storage of metrics data but the outsourced vendors are not incentivized to make it easy to do retention/filtering/aggregation well.

Source: Have run observability stacks across a variety of domains.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by darkwater on Wednesday June 17, 2020 @11:31AM (#23552618)
> Well, everybody with experience outsources monitoring now since it's a non-core cost center, unless there's a compelling scale or secrecy issue.

In this scenario I find it odd that there are so many opensource projects with traction and success (one name above all, Prometheus) if they are addressed only to specialized companies. What you say applies to small companies or very big ones with lot of money to spend. Mid-sized companies in my experience prefer to spend money on in-house solution because at their volumes outsourcing is really costly. But that's just my small experience.

Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by redis_mlc on Wednesday June 17, 2020 @11:15PM (#23559448)
Get back to me in a year when your ops staff gets tired of 24x7 support for a cost center.
Re:MetricsDB: TimeSeries Database for storing metrics at Twi... by darkwater on Monday June 22, 2020 @12:22PM (#23601995)
Monitoring how your platform behaves/perform is a cost-center? I think it's a quite important feature in every tech company and depending on the size of the company it may be better to outsource it or do it internally.