Understanding Snowflake Costs

This is the first blog in the series of Snowflake cost optimization — https://poojakelgaonkar.medium.com/snowflake-cost-optimization-series-7aac34697608. This blog focuses more on understanding the various components of Snowflake that contribute to the total cost. You will learn more about the cost in terms of Q&A.

What is Snowflake's cost?

As you all know, Snowflake is built from scratch on the cloud. This is built to offer a scalable, performance-efficient, and maintainable data platform. The cost of the platform is nothing but the cost incurred in terms of credit consumption while you are using the platform. The cost to store the data, process data using warehouses, maintain metadata and cache at the cloud services layer, and use serverless services like Snowpipe, Materialized Views, and many other serverless services. You have to pay only for the services being used and the time they are up and running.

What are the components contribute to the Snowflake cost?

Snowflake’s architecture has 3 layers — Cloud Services, Query Processing, and Storage. The Snowflake cost also comprises of cost of these three layers as well as the cost of the serverless services. The overall cost of Snowflake is computed in terms of credits being used.

What are Credits?

You might have read the pricing of warehouses in terms of credits. Credits are nothing but the units used to calculate the measure of consumption. You must have seen the credits are based on the warehouse sizes, you can refer to warehouse sizes and credits per hour. Refer here — https://docs.snowflake.com/en/user-guide/warehouses-overview

How Credits are converted?

Snowflake credits are mapped to the equivalent $ value while converting the credits to the total billed amount. The credit to $ mapping is usually set at the account level and this information is also available in one of the Organizational USAGE views — RATE_SHEET_DAILY. All users don't have access to this view. ORGADMIN can grant access based on the need to see to the admins or finops teams.

How Snowflake cost is computed?

As mentioned earlier, Snowflake cost is the sum of compute cost, storage cost, cloud services cost, and serverless cost. If you have any processes that use transfer data then this also gets added in terms of egress. You can calculate the cost using USAGE views to capture the compute, storage, and CSL (cloud service layer) costs. You can also get the serverless billing details in corresponding views.

Are there any hidden charges or components to the overall cost?

Snowflake cost is as transparent as you see the consumption on a daily basis using USAGE views. There are no hidden parameters or components to the overall cost of your account. You pay as you use and as you see the consumption of the platform. You can also view the usage on snowsight if you have the required access or role setup.

How to monitor the overall cost?

Snowflake offers various types of controls that you can use to monitor, measure, and track the use of your compute, storage, and services on a daily basis. You can use resource monitors that can track the consumption of your warehouses and send alerts to you, take action to suspend the warehouse if it reaches the threshold defined.

How to control the cost?

Snowflake USAGE views and Resource monitors can be used to automate the monitoring of the costs, and consumption to track. You can review the daily credits, processes, and warehouses used, identify the underutilized, and over-utilized warehouses, review the sizes of the warehouses, and specify auto-suspend and resume to control warehouse costs. You will learn more about the cost controls in upcoming blogs.

How to calculate consumption? Provide a use case —

You will understand the cost with an example. You can consider below use case below and the features, and services consumed to calculate the overall cost.

Use Case —

Imagine a simple scenario where an organization loads data constantly, 24x7. It has two different groups of users (Finance and Sales) using the database in overlapping, but different times of the day. It also runs a weekly batch report. This organization:

  • Uses the Standard Edition of Snowflake.
  • Stores an average of 65 TBs of compressed data (compare with 325 TB without compression).
  • Loads data 24x7x365. They use a Small Standard virtual warehouse for this purpose.
  • Enables seven finance users to work 5 days a week from 8am until 5pm using a Large Standard virtual warehouse.
  • Enables twelve sales users in different geographies to work a total of 16 hours a day (across Europe and the Americas), 5 days a week using a Medium Standard virtual warehouse.
  • Runs a complex weekly report every Friday. This report takes approximately 2 hours to run on a 2X-Large standard warehouse.
  • Not using any serverless services currently
  • Cloud services cost is within 10% of the compute cost

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Data Loading Requirements

Loading Window : 24 x 7 x 365

Warehouse: Small Standard Virtual Warehouse (2 credits/hr)

Total compute credits : 1,488 credits (2 credits/hr x 24 hours per day x 31 days per month)

Storage Requirements

Data set size (per month) : 65 TB (after compression)

Compute Requirements for teams

Team : Finance

Total Users : 5 Users

Time used : 8am-5pm (9 hours)

Warehouse: Large Standard Virtual Warehouse (8 credits/hr)

Total credits : 1,440 credits (8 credits/hr x 9 hours per day x 20 days per month)

Team : Sales

Total Users :12 Users

Time Used: 16 hour time slot

Warehouse: Medium Standard Virtual Warehouse (4 credits/hr)

Total Credits: 1,280 (4 credits/hr x 16 hours per day x 20 days per month)

Team : BI — Complex Query Users

Total Users: 1 User

Time Consumed: 2 hours/day

Warehouse: 2X Standard Virtual Warehouse (32 credits/hr)

Total Credits: 256 (32 credits/hr x 2 hours per day x 4 days per month)

Total Cost = Compute Cost + Storage Cost

Compute Cost = 4,464 credits (@ $2/credit) (Sum of Teams credits)

Total $ Compute cost: $8928

Storage Cost = 65 TB (@ $23/TB)

Total $ storage cost : $1495

Total Cost: $8928 + $1495 = $10,423

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

What are the other cost components?

The above use case is the standard use case where serverless is not being used. Cloud services cost also less than 10% of total compute cost. You will learn about the additional components as well as each component contributing to the cost in the next blogs.

Please follow my blog series on Snowflake topics to understand various aspects of data design, engineering, data governance, cost optimizations etc.

About Me :

I am one of the Snowflake Data Superheroes 2023. I am also one of the Snowflake SnowPro Core SME- Certification Program. I am a DWBI and Cloud Architect! I am currently working as Senior Data Architect — GCP, Snowflake. I have been working with various Legacy data warehouses, Bigdata Implementations, and Cloud platforms/Migrations. I am SnowPro Core certified Data Architect as well as Google certified Google Professional Cloud Architect. You can reach out to me LinkedIn if you need any further help on certification, Data Solutions, and Implementations!

--

--