Skip to content
Stand with Ukraine flag

Performance

ThingsBoard performance was benchmarked on AWS EC2 instances using MQTT smart-meter emulators. Each test ran for 24+ hours to capture steady-state behavior and long-term stability.

All tests used a single ThingsBoard instance in monolithic mode with the specified database and queue configuration.

ScenarioDevicesmsg/secdp/secInstanceQueueDatabaseAvg CPUDisk IOPS
A100K111333c5.xlargeIn-MemoryPostgreSQL5%50
B100K1,1113,333c5.xlargeIn-MemoryPostgreSQL20%350
C100K1,1113,333c5.xlargeKafkaPostgreSQL25%400
D500K5,55516,666c5.4xlargeKafkaCassandra40%800
E1M11,11133,333c5.9xlargeKafkaCassandra55%1,200

Instance specs reference:

InstancevCPURAMNetwork
c5.xlarge48 GBUp to 10 Gbps
c5.4xlarge1632 GBUp to 10 Gbps
c5.9xlarge3672 GB10 Gbps
  • Cassandra is ~5× more disk-efficient than PostgreSQL for time-series data at the same write rate — critical for high-throughput deployments.
  • In-memory queue works well up to ~3K dp/sec but becomes unreliable at 10× that rate due to back-pressure. Use Kafka for production loads above 5K dp/sec.
  • 100K concurrent MQTT connections consume approximately 6.5 GB of RAM on the transport layer.
  • Kafka overhead is minimal — scenarios B (in-memory) and C (Kafka) show nearly identical CPU at the same message rate, with Kafka adding ~5% CPU and better reliability.
  • CPU scales linearly with message throughput. Doubling the data point rate roughly doubles CPU utilization.

Daily disk consumption at 3,333 data points per second:

DatabaseDaily disk30-day diskNotes
PostgreSQL~4.8 GB~144 GBRow-per-data-point, no built-in compression
Cassandra~1.0 GB~30 GBColumnar compression, configurable TTL
Use caseRecommended setup
Development / testingMonolith, PostgreSQL, in-memory queue
≤100K devices, ≤3K dp/secMonolith, PostgreSQL, in-memory or Kafka
100K–500K devices, ≤15K dp/secMonolith or small cluster, Cassandra, Kafka
500K+ devices, 15K+ dp/secMicroservices cluster, Cassandra, Kafka

For deployment architecture options and cluster sizing, see Deployment Scenarios.