GPU-Accelerated DuckDB: Sirius Extension Arrives

GPU-accelerated DuckDB running a SQL query with the Sirius extension

GPU-accelerated DuckDB is now a two-line install. NVIDIA and DuckLabs have released Sirius as a DuckDB core extension, so analysts can send supported analytical queries to NVIDIA GPUs and keep their SQL and schemas as they are.

What Sirius does

Sirius is a GPU-native, open-source SQL engine created by the University of Wisconsin-Madison with NVIDIA. It speeds up supported queries end to end. DuckDB still parses and optimizes the SQL, and Sirius runs the resulting query plan on the GPU, returning results through the same connection.

That keeps existing scripts and applications working. Queries that use unsupported features fall back automatically to DuckDB’s CPU engine.

DuckDB parses and plans a SQL query, then routes supported queries to Sirius GPU execution and unsupported queries to DuckDB CPU execution. Both paths return results.
Image: NVIDIA Technical Blog

Running a first query

The requirements are DuckDB 2.0 and an NVIDIA GPU whose driver is compatible. Setup is a few statements:

  • Open a file-backed database, such as duckdb getting_started.duckdb.
  • Load TPC-H’s data generator at scale factor 0.01, then run CHECKPOINT.
  • Execute the install and load statements for sirius to fetch and switch on the extension.

The CHECKPOINT step persists the data so Sirius can read native DuckDB tables. The Sirius download is about 700 MB, and the extension picks the CUDA backend that matches your driver. After that, an ordinary GROUP BY over the lineitem table, summing quantity by return flag, runs on the GPU with the same syntax. The sample dataset is tiny, so it shows the workflow, not a speedup.

Four scatter plots compare total query runtime and query-time compute cost for DuckDB CPU and one- and two-GPU Sirius configurations at SF100, SF1K, SF3K, and SF10K. Open symbols show default settings, filled symbols show tuned settings, and the default SF10K runs did not finish.
Image: NVIDIA Technical Blog

Benchmark results

The authors pitted Sirius against DuckDB on CPUs, running TPC-H-derived queries cold with data held in Amazon S3. Datasets ranged from 100 GB (scale factor 100) up to 10 TB (scale factor 10,000), with 1 TB and 3 TB in between. Both default and tuned settings were measured for total runtime and compute cost, on pinned development builds. Sirius timings leave out result fetch and export, while DuckDB timings include CSV output. Cost figures cover measured instance runtime only, not startup, validation, storage, S3 or idle time.

With tuned settings, Sirius on AWS instances with two NVIDIA GPUs was 3.25 to 5.50 times faster than the best tested CPU configurations.

  • At SF1K the run shrank from 347.3 to 63.2 seconds.
  • At SF3K it went from 752.4 to 160.6 seconds, a 4.69x speedup, and compute cost per query fell about 71%.
  • At SF10K, the tuned two-GPU setup finished in 729.9 seconds against 2,369.4 seconds for the best CPU setup. That is a 3.25x speedup and about 79% lower compute cost.

Picking a configuration

The best setup depends on data size. At SF100 a single GPU cost least, and two GPUs finished fastest. At SF10K the tuned dual-GPU setup beat the tuned single-GPU one on both counts.

Tuning mattered a great deal there: the untuned two-GPU run at SF10K is recorded as “did not finish,” while the tuned run took 729.9 seconds. Expect different numbers with other queries, data sizes, hardware or caches.

Who benefits first

Teams most likely to notice a difference are those whose analytical queries already take long enough to slow data exploration or pipelines. Shorter runtimes keep those tasks responsive, and the cost figures suggest they can also lower compute bills at large scale. At small sizes the gap is less clear, which is why the authors say the sample dataset isn’t meant to show a performance advantage.

Because DuckDB stays the interface, there’s no separate GPU programming API to learn. Developers keep writing SQL, and the extension decides what it can run on the GPU. Parquet workflows are supported too, so existing files can be tested without a migration.

The release also gives teams a fixed way to measure it. The benchmark runner in the repository lets people repeat the TPC-H-derived tests on their own hardware before changing anything in production.

Where to go from here

The Sirius repository publishes the benchmark runner, query definitions, configuration notes and setup steps, which lets teams inspect the tests and time their own hardware. The sensible next step is to try it on a real Parquet workflow or DuckDB table, compare against the CPU engine, and share results with the Sirius community.

Source: NVIDIA Technical Blog

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.