clockworklabs / clockworklabs/SpacetimeDB

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT

Open
#174 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

possibly-stale
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Hi!

There are a lot of examples of different software, where PGO helps a lot with performance - you can check it here. E.g. in this list are a lot of databases like Redis, MongoDB, and PostgreSQL.

We need to check the PGO effects on SpacetimeDB, and if it works well - write a note in the SpacetimeDB documentation about PGO. I'd appreciate your providing an easy way to build SpacetimeDB with PGO. And experienced users will be able to do it on their own for their own usage scenarios. Another option is to optimize SpacetimeDB build with a generic-enough profile. Providing PGO-optimized binaries could be a trickier task (since it requires preparing a good-enough profile) but as an option would be great to see too. Also, you even could optimize distributed from the official sites binaries with PGO (if would be able to collect a generic-enough profile).

As an additional optimization, I suggest looking at LLVM BOLT. But from my experience, starting with PGO and then using BOLT would be better.

For the Rust projects, I recommend starting with cargo-pgo.

I understand that the project is still in the early development stages. So I think the issue is just an improvement idea for future developments.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or build entry points are named. Start by reviewing how SpacetimeDB's Rust build is currently performed, then evaluate cargo-pgo for representative workloads and consider LLVM BOLT afterward; done means reporting the PGO effect and documenting an easy build path if it is effective.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, documentation, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.