TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Catena: A time series storage engine written in Go

134 pointsby misframerabout 10 years ago

5 comments

misframerabout 10 years ago
Author here. There&#x27;s a lot I left out of the post, especially since it&#x27;s such a young project, but I&#x27;d be happy to answer any questions.<p>Edit: I&#x27;m not sure why I&#x27;m being downvoted... I&#x27;m not home at the moment, so I&#x27;m trying my best to answer using my phone.<p>Edit #2: Back home with a full-size QWERTY keyboard :).
评论 #9163491 未加载
评论 #9163485 未加载
评论 #9163526 未加载
评论 #9165901 未加载
carbocationabout 10 years ago
This is a pleasant, self-honest discussion of purpose-driven software as it is being implemented. The language is irrelevant; it&#x27;s fun to read this type of piece.
评论 #9163370 未加载
jrvabout 10 years ago
Hi, Prometheus[0] author here. Thanks for the interesting article!<p>Since I was curious how this compares to Prometheus&#x27;s internal storage for writes, I whipped up some (disclaimer: very naive and ad-hoc!) benchmarks[1] to get a rough feeling for Catena&#x27;s performance. I am not achieving a lot of write performance with it yet, but maybe I&#x27;m doing something wrong or using it inefficiently. Some questions to investigate would be: what&#x27;s the best number of rows to batch in one insert, and are timestamps in seconds, milliseconds, or essentially only user-interpreted (I noticed the partitioning at least depends heavily on the interval between timestamps)? So far I&#x27;ve just done a tiny bit of fiddling and results haven&#x27;t changed dramatically.<p>The benchmark parameters:<p>* writing 10000 samples x 10000 metrics (100 million data points)<p>* initial state: empty storage<p>* source names: constant &quot;testsource&quot; for all time series<p>* metric names: &quot;testmetric_&lt;i&gt;&quot; (0 &lt;= i &lt; 10000)<p>* values: the metric index &lt;i&gt; (constant integer value within each series)<p>* timestamps: starting at 0 and increasing by 15 seconds for every iteration<p>* GOMAXPROCS=4 (4-core &quot;Core i5-4690K&quot; machine, 3.5GHz)<p>* Disk: SSD<p>* Other machine load: SoundCloud playing music in the background<p>The benchmark results:<p>#### Prometheus ####<p>(GOMAXPROCS=4 go run prometheus_bench.go -num-metrics=10000 -samples-per-metric=10000)<p>Time: 1m26s Space: 138MB<p>#### Catena ####<p>(GOMAXPROCS=4 go run catena_bench.go -num-metrics=10000 -samples-per-metric=10000)<p>Time: 1h25m Space: 190MB<p>So in this particular benchmark Catena took 60x longer and used 1.4x more space.<p>Please don&#x27;t take this as discouragement or a statement on one being better than the other. Obviously Catena is very new and also probably optimized for slightly different use cases. And possibly I&#x27;m just doing something wrong (please tell me!). I also haven&#x27;t dug into possible performance bottlenecks yet, but I saw it utilize 100% of all 4 CPU cores the entire time. In any case, I&#x27;d be interested in a set of benchmarks optimized specifically for Catena&#x27;s use case.<p>Unfortunately we also haven&#x27;t fully documented the internals of Prometheus&#x27;s storage yet, but a bit of background information can be found here: <a href="http://prometheus.io/docs/operating/storage/" rel="nofollow">http:&#x2F;&#x2F;prometheus.io&#x2F;docs&#x2F;operating&#x2F;storage&#x2F;</a> Maybe that&#x27;s worth a blog post sometime.<p>[0] <a href="http://prometheus.io/" rel="nofollow">http:&#x2F;&#x2F;prometheus.io&#x2F;</a><p>[1] The code for the benchmarks is here: <a href="https://gist.github.com/juliusv/ce7c3b5368cd7adf8bc6" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;juliusv&#x2F;ce7c3b5368cd7adf8bc6</a>
评论 #9164248 未加载
basculeabout 10 years ago
&quot;Catena&quot; is also a password hashing function: <a href="http://eprint.iacr.org/2013/525.pdf" rel="nofollow">http:&#x2F;&#x2F;eprint.iacr.org&#x2F;2013&#x2F;525.pdf</a>
kyleredabout 10 years ago
Good stuff!