Virtual Instance Classes and Sizes
Virtual Instances (VIs) are a set of compute resources used to process streaming ingest and queries. They are available in a variety of sizes and classes allowing for tailored applications and flexible computing based on performance and cost considerations.
VI sizes are categorized into dedicated and shared types. Dedicated Virtual Instances offer isolated environments, ideal for production, and are available in sizes ranging from XS to 16XL. Increasing the size will double the compute and memory resources, ensuring scalability and performance enhancements. Shared Virtual Instances, including Free, Nano, Micro, and Milli sizes, utilize a global resource pool, making them cost-effective solutions for development and prototyping.
VI classes are a subtype only available for Dedicated Virtual Instances, and allow further customization of hardware profiles to optimize performance for specific use cases. The General Purpose Instance Class provides a balanced mix of compute and memory, suited for moderate workloads like ingest and query operations with search characteristics. For more demanding applications, the Memory-optimized Instance Class offers double the memory of the General Purpose class, perfect for handling large data sets and intensive query demands.
Dedicated Virtual Instances
Dedicated Virtual Instances are isolated and meant for production use cases. Rockset offers the following Dedicated Virtual Instance sizes:
Size | Ingest* |
---|---|
XSmall | 3 MiB/s |
Small | 6 MiB/s |
Medium | 12 MiB/s |
Large | 24 MiB/s |
XLarge | 48 MiB/s |
2XLarge | 96 MiB/s |
4XLarge | 192 MiB/s |
8XLarge | 384 MiB/s |
16XLarge | 768 MiB/s |
A virtual instance will have double the compute and memory resources available with every size increase.
*Ingest represents the peak streaming ingest limit for insert-only workloads with record sizes of 1 KiB. Source and collection configurations such as average document size, ingest transformations, and clustering may lead to different observed throughputs.
Shared Virtual Instances
Shared Virtual Instances share a global resource pool with other accounts and are a cost-effective way to develop and prototype. Rockset offers the following Shared Virtual Instance sizes:
Size | Ingest* |
---|---|
Free | 50 KiB/s |
Nano | 150 KiB/s |
Micro | 750 KiB/s |
Milli | 1.5 MiB/s |
*Ingest represents the peak streaming ingest limit for insert-only workloads with record sizes of 1 KiB. Source and collection configurations such as average document size, ingest transformations, and clustering may lead to different observed throughputs.
Ingest Warning
For all Virtual Instance sizes, if your VI cannot sustain the write rate, write requests may be rejected until the VI can process the writes in a timely manner. If this occurs, try slowing down your requests or increasing your VI size to keep up.
Virtual Instance Class
Virtual Instance Classes comprise varying underlying hardware profiles optimized for different use cases and allow you to choose the appropriate mix for your application. You can choose between different Virtual Instance Classes while keeping the same Virtual Instance Size.
An instance class is only applicable for Dedicated Virtual Instances.
General Purpose Instance Class (currently in Beta) balances compute and memory resources and can be used for various use cases. It is ideal for ingest and query workloads with search characteristics, a moderate working set size, and queries that don’t require much memory to process.
Memory-optimized Instance Class provides double the amount of memory compared to the general purpose instance class for the same size virtual instance. It is ideal for queries that process large data sets or have a large working set size due to the mix of queries running on the VI.
Choosing a VI Class and Size
When to consider switching instance classes
- It is highly recommended not to switch from Memory-optimized to General-Purpose until your memory utilization is consistently below <60%
- You are running on a General Purpose Instance Class and you observe frequent
RESOURCE_EXHAUSTED
errors related to memory with your queries. Switching to Memory Optimized can reduce or eliminate such errors - You are running on a Memory Optimized Instance Class and have low memory utilization (<60%) and moderate CPU utilization, where going to a smaller-sized Virtual Instance hurts your query performance. Switching to General Purpose for the same size Virtual Instance can reduce your cost while keeping your performance the same.
- You are running a general-purpose
Ingest
Virtual Instance and getting close to the collection limits, which coincide with higher memory utilization. Switching to Memory Optimized Instance Class will double your collection limits.
When to consider going up or down a size
- When both CPU and Memory utilization are high or low, it’s less likely that switching an instance class will be the right course of action. When resource utilization is high, going up a size will most likely resolve any performance issues, and when resource utilization is low, going down a size will be the most cost-efficient way to maintain performance without being over-provisioned.
- We recommend using auto-scaling to remove the need to adjust your VI size to peak and off-peak hours and optimize the performance while saving on cost.
Multi-VI Configuration Recommendation
We recommend that the memory of Query VI to be at least 25% of memory of Ingest VI.
In other words, the Query VI should not be more than 2 sizes down within the same instance class. For example, if the Ingest VI is a 2XL General Purpose VI then the Query VI should not be lower than a Medium General Purpose VI.
Since the Memory-Optimized Instance Class offers double the memory of the General Purpose class, if the Ingest VI is General Purpose and the Query VI is Memory Optimized, then the Query VI should not be more than 3 sizes down. If the Ingest VI is Memory Optimized and the Query VI is General Purpose, then the Query VI should not be more than 1 size down.
Learn more about multi-VI configurations here.
What Impacts VI Performance
Typically, the virtual instance size and class you'll require will depend on the following things:
- data size: the size of the data you're querying
- query complexity: the complexity of your query
- query selectivity: how many documents are being scanned by your query
- working set size: the data size of the mix of queries you run at any given time. If your working set fits in the cache, you’ll see improved performance.
- query load: the number of concurrent queries
- query latency: the query latency requirement of your application
- streaming ingest load: the number and size of documents being processed, transformed, and indexed from the source. We recommend separating the ingest load from the query load on two different Virtual Instances for optimal performance.
- tailing load: the number of streaming updates being processed for the live mounted collections on a Query Virtual Instance. For Query Virtual Instances, we recommend only mounting collections that you plan to query on this instance. Learn more about tailing here.
There are different limits according to the types, classes, and sizes of Virtual Instances, which are listed here. You can choose a Virtual Instance size that meets your needs.
Updated 8 months ago