Domain 2 of 4 · Chapter 10 of 12

Configure compute, memory, and storage for vector workloads

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing Developing AI Cloud Solutions on Azure premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • Two resource profiles: the build and the serve
  • Reading a compute tier's real numbers
  • Where a vector index actually lives in memory
  • maintenance_work_mem: the knob that decides build time
  • Parallel index builds need workers, not just memory
  • Storage size buys IOPS, and the compute SKU caps them
  • A full disk turns the server read-only
  • Allowlisting pgvector before the database can see it
  • Autovacuum spends the same memory your build wants
  • Recognizing a resourcing question on the exam

Compute tiers on flexible server, on the axes a vector workload cares about

Decision axisBurstableGeneral PurposeMemory Optimized
Memory per vCore (Microsoft's published figure)Variable4 GiB6.75 GiB to 9.5 GiB
vCore range1 to 202 to 1922 to 192
Sustained CPUCredit model: restricted to baseline CPU once credits are exhaustedFull vCoresFull vCores
Microsoft's stated target workloadWeb servers, proofs of concept, small databases, development builds; not recommended for productionA balance of CPU and memory for most production workloadsHigh-performance workloads that need in-memory performance and higher concurrency
What that means for an index buildA long build is sustained CPU, which is what the credit model penalizesWorkable, bounded by 4 GiB per vCoreThe same vCore count buys more RAM for the graph to fit in
What that means for serving queriesCredit depletion can make the server unreachableFine while the working set fits in a quarter of that RAMWhere a working set larger than 4 GiB per vCore belongs
Support postureNo 24/7 support, and root cause analysis might not be providedStandardStandard

Decision tree

Size the tier from the working set, then confirm the SKU can reach the IOPSDevelopment, test, or PoC?Not a production workloadyesBurstableCredit model. Not recommended for production.noWorking set over 4 GiB per vCore?ANN index plus the rows queries touchyesMemory OptimizedPublished at 6.75 GiB to 9.5 GiB per vCorenoSKU max IOPS covers your reads?Read it from the per-SKU compute tablenoA larger SKU, more vCoresA bigger disk cannot exceed the SKU limityesGeneral Purpose, smallest fitting sizePublished at 4 GiB per vCoreConfirm the memory figure and the maximum supported IOPS from the live compute table, not from memory.

Cheat sheet

  • Burstable, General Purpose, and Memory Optimized tiers differ in RAM-per-vCore
  • Size RAM to the working set: the ANN index plus the rows queries touch
  • maintenance_work_mem governs index-build memory and avoids spilling to disk
  • shared_buffers caches index and data pages that keep vector queries fast
  • work_mem sizes per-operation sorts; effective_cache_size hints the planner
  • IOPS scale with disk size, and the compute SKU caps what you can use
  • The index shares the table's disk, and writes stop at 95 percent used
  • pgvector must be added to the azure.extensions server parameter before CREATE EXTENSION
  • Raising max_parallel_maintenance_workers parallelizes and shortens HNSW builds

Unlock with Premium — includes all practice exams and the complete study guide.

References

  1. Compute options in Azure Database for PostgreSQL flexible server
  2. Enable and use DiskANN in Azure Database for PostgreSQL flexible server
  3. PostgreSQL: Resource Consumption configuration parameters
  4. Resource Usage / Memory server parameters
  5. PostgreSQL: Query Planning configuration parameters
  6. Autovacuum tuning in Azure Database for PostgreSQL flexible server
  7. Resource Usage / Asynchronous Behavior server parameters
  8. List of extensions and modules by name in Azure Database for PostgreSQL flexible server
  9. Storage options in Azure Database for PostgreSQL flexible server
  10. Optimize performance when using pgvector in Azure Database for PostgreSQL flexible server
  11. Configure storage autogrow in Azure Database for PostgreSQL flexible server
  12. Create extensions in Azure Database for PostgreSQL flexible server
  13. Allow extensions in Azure Database for PostgreSQL flexible server
  14. Vector search with pgvector in Azure Database for PostgreSQL flexible server
  15. Possible errors when managing extensions in Azure Database for PostgreSQL flexible server