How to Reduce Snowflake Costs

Snowflake’s data warehouse is a cloud-based Data Warehouse platform. It allows you to store, manage, and analyze large amounts of data. As a fully managed solution, Snowflake enables businesses to focus on their core competencies. Meanwhile, it leaves the infrastructure challenges associated with managing big data to Snowflake’s team of experts. You can focus on leveraging data for your own use case rather than managing infrastructure with a costly engineering hire. After implementing Snowflake, you may want to consider how to reduce Snowflake costs.

Understanding How Snowflake Charges

It’s important to understand how Snowflake determines cost. This will help you to optimize for the right amount of compute power and resources.

Reduce Snowflake costs by understanding Snowflake's pricing model.
(Source: Snowflake Pricing Model)

The cost of your Snowflake database depends on three factors:

1: The type of instance you choose (Cloud Usage)

2: The amount of data stored in Snowflake at any given time (Storage)

3: The amount of compute power and memory needed for each query (Compute)

It can be easy to opt into a high-dollar plan that promises a lot. Of course, that adds needless expense to your operating budget. It doesn’t help your company to pay for more than you use. One of the biggest advantages of cloud data warehouse solutions like Snowflake is that you pay only for what you use. This guide will help you see various approaches you can take to reduce Snowflake costs.

Budgeting Choices

The best way to avoid a big bill is to create a budget and stick to it. Plan ahead. Estimate your data usage and the amount of compute power you need for frequent jobs that will be run against the Snowflake database. If you don’t know what those numbers are yet, then use some common sense when choosing an instance type:

-Small instances are ideal for development work or testing

-Medium instances can handle many users running queries simultaneously

-Large instances are best for high-performance queries

As mentioned above, there are three parts that go into how billing works for Snowflake usage: compute, storage, cloud usage. Let’s look at each of these more closely to see how you can start to reduce Snowflake costs on your own.

Compute: The amount of processing you are doing and how often processes are running on your data.

Cloud usage: This refers to any services that are not directly related to your data like Amazon S3, Redshift, etc.

Storage: This is related to the sheer volume of information you are storing in your warehouse. Ask yourself what is the size of disk space you will need to accommodate your data and the type of data you are storing.

What’s the Problem?

You want your business to run smoothly and you want access to the most up to date information for analytics and operation support, but you don’t want to pay for more than you need. 

Correctly implemented solutions really depend on what you’re doing and how often you need to run processes. Your best solution will likely take a multi-pronged approach. We’ll go over some of the most common solutions below. 

Approaches to Cost Cutting

First Steps

  • Review the Snowflake plans.  Many businesses are using Snowflake as a data warehouse and not taking advantage of the other features. Review your use of the database. Reduce costs by reducing the number of tables or columns in your database structures. Alternatively, remove unused fields or consolidating them into one larger field.
  • Look at the size of your warehouse or the number of instances you are running. Just as you can scale up horizontally or vertically, you can scale down in the same way. Which approach will suit your needs while saving you expense depends on how your data is stored and what kinds of processes you need to run. For example, if you have a large number of data files that need to be read into memory every time the database starts up, it may make sense to reduce the number of files or their size. 

Fine Tuning

  • Set Resource and Volume monitors in Snowflake by first going to the Snowflake console, clicking on Databases, then clicking on the database you want to set monitors on. Click ‘All Settings’ in the top right corner of your screen, then select ‘Resource & Volume Monitoring’. This can also be done manually by running the following query on your database:
    SELECT * FROM sys.dm_os_performance_counters WHERE counter_name = 'CPU Usage (Total)';
    SELECT * FROM sys.dm_os_performance_counters WHERE counter_name = 'Context Switches/sec'
  • Consider how often data processes need to run- This could depend on what kind of SLA you have in place already. What are the expectations of customers and other stakeholders about how often  customers will be able to access the data? If the SLA is set at one hour, then it may not be a good idea to have processes running every five minutes, for instance. Consider how much data you need to process, in terms of both volume and complexity. If you’re dealing with terabytes of data that requires complex processing, it may take longer than if you only have a few hundred gigabytes of less complex data.
  • Set up a sensible threshold for how long the warehouse is running. There is a setting that allows you to choose a time period warehouses will sit ready and running, before automatically being suspended. This can result in substantial savings and it’s basically a set it and forget it task. Done in the UI or programmatically, In the UI you have choices ranging from 5 to 30 minutes before auto suspension. If you set it up manually, you can set it for seconds (30 or 15 seconds, for instance) rather than choosing from the limited auto-suspension time choices in the UI’s drop down menu.
  • Optimize data loading. If you are pulling data from an AWS S3 bucket and want it presented in a certain order, you should set it up to sort on ingestion. This will cut out the need to add a sort by clause to your query.  You can also optimize using Merge Join if you’re using SQL Server Management Studio.
  • Look into observability tools so you can identify the most costly queries and processes. Some useful tools for observability are available directly in the Snowflake Marketplace

Enlisting Help to Reduce Snowflake Costs

When should you enlist the help of experts with reducing Snowflake costs for your organization? If you’re a large company with many tables and complex queries, you may need help. Especially if your data is growing rapidly, it’s better to have someone who knows what they’re doing manage this aspect of your business. 

-If you want someone to handle the day-to-day aspects of managing an enterprise database system, such as monitoring performance and optimizing queries, you should consider hiring someone. 

-When you need someone to help with migrations and upgrades, this is another reason to hire an expert or work with a consulting agency. 

-Companies just getting started with Snowflake and want to get up and running quickly, without the costly mistakes, you may want to consider using an expert.

Data Sleek can help your team understand how best to leverage Snowflake with their existing tools and processes.

Contact us today so we can make Snowflake cost saving measures into an effective financial lever at your company. 

Business Analytics with DBT: Self-Serve Data
Previous Post
Business Analytics with DBT: Self-Serve Data
How We Helped HyperWolf With Demand Forecasting
Next Post
How We Helped HyperWolf With Demand Forecasting