SingleStore Helios Sizing Guidelines
On this page
Overview
This document is designed to help users with capacity planning to size a SingleStore Helios deployment appropriately.
Size a Workload
Workspace Sizing Considerations |
|
Description and How to Measure |
|
Data Size |
It is important to understand how much data will be stored in SingleStore Helios. The most critical element for sizing is to understand how much of the data is the “working set,” which equates to how much data is required to meet the query latency requirements/SLA of an application. For example: A Fintech application displays stock performance over the last 30 days and stores the historical data for a full year for other types of analysis.
Even if the back-end database stores the previous year’s worth of market performance data (which is periodically queried but does not have an SLA), this would not impact the functionality of the application, and thus would not factor into sizing, as this data is stored in the object storage and not in the local cache storage. Data size can be used as a baseline/lower bound for sizing.
This can be expressed formulaically as:
Questions
|
Data Ingest |
Data ingest is about how much, in both rows and bytes, and how fast data is written into the database. Questions
|
Query Shapes |
The “core queries” of an application are required to calculate the appropriate cluster size. Some core queries are run many times, possibly with different parameters (literals) but otherwise the same structure. It is important to understand the shapes of the core queries that are running as they can impact the performance of the database differently. A query shape (type) is the form of the query plan that determines how much work a query needs to do.
It's also important to identify queries that can run on one partition vs. For example: Filtering on Graphical profile plans as well as JSON profile plans will reveal the indexes being used. Consider The following in the JSON profile means it is touching all shards and scanning:
For profile
Questions
|
Latency |
Typically, customers will provide one or more latency targets for their core queries, such as a 5-second response time, or a range of response times for each core query. Questions
|
Concurrency |
Concurrency refers to the number of queries hitting the data at a given moment, including both typical and peak traffic. General numbers can be used to record the concurrency: 1, 5, 10, 20, 50, 100, 500, 1000 etc. Questions
|
Partitions |
As part of capacity planning you need to determine how many partitions are required for optimal performance. SingleStore is a distributed cluster of nodes that talk to each other. The performance also depends on the types of queries run, whether they implement distributed joins, and how many are run concurrently. The general recommendation for most clusters is to have 4 CPU cores per database partition on each leaf. For example, if you have a cluster of 4 leaf nodes with 16 cores on each leaf (64 CPU cores in total across all leaf nodes), you should have 4 partitions on each leaf, that is, 16 partitions in total across the cluster. It's also important to choose the number of partitions that is divisible by the number of leaves you have. However, if you set 18 partitions instead of 16 then you will not have evenly distributed data. You should consider the workload when deciding on the number of partitions per leaf. By default, the partition count and core count match 1:1, and you need to manually change the number of partitions to maximize the performance.
Questions
|
Comparative Performance for Capacity Planning
To estimate a workspace size, review the examples below and select the one that most closely resembles your requirements.
To determine the optimal workspace size, test the core queries with the selected workspace size and either increase or decrease the size until it fulfills your latency requirements.
Workspace Sizing Examples |
|||
---|---|---|---|
Workspace Size |
Small |
Medium |
Large |
Use Case |
Support ultra-fast, high-performance queries and massive concurrency while minimizing monthly costs |
Support real-time analytics and user-defined metrics while minimizing the time to onboard new tenants |
Maintain existing customers and prepare for significant customer growth by increasing platform availability and resiliency, and optimizing application responsiveness |
Data Size * |
500GB |
7TB |
1TB |
Data Ingest |
< 5,000 RPS |
Current solution takes 40 - 60 minutes to fully load product data. While not specifically tested on an S-8 cluster, load times tested on an S-6 cluster with a single tenant (~135s) and seven tenants concurrently (~340s) demonstrated that replacing the existing database with SingleStore Helios would significantly reduce ETL times. |
< 5,000 inserts/second from the application |
Query Latency |
Sub-second |
P50 query latency of < 1s P95 query latency of < 5s P99 query latency of < 10s (About latency) |
<100ms for 27 different queries |
Query Shapes |
Analytical queries/summary statistics on 4 fact tables of 2M records each, and 20 reference tables of approximately 5,000 records each |
Medium complexity analytical queries SingleStore Helios was evaluated as a means to power an analytics system and provide customized, user-defined metrics within the customer’s app, where “user-defined metrics” are metrics and signals that customers wanted to track/use within their individual environment. |
Analytical (large table scans and aggregations) |
Concurrency tested (QPS) |
10 - 50 |
100 |
100 (achieved with 16:1 CPU:partition ratio) |
Proposed Workspace Size (About workspace sizes) |
S-1 |
S-8 |
S-32 |
* Data sizes shown are compressed, where the compression rate can vary up to 80% based on the type of data.
Last modified: August 23, 2024