@@ -16,6 +16,10 @@ let ballistaExecutorBinary: s3assets.Asset
1616
1717// Ballista is built as a standalone project, separate from the main workspace
1818const BALLISTA_DIR = path . join ( ROOT , 'benchmarks/cdk/ballista' )
19+ const BALLISTA_TARGET_PARTITIONS = 96 // 12 c5n.2xlarge instances * 8 vCPUs
20+ const BALLISTA_EXECUTOR_MEMORY_POOL = '16GiB' // leave ~4 GiB for the OS and untracked allocations
21+ const BALLISTA_JOB_DATA_CLEAN_UP_INTERVAL_SECONDS = 300
22+ const BALLISTA_JOB_DATA_TTL_SECONDS = 3600
1923
2024export const BALLISTA_ENGINE : QueryEngine = {
2125 beforeEc2Machines ( ctx : BeforeEc2MachinesContext ) : void {
@@ -95,7 +99,10 @@ ExecStart=/usr/local/bin/ballista-executor \\
9599 --bind-port 50051 \\
96100 --work-dir /var/ballista/executor \\
97101 --scheduler-host localhost \\
98- --scheduler-port 50050
102+ --scheduler-port 50050 \\
103+ --memory-pool-size ${ BALLISTA_EXECUTOR_MEMORY_POOL } \\
104+ --job-data-clean-up-interval-seconds ${ BALLISTA_JOB_DATA_CLEAN_UP_INTERVAL_SECONDS } \\
105+ --job-data-ttl-seconds ${ BALLISTA_JOB_DATA_TTL_SECONDS }
99106Restart=on-failure
100107RestartSec=5
101108User=root
@@ -118,7 +125,9 @@ After=network.target ballista-scheduler.service
118125Requires=ballista-scheduler.service
119126[Service]
120127Type=simple
121- ExecStart=/usr/local/bin/ballista-http --bucket ${ ctx . bucketName }
128+ ExecStart=/usr/local/bin/ballista-http \\
129+ --bucket ${ ctx . bucketName } \\
130+ --target-partitions ${ BALLISTA_TARGET_PARTITIONS }
122131Restart=on-failure
123132RestartSec=5
124133User=root
@@ -159,11 +168,13 @@ BALLISTA_EOF`
159168
160169 // Reconfigure executors on worker nodes to point to scheduler. The executor in the machine holding the scheduler
161170 // communicates to it using localhost, so no need to update it with scheduler.instancePrivateIp.
162- sendCommandsUnconditionally (
171+ const updateExecutors = sendCommandsUnconditionally (
163172 ctx . scope ,
164173 "ConfigureBallistaExecutors" ,
165174 [ scheduler , ...executors ] ,
166175 [
176+ `aws s3 cp s3://${ ballistaExecutorBinary . s3BucketName } /${ ballistaExecutorBinary . s3ObjectKey } /usr/local/bin/ballista-executor` ,
177+ 'chmod +x /usr/local/bin/ballista-executor' ,
167178 `cat > /etc/systemd/system/ballista-executor.service << 'BALLISTA_EOF'
168179[Unit]
169180Description=Ballista Executor
@@ -175,7 +186,10 @@ ExecStart=/usr/local/bin/ballista-executor \\
175186 --bind-port 50051 \\
176187 --work-dir /var/ballista/executor \\
177188 --scheduler-host ${ scheduler . instancePrivateIp } \\
178- --scheduler-port 50050
189+ --scheduler-port 50050 \\
190+ --memory-pool-size ${ BALLISTA_EXECUTOR_MEMORY_POOL } \\
191+ --job-data-clean-up-interval-seconds ${ BALLISTA_JOB_DATA_CLEAN_UP_INTERVAL_SECONDS } \\
192+ --job-data-ttl-seconds ${ BALLISTA_JOB_DATA_TTL_SECONDS }
179193Restart=on-failure
180194RestartSec=5
181195User=root
@@ -187,8 +201,21 @@ StandardError=append:/var/ballista/logs/executor.log
187201WantedBy=multi-user.target
188202BALLISTA_EOF` ,
189203 'systemctl daemon-reload' ,
204+ 'systemctl enable --now ballista-executor' ,
190205 'systemctl restart ballista-executor' ,
191206 ]
192207 )
208+
209+ const updateHttp = sendCommandsUnconditionally (
210+ ctx . scope ,
211+ "UpdateBallistaHttp" ,
212+ [ scheduler ] ,
213+ [
214+ `aws s3 cp s3://${ ballistaServerBinary . s3BucketName } /${ ballistaServerBinary . s3ObjectKey } /usr/local/bin/ballista-http` ,
215+ 'chmod +x /usr/local/bin/ballista-http' ,
216+ 'systemctl restart ballista-http' ,
217+ ]
218+ )
219+ updateHttp . node . addDependency ( updateExecutors )
193220 }
194221}
0 commit comments