Skip to content
AI NEWS JOURNAL
NVIDIA DeveloperAI NEWS / JOURNAL

Get Started with GPU-Accelerated DuckDB Analytics Using the Sirius Core Extension

As datasets grow, analytical queries can take longer to run, slowing down data exploration, pipelines, and applications. For developers using DuckDB, reducing...

Learn how to install Sirius, run supported DuckDB SQL queries on NVIDIA GPUs, and compare analytical query performance and compute costs. AI-Generated Summary Sirius is a GPU-native SQL engine released as a DuckDB core extension through collaboration between NVIDIA and DuckLabs. Two SQL commands, INSTALL sirius and LOAD sirius, enable GPU acceleration for supported analytical queries without rewriting SQL or changing schemas. DuckDB handles parsing and optimization while Sirius executes supported query plans on NVIDIA GPUs, with unsupported features falling back to the CPU engine. Benchmark tests using TPC-H queries at scale factors up to 10 TB showed 3.25x to 5.50x speedups and up to 79% lower query-time compute cost with tuned two-GPU configurations. Next Steps Install the Sirius core extension to begin accelerating analytical queries. Explore examples in the Sirius GitHub repository for additional guidance. Join the Sirius Slack community to share results and feedback. As datasets grow, analytical queries can take longer to run, slowing down data exploration, pipelines, and applications. For developers using DuckDB, reducing query times helps keep analytics responsive and can lower compute costs. NVIDIA and DuckLabs collaborated to release Sirius as a DuckDB core extension, bringing GPU acceleration to DuckDB’s analytical query engine. With two SQL commands, you can install and load Sirius to accelerate supported analytical queries on NVIDIA GPUs without rewriting your SQL or changing database schemas. Sirius, developed through a collaboration between the University of Wisconsin–Madison and NVIDIA, is an open-source, GPU-native SQL engine. This post introduces the core extension, shows you how to run your first GPU query, and explains how Sirius integrates with DuckDB. Accelerate DuckDB queries without rewriting SQL Sirius accelerates supported queries as a whole. DuckDB handles SQL parsing and optimization, while Sirius executes the resulting query plans on the GPU. The core extension brings this capability into DuckDB’s standard workflow: install Sirius, load it, and run your queries. With this release, you can: Install directly from DuckDB. Use INSTALL sirius; and LOAD sirius; to download and activate the extension. Retain familiar SQL. Execute supported analytical queries on NVIDIA GPUs without translating them into a separate GPU programming API. Use CPU fallback. Queries with unsupported features fall back to DuckDB’s CPU engine. Start with a small example, then apply the same workflow to your own analytical queries. Run your first GPU query You’ll need DuckDB 2.0 and an NVIDIA GPU with a compatible driver. Create a sample dataset Open DuckDB with a file-backed database. duckdb getting_started.duckdb Use DuckDB’s TPC-H extension to generate a small analytical dataset for this example. INSTALL tpch; LOAD tpch; CALL dbgen(sf=0.01); CHECKPOINT; The TPC-H extension creates the example tables, including lineitem, which contains order line items. It supplies sample data for this walkthrough and is separate from the Sirius extension. The CHECKPOINT statement persists the generated data so Sirius can read the native DuckDB tables. Install and load Sirius In the same DuckDB session, install and load Sirius. -- Sirius is approximately 700 MB; download time depends on your connection. INSTALL sirius; LOAD sirius; The core extension automatically selects the CUDA backend for your driver. INSTALL downloads the extension, and LOAD activates it in the current connection. Run an analytical query With Sirius loaded, run the following SQL query. SELECT l_returnflag, SUM(l_quantity) AS total_quantity FROM lineitem GROUP BY l_returnflag ORDER BY l_returnflag; This query groups line items by return flag and calculates the total quantity for each group. Supported queries execute on the GPU while retaining the same SQL syntax used with DuckDB. The query returns: l_returnflag total_quantity A 380456.00 N 774222.00 R 381449.00 You now have a complete workflow: create data, load the extension, and execute an analytical query. The small dataset keeps setup quick and illustrates how to use Sirius; it is not intended to demonstrate a performance advantage. Use the same approach with your own DuckDB tables or supported Parquet workflows. Queries with unsupported features automatically fall back to DuckDB’s CPU engine. Understand how Sirius executes queries Sirius integrates GPU execution into DuckDB’s query-processing workflow. DuckDB remains the application’s SQL interface and handles query parsing and optimization. Sirius executes supported queries on the GPU and returns results through the same connection. This integration lets developers continue expressing analytical operations in SQL while using GPU parallelism for supported workloads. The application receives query results through DuckDB, preserving the interface used by existing scripts and applications. Compare Sirius GPU and DuckDB CPU benchmark results We evaluated Sirius against CPU-based DuckDB using cold runs of queries derived from the TPC-H benchmark, with data stored in Amazon S3. Tests covered scale factors 100 (100 GB), 1,000 (1 TB), 3,000 (3 TB), and 10,000 (10 TB), measuring total query runtime and query-time compute cost under default and tuned settings. These tests used pinned development builds. Sirius timings exclude result fetch/export, while DuckDB timings include CSV output. Query-time compute costs cover measured instance runtime and exclude startup, validation, storage, S3, and idle time. With tuned settings, Sirius running on AWS instances with two NVIDIA GPUs delivered 3.25x to 5.50x speedups over the best tested CPU-based DuckDB configurations. At SF1K, total query runtime fell from 347.3 seconds to 63.2 seconds. At SF3K, runtime dropped from 752.4 seconds to 160.6 seconds, delivering a 4.69x speedup. Query-time compute cost at SF3K also decreased by approximately 71%. The largest cost advantage appeared at SF10K. The tuned two-GPU configuration completed the workload in 729.9 seconds compared with 2,369.4 seconds for the best tested CPU-based DuckDB configuration. This represents a 3.25x speedup and approximately 79% lower query-time compute cost. The results also show how workload size affects configuration choices. At SF100, one GPU offered the lowest cost, while two GPUs delivered the shortest runtime. At SF10K, the tuned two-GPU configuration outperformed the tuned single-GPU configuration in both runtime and cost. Tuning was particularly important at this scale: at SF10K, the default configuration with two GPUs was marked “did not finish,” while the tuned configuration completed the workload in 729.9 seconds. The Sirius repository provides a benchmark runner, query definitions, configuration details, and setup instructions for reviewing the test setup and evaluating performance on your own hardware. Results will vary with query structure, dataset size, hardware, and cache conditions. Get started with Sirius The Sirius core extension brings GPU-accelerated analytics into DuckDB’s familiar SQL workflow. Install the extension, run the example, and explore how GPU execution applies to your data. Install the Sirius core extension. Explore examples in the Sirius GitHub repository. Read the DuckDB release announcement. Read about Sirius performance on ClickBench. Join the Sirius Slack community. As your data grows, use Sirius to accelerate supported queries while keeping your SQL, tools, and workflow in DuckDB. Share your results and feedback with the Sirius community. About the Authors Comments

Sources

Read original ↗

Related topics

← Continue to all updates