All Products
Search
Document Center

Hologres:Best practices for managing computing resources

Last Updated:Mar 26, 2026

Hologres lets you run ETL pipelines, BI dashboards, and online recommendation services on a single instance. When multiple teams share the same instance, workloads compete for resources—ETL peaks can slow dashboards, and large ad-hoc queries can trigger out-of-memory (OOM) errors for other users. This guide explains how to use workload isolation, scheduled scaling, Serverless Computing, and query queues together to balance stability and cost across mixed workloads.

Scenario overview

The strategies in this guide are illustrated with a real-world e-commerce scenario in which three teams share one Hologres instance.

TeamTasksCharacteristics
Data teamReal-time and near-real-time ETL using Flink and DataWorks Data Integration; near-real-time ETL using Dynamic Table; batch ETL using MaxCompute and HologresETL peaks at night; batch ETL runs in early morning
Data analystsBI dashboards for sales data; self-service analyticsBI traffic peaks during work hours, with occasional night surges; self-service queries can be resource-intensive
Recommendation teamReal-time product recommendations using primary key lookupsTraffic peaks every evening

How resource management features interact

Before choosing a strategy, understand how Hologres resource management features interact. Some combinations are mutually exclusive.

FeatureWorks with virtual warehousesWorks with Serverless ComputingWorks with query queues
Fixed PlanScale up onlyNot supportedNot supported
Serverless ComputingOverflow from VWDirect routingRoute queue to serverless
Adaptive Serverless ComputingSmall tasks stay in VWLarge tasks routed automaticallyCompatible
Auto-scalingScale out clustersN/ACompatible
Scheduled scalingScale up/down on scheduleN/ACompatible
Important

Requests optimized by Fixed Plan cannot use Serverless Computing or query queues. Address peak loads for these requests by scaling up the virtual warehouse. Write peaks cannot be handled by auto-scaling.

Choose a resource management strategy

Use the following decision tree to select a strategy.

image
  • Extremely large workloads (massive data backfills, full table scans, joins across 10+ tables, deeply nested subqueries): use Serverless Computing to prevent these tasks from affecting other workloads. Enable adaptive serverless computing for automatic routing.

  • Fixed Plan-optimized requests: scale up the virtual warehouse to handle peaks. Serverless Computing and query queues are not available for these requests.

  • All other requests: choose based on performance requirements, peak patterns, and request type. See the challenges below.

Challenges and solutions

Challenge 1: Resource contention between teams

Problem: ETL pipelines and query workloads compete for the same computing resources, causing interference.

Solution: Deploy multiple virtual warehouses—one per team—to isolate workloads. See Architecture of virtual warehouses.

Example:

  • Primary virtual warehouse (init_warehouse): data team for writes and ETL

  • Read-only virtual warehouse 1: analytics team

  • Read-only virtual warehouse 2: recommendation team

Challenge 2: Fixed peak hours

Problem: Resource demand follows a predictable daily pattern, making it inefficient to maintain peak capacity at all times.

Solution: Use scheduled scaling (beta) to scale virtual warehouses up before peak hours and scale them back down afterward. If resource expansion is needed for fewer than 16 hours per day, scheduled scaling costs less than maintaining dedicated resources around the clock.

Example:

TeamPeak patternScheduled scaling configuration
Data team (real-time ETL)NightlyScale up the primary virtual warehouse in the evening; scale down in the morning. Because real-time ETL uses Fixed Plan, scaling up is the only option.
Data analystsWork hours, with occasional night surgesScale up the read-only virtual warehouse at the start of the workday; scale down in the evening. Handle night surges with auto-scaling (see Challenge 6).
Recommendation teamEvery eveningScale up the read-only virtual warehouse before the evening peak; scale down overnight. Point queries use Fixed Plan, so scaling up is the only option.

Challenge 3: Large tasks causing OOM errors or blocking other tasks

Problem: Large tasks consume excessive resources, triggering OOM errors or blocking smaller tasks for extended periods.

The following workload types are commonly affected.

Batch ETL

A single batch task often requires significant resources and can block the queue for a long time.

PrioritySolution
StabilityRun all batch ETL tasks on Serverless Computing. Configure this at the SQL or user level. See Run read and write tasks with Serverless Computing resources.
Balance stability and costRun small tasks on the primary virtual warehouse; route large tasks to Serverless Computing.

Near-real-time ETL with Dynamic Table

Dynamic Table runs an incremental refresh every minute per table. The compute cost per refresh varies with incremental data volume, making it unpredictable.

PrioritySolution
StabilityRun all Dynamic Table refresh tasks on Serverless Computing. See Create dynamic table.
Balance stability and costRoute refresh tasks for large tables or tables with significant data fluctuations to Serverless Computing; run other tasks on the primary virtual warehouse.

BI dashboards

Many dashboards run simultaneously, and large queries can block smaller ones.

PrioritySolution
Balance stability, cost, and setup effortEnable Adaptive Serverless Computing at the database or user level. Large tasks are automatically routed to Serverless Computing; small tasks remain in the virtual warehouse.
Balance stability and cost

Route specific large queries to Serverless Computing using SQL fingerprints:

  1. Run the dashboard to ensure Hologres processes all requests.

  2. In slow query logs, filter by cpu_time_ms to identify large tasks and extract the digest field (SQL fingerprint). See Get and analyze slow query logs.

  3. Create a query queue for these SQL fingerprints. See Configure classifier matching rules.

  4. Configure the query queue to run on Serverless Computing. See Run query queue queries using Serverless Computing resources.

Cost savingsRun all queries in the virtual warehouse and enable large query auto-rerun for the query queue. Timed-out and OOM queries automatically rerun on Serverless Computing without affecting the user experience. See Large query control.

Challenge 4: Sudden large ad-hoc queries destabilize the instance

Problem: Sporadic analytical queries create unpredictable, high resource usage that affects overall instance stability.

PrioritySolution
StabilityRoute all ad-hoc analytical requests to Serverless Computing at the user level. See Configure at the user level.
Balance stability and costEnable Adaptive Serverless Computing at the user level. Large tasks are routed to Serverless Computing automatically; small tasks run in the virtual warehouse.
Cost savingsRun all requests in the virtual warehouse and enable large query auto-rerun. See Large query control.

Challenge 5: Different performance requirements across dashboard users

Problem: BI dashboards are accessed by different roles—data developers, operations staff, sales teams, and senior management—with varying performance expectations.

High-performance requirements

PrioritySolution
StabilityCreate a dedicated virtual warehouse for high-performance requests.
Balance stability and costRoute all requests through Serverless Computing, or enable Adaptive Serverless Computing.

Latency-tolerant workloads

Request patternSolution
Fixed (a role consistently accesses the same dashboard)Configure manual throttling: run a stress test to determine the virtual warehouse's read capacity, then set a fixed concurrency limit for the query queue. See Create a query queue.
Variable (multiple dashboards accessed by different roles)Enable automatic throttling. Hologres automatically adjusts the query queue's concurrency limit based on current workload. See Automatic throttling for query queues (beta).

Challenge 6: Unexpected request surges

Problem: Sudden, unpredictable traffic spikes—for example, an unexpected surge of nighttime queries—cannot be anticipated by scheduled scaling. Serverless Computing alone cannot handle these surges because the users, tables, and SQL statements involved are unknown in advance.

Solution: Enable auto-scaling. Virtual warehouses automatically scale out during peak loads and scale in when demand subsides. See Multi-cluster and auto scaling (beta).

Advanced settings

Configure task priorities for Serverless Computing

When multiple services share Serverless Computing resources, set priorities at the user level to control which tasks run first under resource contention. See Set priorities for Serverless Computing tasks.

Example:

User typePriorityBehavior when resources are scarce
Roles with high performance requirements5Executed first
Batch ETL tasks1Wait in queue
All other tasks3 (default)Standard scheduling

Configure daily quotas for Serverless Computing

If multiple services use Serverless Computing, costs can be unpredictable. Set daily quotas at the instance level and per user to control costs. See Daily Usage Limit.

Enable high availability for read-only virtual warehouses

For read-only virtual warehouses that serve latency-sensitive workloads—especially online recommendation services—configure multiple shard-level replicas. If a query node fails, queries continue without data loss. See Concurrent queries with shard replicas.