Live data from Hacker News

Thoughts on Time-series Databases

jmoiron.net

111–120 of 132 posts

Re: Thoughts on Time-series Databases

#111
post #80

Really? The big boy in the field KDB+ isn't mentioned? Kx's database is pretty much the gold standard for performance in time series, historical and real-time. http://kxcommunity.com/

I use kdb/Q at work and it’s a fun tool to play with so long as someone else is paying for it. It is quite common in finance (and comparably uncommon outside of it). It’s very expensive of course, and the learning curve is hard. In fact, there are plenty of businesses that have sprung up around kdb that offer consultancy services to help you get started. In an unusual maneuver, one of these consulting businesses actu…

what are unique selling points of kdb compared to other databases aside from the query language?

Re: Thoughts on Time-series Databases

#114
post #11

> Aggregation and expiry start to look a lot like dimensionality: they can be implemented asynchronously in a separate policy layer.It doesn't seem important that the actual storage engine is mindful of these; in fact, it's probably better ignored for efficiency's sake. I wrote my own time series database and actually having well working expiry was harder than expected. I sharded each one of the files into 2GB or 24h…

What industry or app was this for? I wrote something that sounds like this for VoIP packet capture. Though the rates were around 5TB/day. I'd keep the latest indexes in RAM before delta-encoding and writing out. Periodically, merge multiple indexes into one. Worked surprisingly well, and the indexing overhead was only a few bits per packet (given enough similarity in packets over a short chunk of time (say, 1 minute)…

VoIP capture was one of the functions in the system too. But it had others. It looks like your implementation is more sophisticated, I didn't do any delta-encoding. Just periodic fsyncs. The maximum we tested was up to 1TB/day.

Main index ( [(timestamp,offset_in_data)] was simply synced every second. It just looked like a [uint64|uint32|...]. Then there is an advanced service with different plugins, runs in a separate process, trails the main data stream. Each plugin can then write out its own custom index data to file and is also saving its internal state (so it can recover during a hard crash).

Re: Thoughts on Time-series Databases

#115
post #102
post #36

Earlier quoted context omitted.

Just for the record, InfluxDB 0.9 seems to actually be production ready now. Though it doesn't look there's an easy way to migrate to it yet from 0.8.

"Seems to be", sure. Sinks like a tanker when you try to actually use it, though. None of the software libraries have been updated for 0.9 yet.

> Sinks like a tanker when you try to actually use it

Can you name some examples of this besides the CPU authentication bug? Honest question, I'm considering adding InfluxDB to our stack so I'm genuinely curious.

Re: Thoughts on Time-series Databases

#116
At Stack Exchange our monitoring system bosun (http://bosun.org) can use different time series databases as long as they can be bent into tag key+tag value models. Currently it works best with OpenTSDB, but can also support graphite (and elasticsearch populated by logstash). InfluxDB query support is in a branch, but don't want to merge until we have a devoted Bosun+InfluxDB maintainer since we don't use it at Stack currently.

Based on that experience, plus from conversations at Monitorma the other week here is what I think of the current state of some various TSDBs are. Some of this might just be lies or rumor - so take it at at that:

* OpenTSDB: Requires HBase behind it, so that can be a pain for people. Maintenance on it is sparse, it doesn't seem like the project has a shortage of contributors with the time needed. Stability isn't great (connection errors from time to time, having alerts based on querying OpenTSDB highlights this). Aggregation and downsampling don't behave as expected. For example rate derivatives happen too late in the order of operations - linear interpolation can be strange. Also to query metric with anything many tag combinations over more than a recent interval of time (say a month or more) is basically impossible - OpenTSDB memory blows up and GC dominates. This requires one to create additional metrics that are denormalized for this. This is kind of okay because OpenTSDB is incredibly storage efficient at storing time series data. No support for NaN. OpenTSDB has quite a bit of serious users https://github.com/OpenTSDB/opentsdb/wiki/Companies-using-Op.... It can ingest a lot of metrics at a high rate without issue.

* KairosDB: Not much experience here. From what I gather it is like OpenTSDB but for Cassandra. Someone mentioned that they thought they heard some core devs have gone to work at Influx which might be concerning - but I don't know if that is true. But same issue of having to run Cassandra if you don't already.

* Graphite: Very rich query language, but currently not a key / value model. Also is not very storage efficient so the approach is that data gets rolled up after a certain period of time - generally problematic for forecasting.

* InfluxDB: Looks promising, but I heard from multiple people "Tried influxdb - was cool but all my data corrupted and I couldn't recover it" at Monitorama. The general concern at Montiroma was that they are overestimating their stability currently when it comes to a production environment. Based on some basic testing at Stack, we found it to be much slower and take up a lot more space than OpenTSDB.

In summary there is no great choice today. More of a pick your pain and best fit situation. But I'm really curious what people with actual experience in these technologies can add to the tradeoffs and am hopeful for the future.

Re: Thoughts on Time-series Databases

#117
post #12

I actually just migrated 20 million rows of Magic: the Gathering price data from influxDB to postgres this week. For a few days of effort, I decreased my query latency by an order of a magnitude; a full set query, roughly 270 cards, went from 30 to 3 seconds with a cold cache. The migration was prompted by influxDB 0.8 eating 50% of the VPS' cpu and 77% of the ram while idling. It had no capability to index along any…

For those of you reading this that are interested in getting on InfluxDB 0.9. If you intend to use authentication and have a somewhat high request rate, I advise you to wait until the fixes related to #3102 ( https://github.com/influxdb/influxdb/issues/3102 ) are included. Without that fix your CPU is killed because InfluxDB is bcrypting on every request.

That explains why my updates on 100ms intervals seemed like hogging resources.

Re: Thoughts on Time-series Databases

#118

Earlier quoted context omitted.

I've found PostgreSQL to be extremely fast if you store time series in arrays ( http://www.postgresql.org/docs/9.4/static/arrays.html ) in a round-robin fashion. You can also limit the array size, so that you have a fixed number of points per table row (thereby splitting your series across multiple rows), and if you adjust it such that it fits on one PG page it is quite performant.

I don't think you can limit them: However, the current implementation ignores any supplied array size limits, i.e., the behavior is the same as for arrays of unspecified length.

By "limit" I mean your code would do it, not Postgres. E.g. your series is 86400 datapoints long (seconds in a day), you would store it as 100 rows of 864-element-long arrays.

Re: Thoughts on Time-series Databases

#119

At Stack Exchange our monitoring system bosun ( http://bosun.org ) can use different time series databases as long as they can be bent into tag key+tag value models. Currently it works best with OpenTSDB, but can also support graphite (and elasticsearch populated by logstash). InfluxDB query support is in a branch, but don't want to merge until we have a devoted Bosun+InfluxDB maintainer since we don't use it at Stac…

InfluxDB CEO here. Those problems with corrupting data were with the 0.8 line of releases. But to be honest there are people that have been running that and 0.7 in production for almost a year without problems. Your mileage may vary, but we're not supporting any releases prior to the 0.9 line.

For the 0.9 set of releases, this is what we're supporting going forward. There are some queries that cause the server to crash, but as far as I know, there are no problems that corrupt the database or cause data loss.

We'll be releasing 0.9.1 tomorrow. Every 3 weeks after that we'll be releasing a new point release in the 0.9 line that will be a drop in replacement.

Each one of these releases will fix bugs, improve performance, and add features on clustering (last part starting with 0.9.2).

We're starting work on the on disk size with the 0.9.2 release cycle. If it's ready it'll be in that release in 3 weeks.

Basically, it works now for some use cases and scales. Over the next 3 months we'll be adding features and optimizing to make it useful for larger scales and more use cases.

Overall it's still alpha software, which is why we haven't put anything out there that's called a 1.0 release. However, we're trying very hard to not make any breaking API changes going forward between now and whenever we get to 1.0.

Re: Thoughts on Time-series Databases

#120
post #12

I actually just migrated 20 million rows of Magic: the Gathering price data from influxDB to postgres this week. For a few days of effort, I decreased my query latency by an order of a magnitude; a full set query, roughly 270 cards, went from 30 to 3 seconds with a cold cache. The migration was prompted by influxDB 0.8 eating 50% of the VPS' cpu and 77% of the ram while idling. It had no capability to index along any…

On the performance problem, my guess is that you wrote in a bunch of columns and had those in where clauses. I hope the documentation made it clear that you'd be range scanning over data and that you probably wouldn't get desirable performance.

In 0.8 and before, the preferred way to model your data was to create many separate series names. This method is currently giving many users great performance.

As with all databases, how you model your schema has a significant impact on performance.

That being said, it might be that Influx wasn't right for your use case and Postgres is just a better thing to go with.

Also, we're not supporting anything prior to the 0.9 series of releases. 0.8 is deprecated and we'll be pushing everyone to move over to 0.9 as we put out more point releases and fix bugs and ensure that it works for their use case over the coming months.

Post reply on HN