Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit 2d5ab6d

Browse files
authored
Improve cost optimization and documentation (#141)
1 parent 2e06f3f commit 2d5ab6d

File tree

5 files changed

+39
-6
lines changed

5 files changed

+39
-6
lines changed

backend/indexing-job-template.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ spec:
1818
spec:
1919
serviceAccountName: PLACEHOLDER
2020
restartPolicy: OnFailure
21+
nodeSelector:
22+
workload: graphrag-indexing
2123
containers:
2224
- name: graphrag
2325
image: PLACEHOLDER
2426
imagePullPolicy: Always
2527
resources:
2628
requests:
2729
cpu: "6"
28-
memory: "24Gi"
30+
memory: "56Gi"
2931
limits:
30-
cpu: "10"
31-
memory: "32Gi"
32+
cpu: "8"
33+
memory: "64Gi"
3234
envFrom:
3335
- configMapRef:
3436
name: graphrag
15.6 KB
Loading
-10.2 KB
Binary file not shown.

infra/core/aks/aks.bicep

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ param systemOsDiskSizeGB int = 128
2626

2727
@description('The number of nodes for the system node pool.')
2828
@minValue(1)
29-
@maxValue(50)
29+
@maxValue(20)
3030
param systemNodeCount int = 1
3131

3232
@description('The size of the system Virtual Machine.')
@@ -37,8 +37,11 @@ param systemVMSize string = 'standard_d4s_v5'
3737
@maxValue(50)
3838
param graphragNodeCount int = 1
3939

40-
@description('The size of the GraphRAG Virtual Machine.')
41-
param graphragVMSize string = 'standard_e16as_v5' // 16 vcpus, 128 GiB memory
40+
@description('The VM size of nodes running the GraphRAG API.')
41+
param graphragVMSize string = 'standard_d8s_v5' // 8 vcpu, 32 GB memory
42+
43+
@description('The VM size of nodes running GraphRAG indexing jobs.')
44+
param graphragIndexingVMSize string = 'standard_e8s_v5' // 8 vcpus, 64 GB memory
4245

4346
@description('User name for the Linux Virtual Machines.')
4447
param linuxAdminUsername string = 'azureuser'
@@ -161,6 +164,32 @@ resource aks 'Microsoft.ContainerService/managedClusters@2024-02-01' = {
161164
type: 'VirtualMachineScaleSets'
162165
}
163166
}
167+
168+
resource graphragIndexingNodePool 'agentPools@2024-02-01' = {
169+
name: 'indexing'
170+
properties: {
171+
enableAutoScaling: true
172+
upgradeSettings: {
173+
maxSurge: '50%'
174+
}
175+
minCount: 0
176+
maxCount: 10
177+
osDiskSizeGB: systemOsDiskSizeGB
178+
count: 0
179+
vmSize: graphragIndexingVMSize
180+
osType: 'Linux'
181+
mode: 'User'
182+
enableEncryptionAtHost: enableEncryptionAtHost
183+
vnetSubnetID: subnetId
184+
nodeLabels: {
185+
workload: 'graphrag-indexing'
186+
}
187+
tags: {
188+
workload: 'graphrag'
189+
}
190+
type: 'VirtualMachineScaleSets'
191+
}
192+
}
164193
}
165194

166195
resource aksManagedAutoUpgradeSchedule 'Microsoft.ContainerService/managedClusters/maintenanceConfigurations@2024-03-02-preview' = {

infra/main.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ module aks 'core/aks/aks.bicep' = {
186186
params:{
187187
clusterName: '${abbrs.containerServiceManagedClusters}${resourceBaseNameFinal}'
188188
location: location
189+
graphragVMSize: 'standard_d8s_v5' // 8 vcpu, 32 GB memory
190+
graphragIndexingVMSize: 'standard_e8s_v5' // 8 vcpus, 64 GB memory
189191
sshRSAPublicKey: aksSshRsaPublicKey
190192
logAnalyticsWorkspaceId: log.outputs.id
191193
subnetId: vnet.properties.subnets[1].id // aks subnet

0 commit comments

Comments
 (0)