Choosing the right database is a critical choice when building any software application. All databases have different strengths and weaknesses when it comes to performance, so deciding which database has the most benefits and the most minor downsides for your specific use case and data model is an important decision. Below you will find an overview of the key concepts, architecture, features, use cases, and pricing models of M3 and OpenTSDB so you can quickly see how they compare against each other.
The primary purpose of this article is to compare how M3 and OpenTSDB perform for workloads involving time series data, not for all possible use cases. Time series data typically presents a unique challenge in terms of database performance. This is due to the high volume of data being written and the query patterns to access that data. This article doesn’t intend to make the case for which database is better; it simply provides an overview of each database so you can make an informed decision.
M3 vs OpenTSDB Breakdown
Time series database
Time series database
The M3 stack can be deployed on-premises or in the cloud, using containerization technologies like Kubernetes or as a managed service on platforms like AWS or GCP
OpenTSDB can be deployed on-premises or in the cloud, with HBase running on a distributed cluster of nodes.
Monitoring, observability, IoT, Real-time analytics, large-scale metrics processing
Monitoring, observability, IoT, log data storage
Horizontally scalable, designed for high availability and large-scale deployments
Horizontally scalable across multiple nodes using HBase as its storage backend
M3 is a distributed time series database written entirely in Go. It is designed to collect a high volume of monitoring time series data, distribute storage in a horizontally scalable manner, and efficiently leverage hardware resources. M3 was initially developed by Uber as a scalable remote storage backend for Prometheus and Graphite and later open-sourced for broader use.
OpenTSDB (Open Time Series Database) is an open-source, distributed, and scalable time series database built on top of Apache HBase, a NoSQL database. OpenTSDB was designed to address the growing need for storing and processing large volumes of time series data generated by various sources, such as IoT devices, sensors, and monitoring systems. It was initially developed by StumbleUpon in 2010 and later became an independent project with an active community of contributors.
M3 for Time Series Data
M3 is specifically designed for time-series data. It is a distributed and scalable time-series database optimized for handling large volumes of high-resolution data points, making it an ideal solution for storing, querying, and analyzing time-series data.
M3’s architecture focuses on providing fast and efficient querying capabilities, as well as high ingestion rates, which are essential for working with time-series data. Its horizontal scalability and high availability ensure that it can handle the demands of large-scale deployments and maintain performance as data volumes grow.
OpenTSDB for Time Series Data
OpenTSDB is designed for time series data storage and analysis, making it an ideal choice for managing large scale time series datasets. Its architecture enables high write and query performance, and it can handle millions of data points per second with minimal resource consumption. OpenTSDB’s flexible querying capabilities allow users to perform complex analysis on time series data efficiently.
M3 Key Concepts
- Time Series Compression: M3 has the ability to compress time series data, resulting in significant memory and disk savings. It uses two compression algorithms, M3TSZ and protobuf encoding, to achieve efficient data compression.
- Sharding: M3 uses virtual shards that are assigned to physical nodes. Timeseries keys are hashed to a fixed set of virtual shards, making horizontal scaling and node management seamless.
- Consistency Levels: M3 provides variable consistency levels for read and write operations, as well as cluster connection operations. Write consistency levels include One (success of a single node), Majority (success of the majority of nodes), and All (success of all nodes). Read consistency level is One, which corresponds to reading from a single nod
OpenTSDB Key Concepts
- Data Point: A single measurement in time consisting of a timestamp, metric, value, and associated tags.
- Metric: A named value that represents a specific aspect of a system, such as CPU usage or temperature.
- Tags: Key-value pairs associated with data points that provide metadata and help categorize and query the data.
M3 is designed to be horizontally scalable and handle high data throughput. It uses fileset files as the primary unit of long-term storage, storing compressed streams of time series values. These files are flushed to disk after a block time window becomes unreachable. M3 has a commit log, equivalent to the commit log or write-ahead-log in other databases, which ensures data integrity. Client Peer streaming is responsible for fetching blocks from peers for bootstrapping purposes. M3 also implements caching policies to optimize efficient reads by determining which flushed blocks are kept in memory.
OpenTSDB is built on top of Apache HBase, a distributed and scalable NoSQL database, and relies on its architecture for data storage and management. OpenTSDB stores time series data in HBase tables, with data points organized by metric, timestamp, and tags. The database uses a schema-less data model, which allows for flexibility when adding new metrics and tags. The OpenTSDB architecture also supports horizontal scaling by distributing data across multiple HBase nodes.
Free Time-Series Database Guide
Get a comprehensive review of alternatives and critical requirements for selecting yours.
M3 uses a commit log to ensure data integrity, providing durability for write operations.
M3’s client peer streaming fetches data blocks from peers for bootstrapping purposes, optimizing data retrieval and distribution.
M3 implements various caching policies to efficiently manage memory usage, keeping frequently accessed data blocks in memory for faster reads.
OpenTSDB’s distributed architecture allows for horizontal scaling, ensuring that the database can handle growing volumes of time series data.
OpenTSDB uses various compression techniques to reduce the storage footprint of time series data.
Query Language with time series support
OpenTSDB features a flexible query language that supports aggregation, downsampling, filtering, and other operations for analyzing time series data.
M3 Use Cases
Monitoring and Observability
M3 is particularly suitable for large-scale monitoring and observability tasks, as it can store and manage massive volumes of time-series data generated by infrastructure, applications, and microservices. Organizations can use M3 to analyze, visualize, and detect anomalies in the metrics collected from various sources, enabling them to identify potential issues and optimize their systems.
IoT and Sensor Data
M3 can be used to store and process the vast amounts of time-series data generated by IoT devices and sensors. By handling data from millions of devices and sensors, M3 can provide organizations with valuable insights into the performance, usage patterns, and potential issues of their connected devices. This information can be used for optimization, predictive maintenance, and improving the overall efficiency of IoT systems.
Financial Data Analysis
Financial organizations can use M3 to store and analyze time-series data related to stocks, bonds, commodities, and other financial instruments. By providing fast and efficient querying capabilities, M3 can help analysts and traders make more informed decisions based on historical trends, current market conditions, and potential future developments.
OpenTSDB Use Cases
Monitoring and Alerting
OpenTSDB is well-suited for large-scale monitoring and alerting systems that generate vast amounts of time series data from various sources.
IoT Data Storage
OpenTSDB can store and analyze time series data generated by IoT devices, such as sensors and smart appliances, enabling real-time insights and analytics.
OpenTSDB’s flexible querying capabilities make it an ideal choice for analyzing system and application performance metrics over time.
M3 Pricing Model
M3 is an open source database and can be used freely, although you will have to account for the cost of managing your infrastructure and the hardware used to run M3. Chronosphere is the co-maintainer of M3 along with Uber and also offers a hosted observability that uses M3 as the backend storage layer.
OpenTSDB Pricing Model
OpenTSDB is open-source software, which means it is free to use without any licensing fees. However, the cost of running OpenTSDB depends on the infrastructure required to support the underlying HBase database, such as cloud services or on-premises hardware.
Get started with InfluxDB for free
InfluxDB Cloud is the fastest way to start storing and analyzing your time series data.