- Performance and Scaling
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.
Choosing a Virtual Instance
Rockset offers the following Virtual Instances:
|Dedicated Instance (Predictable Query Performance. Ideal for Production Apps)||Small||4||32 GiB||2 MiB/s|
|Medium||8||64 GiB||6 MiB/s|
|Large||16||128 GiB||12 MiB/s|
|XLarge||32||256 GiB||24 MiB/s|
|2XLarge||64||512 GiB||48 MiB/s|
|4XLarge||128||1024 GiB||96 MiB/s|
|8XLarge||256||2048 GiB||192 MiB/s|
|16XLarge||512||4096 GiB||384 MiB/s|
Typically, the compute you’ll require will depend on four things:
- data size: the size of the data you’re querying
- query complexity: the complexity of your query
- query load: the number of concurrent queries
- query latency: the query latency requirement of your application
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:
- allocated compute: number of vCPUs
- allocated memory: amount of memory
- cpu utilization: percentage of CPU utilized
- memory utilization: percentage of memory utilized
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 approximately double your query performance (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 QPS, 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 incur 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.