- Performance and Scaling
- Virtual Instances
A Virtual Instance is a set of compute resources that are used to serve your queries. It comprises a certain amount of CPU and memory. When you issue a query, it will use the resources of your Virtual Instance to execute. If you pick a larger Virtual Instance, your query can use a larger pool of CPU and memory, which typically results in a reduction in query latency. A larger Virtual Instance can also support higher number of concurrent queries.
You will be asked to choose a Virtual Instance shortly after creating your Rockset account. Your queries from this Virtual Instance can access all or any of your collections in your Rockset account.
You can update your account’s Virtual Instance size at any time in the Virtual Instances tab of the Rockset Console.
All Virtual Instances are hosted in us-west-2 region by default. Looking for a different region? Contact us.
#Choosing a Virtual Instance
Rockset offers the following Virtual Instances:
|Dedicated Instance (Predictable Query Performance. Ideal for Production Apps)||Small||4||32 GiB||1 MB/s|
|Medium||8||64 GiB||2 MB/s|
|Large||16||128 GiB||4 MB/s|
|XLarge||32||256 GiB||6 MB/s|
|2XLarge||64||512 GiB||12 MB/s|
|4XLarge||128||1024 GiB||24 MB/s|
|8XLarge||256||2048 GiB||48 MB/s|
|16XLarge||512||4096 GiB||196 MB/s|
|Shared Instance (Variable Query Performance. Ideal for Development)||c12.shared||Variable||Variable||1 MB/s|
Typically, the compute you’ll require will depend on four things:
- the size of the data you’re querying (data size)
- the complexity of your query (query complexity)
- the number of concurrent queries (query load)
- the query latency requirement of your application (query latency)
You can choose a Virtual Instance size that meets your needs.
For all Dedicated Instances, you can view associated time series metrics in the Rockset Console, under Virtual Instances > Metrics.
Currently, four metrics are available:
- number of vCPUs (allocated compute)
- amount of memory (allocated memory)
- percentage of CPU utilized by leaf and aggregator nodes (cpu utilization)
- percentage of memory utilized by leaf and aggregator nodes (memory utilization)
Leaf nodes store and ingest data. Aggregator nodes aggregate data as part of queries before results are returned.
#Is the Shared Virtual Instance suitable for production workloads?
The Shared Virtual Instance is not suitable for production workloads. Accounts in this Virtual Instance share a global resource pool and isolation is not guaranteed. Your data is strictly kept isolated from other accounts but you share CPU and memory resources with other accounts. Sharing resources with other accounts allows you to utilize a lot of resources at a cost-effective price and is a great place to start using Rockset. A noisy neighbor can affect the latency and throughput of your queries. Bursty workloads from accounts may impact your query performance and availability.
The Shared Virtual Instance is usually useful for development and prototyping.
#Will moving to a larger Virtual Instance make my queries faster?
Generally, adding compute by switching to a larger Virtual Instance will make your queries faster. Typically, doubling CPU allocation (e.g., moving from Medium (8 CPUs) to Large (16 CPUs) will increase your query performance by approximately 2x (e.g., reduce query latency from 100ms to 50ms). Note that eventually your queries will not be bound by compute and instead reach the limitations of the underlying infrastructure — at which point adding additional compute will cease to affect latency.
#If I expect my query load to increase significantly, do I need to move to a larger Virtual Instance?
Generally, yes. For example, if you’re running 50 queries-per-sec and add an additional 50 queries-per-second (for 100 queries-per-second total), each query will get a proportionally smaller compute allocation and query latency will increase accordingly (generally proportional to the increase in QPS). In this example, you might notice a query latency increase of approximately 2x. If you want your query latencies to remain the same even when you double your queries-per-second, you should migrate to a Virtual Instance that is 2x larger in size.
For this reason we always recommend stress-testing production workloads before launching your application on Rockset.
#Does a Virtual Instance have a fixed amount of compute resources?
Yes, a Virtual Instance has a fixed amount of compute resources.
#Can I migrate my application from one Virtual Instance to another? Does it encounter downtime?
You can migrate your application from one Virtual Instance to another at any time in the Virtual Instances tab of the Rockset Console. There is no downtime associated with this migration. Once the migration is completed, Rockset will automatically begin executing queries on your new Virtual Instance.