GPU-Accelerated DuckDB Analytics with the Sirius Extension
· 5 min read

Learn how to implement DuckDB GPU acceleration using the Sirius extension to reduce query times and compute costs for large-scale analytical datasets.
Achieve significant DuckDB GPU acceleration by integrating the Sirius core extension, a GPU-native SQL engine developed in collaboration between NVIDIA and DuckLabs. This integration allows users to execute complex analytical queries on NVIDIA GPUs while maintaining standard SQL syntax and existing database schemas, as detailed in the NVIDIA Technical Blog.

Introduction to Sirius: A GPU-Native SQL Engine
Sirius is an open-source, GPU-native SQL engine designed to handle large-scale analytical queries by leveraging the parallel processing power of NVIDIA hardware. Developed through a partnership between the University of Wisconsin–Madison and NVIDIA, it functions as a core extension for DuckDB.
The primary goal of Sirius is to provide a way to accelerate data analysis without forcing developers to rewrite their existing code or translate SQL into specialized GPU programming APIs. It targets scenarios where datasets grow so large that traditional CPU-based processing becomes a bottleneck for data exploration, production pipelines, and real-time applications.
By functioning as a core extension, Sirius allows DuckDB to remain the primary interface for the user. It handles the high-level logic, while Sirius takes over the execution of specific query plans on the GPU. This architecture ensures that the transition to GPU-accelerated workflows is seamless for those already familiar with the DuckDB ecosystem.
Integration of Sirius with DuckDB's Workflow
The integration of Sirius into the DuckDB workflow is designed to be non-disruptive. It maintains the standard DuckDB experience while injecting GPU acceleration where applicable.
Seamless SQL Experience
One of the primary benefits of the Sirius DuckDB extension is that it does not require changes to your database schema or the underlying SQL syntax. Users can write standard analytical queries, and the system determines how to execute them. If a query is supported by Sirius, it is executed on the GPU; if a feature is not supported, the system automatically falls back to DuckDB's standard CPU engine.
Simplified Installation
Activating the extension requires only two standard SQL commands within the DuckDB session:
INSTALL sirius;LOAD sirius;
When these commands are executed, the system automatically selects the CUDA backend based on the available NVIDIA driver. The installation process downloads the extension (approximately 700 MB), and the load command activates it for the current connection.
Unified Interface
Because Sirius functions as a core extension, the application interacts with the results through the standard DuckDB connection. This means that existing scripts, tools, and applications that already communicate with DuckDB can benefit from GPU acceleration without needing to be rewritten to communicate with a separate GPU API.
Performance Gains: Reducing Query Time and Compute Costs
The transition from CPU-based execution to GPU-accelerated execution with Sirius provides measurable improvements in both speed and operational efficiency. Testing was conducted using TPC-H queries on datasets ranging from 100 GB to 10 TB.
Speed Improvements
In benchmarks using tuned two-GPU configurations, Sirius delivered significant speedups over the best-tested CPU-based DuckDB configurations:
- At a scale factor of 1,000 (1 TB), query runtimes dropped from 347.3 seconds to 63.2 seconds.
- At a scale factor of 3,000 (3 TB), runtimes dropped from 752.4 seconds to 160.6 seconds, representing a 4.69x speedup.
- At the largest scale tested (10 TB), the tuned two-GPU configuration achieved a 3.25x speedup compared to the best CPU configuration.
Reduced Compute Costs
Beyond raw speed, the Sirius extension aims to lower the total cost of computation. At the 3 TB scale, query-time compute costs were reduced by approximately 71%. At the 10 TB scale, the cost reduction reached approximately 79%. These savings are particularly relevant for large-scale data processing where long execution times on CPUs lead to higher infrastructure costs.
Practical Implementation for Developers and ML Engineers
For developers and machine learning engineers, implementing Sirius involves a straightforward workflow. The process starts with environment preparation and moves into the DuckDB environment.
System Requirements
To begin, users must have:
- DuckDB version 2.0 or higher.
- An NVIDIA GPU with a compatible driver.
Setup Workflow
The implementation follows a three-step process:
- Data Preparation: Create a sample dataset using DuckDB’s TPC-H extension. This involves running
INSTALL tpch;,LOAD tpch;, andCALL dbgen(sf=0.01);. ACHECKPOINT;command ensures the data is persisted into native DuckDB tables. - Extension Activation: Run the
INSTALL sirius;andLOAD sirius;commands to activate the GPU-native engine. - Query Execution: Run standard SQL queries, such as those involving
GROUP BYandORDER BYclauses. These queries will execute on the GPU if they fall within the supported features of the Sirius extension.
For engineers managing heavy data workloads, this workflow allows for rapid prototyping of analytical queries that can later be scaled. If you are working on large-scale ML data preprocessing or require significant compute power for data-heavy tasks, you can utilize a server farm to run these workloads in a controlled environment with dedicated GPU resources.
Technical Considerations: Fallbacks and Configuration
While Sirius provides significant advantages, there are technical nuances regarding how it handles different query types and hardware configurations.
Automatic CPU Fallback
A key design choice in the Sirius extension is the fallback mechanism. Not every possible SQL operation is currently optimized for GPU execution. When a query contains features that are not supported by the Sirius engine, the system automatically routes those specific parts of the query to the standard DuckDB CPU engine. This ensures that the query will still complete successfully, even if it does not utilize the GPU for every component.
Scaling and Tuning
The performance of the system is highly dependent on the scale of the data and the configuration of the hardware.
- Small Scale (100 GB): At this scale, a single GPU may offer the lowest cost for execution.
- Large Scale (10 TB): At this scale, a tuned two-GPU configuration is necessary to outperform single-GPU setups in both runtime and cost.
- Configuration Importance: Testing showed that at the 10 TB scale, the default configuration with two GPUs failed to complete the workload. Only the tuned configuration was successful, highlighting the importance of proper configuration when dealing with massive datasets.
Scaling Analytics with RenderGlitch Cloud GPUs
When your datasets grow to the point where local hardware is insufficient, scaling your infrastructure becomes the priority. For engineers who need to run complex analytics or perform heavy data processing tasks, RenderGlitch provides a server farm designed for high-demand GPU tasks.
The farm allows you to run Python projects—including those involving PyTorch or TensorFlow—in GPU containers. This setup is ideal for the types of large-scale data processing tasks where DuckDB and Sirius provide the backend for analysis. Because the system supports sharding a job across multiple GPUs, it provides the infrastructure necessary to handle the 10 TB+ scale data scenarios where Sirius shows its greatest performance gains.
The infrastructure is available on a pay-per-use basis using RenderPoints, ensuring you only pay for the compute time you actually use. Additionally, all uploaded data and results are kept confidential under an automatic NDA.
To begin using these resources, you can create a free account to access the server farm for your next large-scale data project.
The integration of Sirius into DuckDB provides a practical path for utilizing GPU hardware to accelerate SQL-based analytics. By combining the seamless SQL interface of DuckDB with the GPU-native power of the Sirius extension, developers can significantly reduce query times and compute costs for large-scale datasets while maintaining a standard development workflow.
Frequently asked questions
What is the Sirius extension for DuckDB?
Sirius is a GPU-native SQL engine and core extension for DuckDB. It allows users to execute complex analytical queries on NVIDIA GPUs while maintaining standard SQL syntax and schemas.
Does Sirius require changing SQL code to use GPU acceleration?
No, Sirius does not require changes to database schemas or SQL syntax. If a query is supported by the extension, it runs on the GPU; otherwise, it falls back to the standard DuckDB CPU engine.
How do you install and load the Sirius extension in DuckDB?
You can activate the extension by running two commands: INSTALL sirius; and LOAD sirius; within your DuckDB session.
What are the hardware requirements for using Sirius with DuckDB?
Users must have DuckDB version 2.0 or higher and an NVIDIA GPU with a compatible driver.
Source: NVIDIA Technical Blog
English · Italiano · Français · Deutsch · Español · हिन्दी · العربية · Русский · Українська · 中文 · 日本語 · 한국어