HN user

chaotic-good

182 karma
Posts25
Comments83
View on HN
akumuli.org 6y ago

Analyzing 500B Rows Using Akumuli TSDB

chaotic-good
1pts0
akumuli.org 7y ago

Runtime Cost of Write-Ahead Logging

chaotic-good
3pts0
akumuli.org 7y ago

Using vector I/O optimize memory usage

chaotic-good
7pts0
akumuli.org 8y ago

Scaling TSDB-specific operations

chaotic-good
2pts0
akumuli.org 8y ago

Designing Inverted Index for the Time-Series Database

chaotic-good
2pts0
akumuli.org 8y ago

Storage engine design notes (LSM vs. B+tree)

chaotic-good
2pts0
translate.google.com 9y ago

Silicon Valley's nightmares comes true in Russia

chaotic-good
1pts1
akumuli.org 9y ago

Storage engine design

chaotic-good
179pts28
akumuli.org 9y ago

Running time-series database on 32-core machine (16M writes/second)

chaotic-good
1pts0
akumuli.org 9y ago

Benchmarking Akumuli – 4.5M writes per second on AWS

chaotic-good
4pts0
akumuli.org 9y ago

Predictive compression algorithm for time-series

chaotic-good
2pts0
akumuli.org 9y ago

Akumuli Markedly Outperforms InfluxDB in Time-Series Data and Metrics Benchmark

chaotic-good
11pts0
akumuli.org 9y ago

Time-series compression (part 1)

chaotic-good
3pts1
www.cs.ucr.edu 9y ago

The UCR Matrix Profile Page

chaotic-good
2pts0
www.stableit.ru 10y ago

How to scale graphite up to X times and reduce cpu consumption twice?

chaotic-good
2pts0
akumuli.org 10y ago

Some thoughts about numeric time-series databases

chaotic-good
2pts0
news.ycombinator.com 10y ago

Ask HN: What do you need from time-series database?

chaotic-good
1pts0
www.cs.ucr.edu 11y ago

iSAX 2.0: Indexing and Mining One Billion Time Series [pdf]

chaotic-good
26pts8
akumuli.org 11y ago

Why text-based serialization is awesome

chaotic-good
2pts1
akumuli.org 11y ago

Time-series storage design – compression

chaotic-good
2pts0
github.com 11y ago

TCPKali: Open-source load generator and performance testing tool

chaotic-good
8pts0
akumuli.org 11y ago

Time-series storage design

chaotic-good
2pts0
github.com 11y ago

Show HN: Compressed N-gram index for golang

chaotic-good
4pts0
news.ycombinator.com 11y ago

Ask HN: Is there any demand on time-series data mining?

chaotic-good
3pts1
github.com 11y ago

Show HN: Akumuli – time-series database

chaotic-good
12pts7

I don't see any mentions of p99 latency in the benchmark results. Pushing gigabytes per second is not that difficult on modern hardware. Doing so with reasonable latency is what's challenging. Also, instead of using custom benchmarks it's better to just use the OMB (open-messaging benchmark).

I tend to agree with this.

The code tend to be loaded with primitives that express ownership semantics or error handling. Every time something changes (for instance, you want not just read but also modify values referenced by the iterator) you have to change code in many places (you will have to invoke 'as_mut' explicitly even if you're accessing your iterator through mutable ref). This could be attributed (partially) to the lack of function overload. People believe that overload is often abused so it shouldn't be present in the "modern" language. But in languages like C++ overload also helps with const correctness and move semantics. In C++ I don't have to invoke 'as_mut' to modify value referenced by the non-const iterator because dereferencing operator has const and non-const overloads.

Async Rust is on another level of complexity compared to anything I used. The lifetimes are often necessary and everything is warpped into mutliple layers, everything is Arc<Mutex<Box<*>>>.

I'm not asking anything on behalf of any company and just genuinely curious (and I don't think that we're competitors, both systems are designed for totally different niches). I'm working on tiered-storage implementation btw. Looks like the approach here is the total opposite of what everyone else is doing. I see some advantages but also disadvantages to this. Hence the question.

Why replicate data at the VM/disk level when those disks are already provided as a fully redundant system?

That's easy. EBS and similar solutions comes with the price. They're very expensive. Especially, when you need a lot of IOPs. You may be saving on cross-AZ traffic but you will pay ridiculous amount of money on storage. If you have replication you can use attached storage which is way cheaper.

It could be easy to operate when everything is fine but what's about incidents? If I understand correctly, there is a metadata database (BTW, is it multi-AZ as well?). But what if there is a data loss incident and some metadata was lost? Is it possible to recover from S3? If this is possible, then I guess that can't be very simple and should require a lot of time because S3 is not that easy to scan to find all the artefacts needed for recovery.

Also, this metadata database looks like a bottleneck. All writes and reads should go through it so it could be a point of failure. It's probably distributed and in this case it has its own complex failure modes and it has to be operated somehow.

Also, putting things from different partitions into one object is also something I'm not very keen about. You're introducing a lot of read amplification and S3 bills for egress. So if the object/file has data from 10 partitions and I only need 1, I'm paying for 10x more egress than I need to. The doc mentions fanout reads from multiple agents to satisfy a fetch request. I guess this is the price to pay for this. This is also affects the metadata database. If every object stores data from one partition the metadata can be easily partitioned. But if the object could have data from many partitions it's probably difficult to partition. One reason why Kafka/Redpanda/Pulsar scale very well is that the data and metadata can be easily partitioned and these systems do not have to handle as much metadata as I think WarpStream have to.

You have to provision you disk space accordingly. NVMe needs some free space to have good performance. In this case I think that in Redpanda benchmarks the disk space was available and in case of benchmarks done by Confluent guy the system was provisioned to use all disk space.

With page cache it's OK, because the FTL layer of the drive will work with 32MiB blocks but in case of Redpanda the drive will struggle because FTL mappings are complex and GC has more work. If Kafka would be doing fsync's the behaviour would be the same.

Overall, this looks like a smearing campaign against Redpanda. The guy who wrote this article works for Confluent and he published it on his own domain to look more neutral. The benchmarks are not fair because one of the systems is doing fsyncs and the other does not. Most differences could be explained by this fact alone.

Modern TSDB is expected to support tags. This means that every series will have a unique set of tag-value pairs associated with it. E.g. 'host=Foo OS=CentOS arch=amd64 ssdmodel=Intel545 ...'. And in the query you could pinpoint relevant series by this tags thus the tags should be searchable. For instance, I may want to see how specific SSD model performs on specific OS or specific app. If the set of tags is stored as a json in one field such queries wouldn't work efficiently.

About that 1M writes thing. You have two options. 1) Organize data by metric name first, or 2) by timestamp. In case of 2) the updates will be linear but reads will have huge amplification. In case of 1) updates will be random, but reads will be fast.

'metric_name text' is actually a tag-value list. Many TSDB's allows you to match data by tag. Each tag should be represented by a column in your example.

Single table design will be prone to high read/write amplification due to data alignment. Usually, you need to read many series at once so your query will turn into full table scan. Or it will read a lot of unneeded data which happened to be located near the data you need. Writes will be slow since your key starts with metrics name. Imagine that you have 1M series and each series gets new data point every second. In your scema it will result in 1M random writes.

Cardinality of the table will go through the roof, BTW. Every data point will add the key. Good luck dealing with this.

They can't handle high cardinality. Imagine having millions of columns in the column-oriented database (70% of those columns are updated every second). Imagine that you have to add new columns all the time.

The main misconception about TSDB's is that it's just a data with timestamp. TSDB's has multi-dimentional data model, time is only one of the dimensions.

Successful, popular concurrent platforms like Erlang/OTP, Nginx, and node.js, eschew threads in favor a single-threaded, async/non-blocking code model.

All these platforms have some problems. E.g. Nginx is PITA if your processes need to communicate with each other. Erlang/OTP has this nasty mailbox problem (O(N^2) behavior of the selective receive). The cooperative multitasking is a piece of Victorian-era technology that is so painfully bad for various reasons, but people still tend to believe that is solves something.

On the other hand, modern operating systems are awesome. The thread schedules are awesome. Thread schedulers can dynamically adjust thread priorities depending on the load and solve some nasty synchronization problems (like priority inversion or starvation) for you. It's not 1995 and OS schedulers can switch threads in O(1) and most server apps can use a thread per connection approach without any problems. The only thing you need to get right is a synchronization, but there are a lot of tools that can help (like Thread Sanitizer). It's much harder to get the synchronization right with cooperative multitasking (good luck finding that priority inversion on implicit lock caused by dumb channel use pattern) than with normal threads.

JFK that the link doesn't work: the Russian government is going to create national big data operator. All internet companies must store their information there. They can use this information to generate ad-revenue but they should pay 2% fee to this regulator. BTW, they should pay the taxes from this money as well.

If I understand this right, with Intel's Optane you will eventually need to write everything to HDD because data collection happens at steady pace and the cache size is limited.

> Maybe I'm getting this all wrong, but aren't the leaves also representing chunked data, which is compressed.

Leaf nodes contain data from one series (this data should be read together) and SSTable with time-series data contains many series and there is no guarantee that all these series will be used by the query.

> The Prometheus solution also sequentially places compressed chunks for the same series.

I'm not really that familiar with Prometheus internals, especially with indexing part. As I understand it doesn't align writes so there is a lot of write amplification on the lower level that translates to cell degradation and non-optimal performance, but I can be wrong here.

It's not that easy, actually. The simplest method that can utilize the full throughput of the drive is to use large writes (1MB or larger). This is the fastest possible way to write data to the SSD, period. This method also creates the simplest possible FTL mapping table.

Random reads and writes are significantly slower if you write everything from one thread. To speed everything up you should write in parallel (for example using Linux AIO + O_DIRECT, or libuv + O_DIRECT). OS level buffering and many OS threads will deliver good random write throughput as well.

There are other effects to consider, e.g. read-write interference.

I understand that was a micro-benchmark of one part of the system. The whole system is looking to be roughly in line with the Gorilla numbers.

This makes sense now. I've found out that the compression algorithm performance numbers affect the overall performance in a big way. On modern SSD the entire workload is CPU bound.

Akumuli is desinged for an SSD and NVMe drives so I chose to have a lot of random reads and writes. My laptop's NVMe drive have a random write througphut around 400MB/s (AFAIR) and my most havy performance test wrote data at rate about 70MB/s (16M data points per second).

1. Each leaf node is a fixed size block that contains compressed values and timestamps. 1000 values is just an example, number of values in one leaf node is variable.

2. Because there is a lot of data-structures. I'm using tree per series. The database can simply store hundreds of thousends of series. Creating WAL per series is not feasible.

3. It maintains a list of roots.

4. One I/O operation per node. You will fetch a leaf node for every ~1000 data points and a superblock for every 32 leaf nodes. It's not as bad as it sounds because you will read data for one series only. To span over 4 levels the series should contain tens of millions of points.

5. Yes. You will need a beefy machine for this with a lot of RAM.

6. Random reads are fast on modern SSDs. It's optimized for SSD (I simply don't have a computer with HDD).

7. It stores only composable aggregations - min, max, count, sum, min/max timestamps.

8. All series names is stored in memory. During the query time this memory is scanned using regexp to find relevant series names and they ids. This is a kind of a temporary solution. It works good enough for the datasets with small cardinality (around 100K series).

This is a one more example of the design in which one file holds many series and everything is chunked by time:

- "there is no longer a single file per series but instead a handful of files holds chunks for many of them"

- "We partition our horizontal dimension, i.e. the time space, into non-overlapping blocks. Each block acts as a fully independent database containing all time series data for its time window."

I don't believe this will work out well because it will introduce read amplification during query time (compared to file per series approach that they're using now). And I'm really curious how they managed to get 20M writes per second on laptop. The article states that they're using compression algorithm from Gorilla paper and Gorilla paper authors claims that they managed to get 1.5M on a single machine.

Prometheus is a monitoring system (pull based), Akumuli is a TSDB (push based). I believe that one can use Akumuli as a long-term storage for Prometheus.

Akumuli is quite different from InfluxDB. It focuses on single node performance and operational simplicity. Essentially I'm trying to make it a "fire and forget" kind of app. No idea about Druid.

In Defense of C++ 9 years ago

I saw this first time many years ago. It clearly states that exceptions is a good thing but shouldn't be used in Google's projects because their code is not prepared for exceptions:

On their face, the benefits of using exceptions outweigh the costs, especially in new projects. However, for existing code, the introduction of exceptions has implications on all dependent code. If exceptions can be propagated beyond a new project, it also becomes problematic to integrate the new project into existing exception-free code. Because most existing C++ code at Google is not prepared to deal with exceptions, it is comparatively difficult to adopt new code that generates exceptions.

And most importantly, I don't think that they're disabling exceptions using compiler flag. I'm sure that they just using error codes for error handling instead of exceptions.

In Defense of C++ 9 years ago

This article doesn't have a clue. For example:

but many C++ programmers disable exceptions for performance

I have never seen a project like this for 10+something years. The only piece of code with disabled exceptions that I've seen was created for Atmel controllers. And in modern C++ exceptions is zero-cost. Your paying for exceptions only when they occur so, nobody is disabling exceptions now.

This is not the only line that bugs me but I don't have enough time for it right now.

Exceptions give you stack traces automatically. All of that context (and more) is there without library authors having to manually weave it in at every level of calls.

I find exceptions really useful but also, I think that with exceptions people tend to loose very useful panic/error dichotomy. I saw projects without a single "panic" in the code. All those projects gravitated towards dumb error handling mechanisms aka "log all errors and continue".

Many infrastructure services don't have any auth at all. This doesn't make them bad. This just means that these products have been developed for trusted environments. Even if MongoDB would have been configured properly by default it shouldn't be exposed on the internet anyway. And you can't blame devs just because somebody doesn't know how to configure iptables.