nebari-dev / nebari-docs

📖 Documentation for Nebari
https://www.nebari.dev
BSD 3-Clause "New" or "Revised" License
14 stars 28 forks source link

[Exploration] Infrastructure Audit and Cost Estimates for Daily User Usage #380

Open viniciusdc opened 1 year ago

viniciusdc commented 1 year ago

This issue aims to track the work involved in conducting an infrastructure audit and generating cost estimates for daily user usage. The goal is to gain a comprehensive view of the costs associated with each resource, allowing for informed decisions about resource allocation and optimization. This work will be extended to other cloud providers to gain a comprehensive view of the costs associated with each resource on each provider.

Tasks

Additional Information

Feel free to adjust the wording and formatting to fit your specific needs.

viniciusdc commented 1 year ago

Ok, so far, here are my findings based on the following:

The assumptions so far:

User cost based on profile

Profile CPU Lim MEM Lim Instance type GPU type #GPU MEM Price (Gb) vCPU Price GPU Price Total
Small 2 8 n1-standard-4 0 $0.004237 $0.031611 $0.097118
Medium 4 16 n1-standard-4 0 $0.004237 $0.031611 $0.194236
Large 90 375 n2-standard-96 0 $0.004237 $0.031611 $4.433865
Single GPU 8 30 n1-standard-8 nvidia-tesla-k80 1 $0.004237 $0.031611 $0.450000 $0.829998
Multi GPU (x4) 8 30 n1-standard-8 nvidia-tesla-k80 4 $0.004237 $0.031611 $0.450000 $2.179998
Single A100 16 60 a2-highgpu-1g 1 $0.004237 $0.031611 $2.934000 $3.693996

General Infrastructure cost

Node Node cost Storage shared (NFS) Price (Gib) Storage shared cost
General (8/32 - n1-standard-8) $0.388472 500 (conda-store) $0.000274 $0.137000
Worker (4/16 - n1-standard-4) $0.194236 200 (jupyter) $0.000274 $0.054800

*Those storage costs are based on FileStore, the resource commonly used for NFS storage, and I am using the Standard one for the expenses.

Other volumes Allocation (GI) Total Price (all standard) Monthly
data-keycloak 8 $0.32
data-nebari-conda-store-postgresql 8 $0.32
hub-db-dir 1 $0.04
nebari-conda-store-minio 500 $20.00
nebari-conda-store-storage 500 $20.00
nfs-server-nfs-storage 200 $8.00
redis-data 8 $0.32
viniciusdc commented 1 year ago

User costs for one month:

Let's start by adding up the costs for each user profile, assuming usage of (1, 1, 6, 4, 4,1) hours, respectively, over four days a week in 1 month:

Adding up all the user costs gives us $682.056384 for the month.

Infrastructure costs

The General and Worker nodes will be used constantly, so we can calculate their monthly cost as follows:

Both nodes use the shared NFS storage as well as the persistent volumes and will incur a monthly cost of:

Finally, adding the user and infrastructure costs, we get $1.320,90 for the month.

dharhas commented 1 year ago

@viniciusdc please make this into a python function or a google spreadsheet

iameskild commented 10 months ago

This is a good source for a FAQ on the cost of running Nebari. Thanks @viniciusdc!