@@ -300,12 +300,36 @@ onboard, the autoscaling configuration should account for ongoing workspaces.
300
300
Scaling down workspace nodes to zero is not recommended, as it will result in
301
301
longer wait times for workspace provisioning by users.
302
302
303
- ### Database
303
+ ### External database
304
304
305
- TODO
305
+ While running in production, Coder deployment requires an access to an external
306
+ PostgreSQL database. Depending on the scale of the user-base, workspace
307
+ activity, and High Availability requirements, the amount of CPU and memory
308
+ resources may differ.
306
309
307
- PostgreSQL database
310
+ #### Scaling formula
311
+
312
+ When determining scaling requirements, take into account the following
313
+ considerations:
314
+
315
+ - ` 2 vCPU x 8 GB RAM x 512 GB storage ` : A baseline for database requirements for
316
+ Coder deployment with less than 1000 users, and low activity level (30% active
317
+ users). This capacity should be sufficient to support 100 external
318
+ provisioners.
319
+ - Allocate an additional CPU core to the database instance for every 1000 active
320
+ users.
321
+ - Enable _ High Availability_ mode for database engine for large scale
322
+ deployments.
323
+
324
+ With enabled database encryption feature in Coder, consider allocating an
325
+ additional CPU core to every ` coderd ` replica.
326
+
327
+ #### Performance optimization guidelines
308
328
309
- measure and document the impact of dbcrypt
329
+ We provide the following general recommendations for PostgreSQL settings:
310
330
311
- ###
331
+ - Increase number of vCPU if CPU utilization or database latency is high.
332
+ - Allocate extra GB memory if database performance is poor and CPU utilization
333
+ is low.
334
+ - Utilize faster disk options such as SSDs or NVMe drives for optimal
335
+ performance enhancement.
0 commit comments