MCPcopy
hub / github.com/parca-dev/parca

github.com/parca-dev/parca @v0.28.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.28.0 ↗
6,272 symbols 14,483 edges 457 files 835 documented · 13%
README

Apache 2 License Build Container parca Discord contributors

Parca: Continuous profiling for analysis of CPU, memory usage over time, and down to the line number.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Screenshot of Parca

Features

  • eBPF Profiler: A single profiler, using eBPF, automatically discovering targets from Kubernetes or systemd across the entire infrastructure with very low overhead. Supports C, C++, Rust, Go, and more!
  • Open Standards: Both producing pprof formatted profiles with the eBPF based profiler, and ingesting any pprof formatted profiles allowing for wide language adoption and interoperability with existing tooling.

  • Optimized Storage & Querying: Efficiently storing profiling data while retaining raw data and allowing slicing and dicing of data through a label-based search. Aggregate profiling data infrastructure wide, view single profiles in time or compare on any dimension.

Why?

  • Save Money: Many organizations have 20-30% of resources wasted with easily optimized code paths. The Parca Agent aims to lower the entry bar by requiring 0 instrumentation for the whole infrastructure. Deploy in your infrastructure and get started!
  • Improve Performance: Using profiling data collected over time, Parca can with confidence and statistical significance determine hot paths to optimize. Additionally, it can show differences between any label dimension, such as deploys, versions, and regions.
  • Understand Incidents: Profiling data provides unique insight and depth into what a process executed over time. Memory leaks, but also momentary spikes in CPU or I/O causing unexpected behavior, is traditionally difficult to troubleshoot are a breeze with continuous profiling.

Feedback & Support

If you have any feedback, please open a discussion in the GitHub Discussions of this project. We would love to learn what you think!

Installation & Documentation

Check Parca's website for updated and in-depth installation guides and documentation!

parca.dev

Development

You need to have Go, Node and Pnpm installed.

Clone the project

git clone https://github.com/parca-dev/parca.git

Go to the project directory

cd parca

Build the UI and compile the Go binaries

make build

Running the compiled Parca binary

The binary was compiled to bin/parca .

./bin/parca

Now Parca is running locally and its web UI is available on http://localhost:7070/.

By default, Parca is scraping it's own pprof endpoints and you should see profiles show up over time. The scrape configuration can be changed in the parca.yaml in the root of the repository.

Configuration

Flags:

Usage: parca [flags]

Flags:
  -h, --help                     Show context-sensitive help.
      --config-path="parca.yaml"
                                 Path to config file.
      --mode="all"               Scraper only runs a scraper that sends to a
                                 remote gRPC endpoint. All runs all components.
      --http-address=":7070"     Address to bind HTTP server to.
      --http-read-timeout=5s     Timeout duration for HTTP server to read
                                 request body.
      --http-write-timeout=1m    Timeout duration for HTTP server to write
                                 response body.
      --port=""                  (DEPRECATED) Use http-address instead.
      --log-level="info"         Log level.
      --log-format="logfmt"      Configure if structured logging as JSON or as
                                 logfmt
      --otlp-address=STRING      The endpoint to send OTLP traces to.
      --otlp-exporter="grpc"     The OTLP exporter to use.
      --otlp-insecure            If true, disables TLS for OTLP exporters (both
                                 gRPC and HTTP).
      --cors-allowed-origins=CORS-ALLOWED-ORIGINS,...
                                 Allowed CORS origins.
      --version                  Show application version.
      --path-prefix=""           Path prefix for the UI
      --mutex-profile-fraction=0
                                 Fraction of mutex profile samples to collect.
      --block-profile-rate=0     Sample rate for block profile.
      --enable-persistence       Turn on persistent storage for the metastore
                                 and profile storage.
      --storage-active-memory=536870912
                                 Amount of memory to use for active storage.
                                 Defaults to 512MB.
      --storage-path="data"      Path to storage directory.
      --storage-enable-wal       Enables write ahead log for profile storage.
      --storage-snapshot-trigger-size=134217728
                                 Number of bytes to trigger a snapshot. Defaults
                                 to 1/4 of active memory. This is only used if
                                 enable-wal is set.
      --storage-row-group-size=8192
                                 Number of rows in each row group during
                                 compaction and persistence. Setting to <= 0
                                 results in a single row group per file.
      --storage-index-on-disk    Whether to store the index on disk instead
                                 of in memory. Useful to reduce the memory
                                 footprint of the store.
      --symbolizer-demangle-mode="simple"
                                 Mode to demangle C++ symbols. Default mode
                                 is simplified: no parameters, no templates,
                                 no return type
      --symbolizer-external-addr-2-line-path=""
                                 Path to addr2line utility, to be used for
                                 symbolization instead of native implementation
      --symbolizer-number-of-tries=3
                                 Number of tries to attempt to symbolize an
                                 unsybolized location
      --debuginfo-cache-dir="/tmp"
                                 Path to directory where debuginfo is cached.
      --debuginfo-upload-max-size=1000000000
                                 Maximum size of debuginfo upload in bytes.
      --debuginfo-upload-max-duration=15m
                                 Maximum duration of debuginfo upload.
      --debuginfo-uploads-signed-url
                                 Whether to use signed URLs for debuginfo
                                 uploads.
      --debuginfod-upstream-servers=debuginfod.elfutils.org,...
                                 Upstream debuginfod servers. Defaults to
                                 debuginfod.elfutils.org. It is an ordered
                                 list of servers to try. Learn more at
                                 https://sourceware.org/elfutils/Debuginfod.html
      --debuginfod-http-request-timeout=5m
                                 Timeout duration for HTTP request to upstream
                                 debuginfod server. Defaults to 5m
      --profile-share-server="api.pprof.me:443"
                                 gRPC address to send share profile requests to.
      --store-address=STRING     gRPC address to send profiles and symbols to.
      --bearer-token=STRING      Bearer token to authenticate with store
                                 ($PARCA_BEARER_TOKEN).
      --bearer-token-file=STRING
                                 File to read bearer token from to authenticate
                                 with store.
      --insecure                 Send gRPC requests via plaintext instead of
                                 TLS.
      --insecure-skip-verify     Skip TLS certificate verification.
      --external-label=KEY=VALUE;...
                                 Label(s) to attach to all profiles in
                                 scraper-only mode.
      --grpc-headers=KEY=VALUE;...
                                 Additional gRPC headers to send with each
                                 request to the remote store (key=value pairs).

Credits

Parca was originally developed by Polar Signals. Read the announcement blog post: https://www.polarsignals.com/blog/posts/2021/10/08/introducing-parca-we-got-funded/

Contributing

Check out our Contributing Guide to get started! It explains how compile Parca, run it with Tilt as container in Kubernetes and send a Pull Request.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Frederic Branczyk Frederic Branczyk 💻 📖 🚇 Thor Thor 💻 📖 🚇 Matthias Loibl Matthias Loibl 💻 📖 🚇 Kemal Akkoyun Kemal Akkoyun 💻 📖 Sumera Priyadarsini Sumera Priyadarsini 💻 📖
Jéssica Lins Jéssica Lins 📖 Holger Freyther Holger Freyther 💻 Sergiusz Urbaniak Sergiusz Urbaniak 🚇 Paweł Krupa Paweł Krupa 🚇 Ben Ye Ben Ye 💻

Extension points exported contracts — how you extend this code

Releasable (Interface)
(no doc) [7 implementers]
pkg/query/columnquery.go
DebuginfodClients (Interface)
(no doc) [9 implementers]
pkg/debuginfo/debuginfod.go
Releasable (Interface)
(no doc) [7 implementers]
pkg/compactdictionary/compactdictionary.go
Probe (Interface)
Prober represents health and readiness status of given component. From Kubernetes documentation https://kubernetes.io/d [1 …
pkg/prober/prober.go
DebugInfoFile (Interface)
DebugInfoFile is the interface implemented by symbolizers that use DWARF debug info. [1 implementers]
pkg/symbol/elfutils/debuginfofile.go
SymbolizationClient (Interface)
SymbolizationClient is the interface for components that can symbolize locations. The concrete *Symbolizer type implemen [1 …
pkg/symbolizer/symbolizer.go
Client (Interface)
(no doc) [3 implementers]
pkg/signedrequests/client.go
IShareClient (Interface)
(no doc) [3 implementers]
ui/packages/shared/client/src/parca/share/share.client.ts

Core symbols most depended-on inside this repo

Errorf
called by 1415
pkg/badgerlogger/badgerlogger.go
string
called by 359
pkg/query/pprof.go
Release
called by 271
pkg/compactdictionary/compactdictionary.go
push
called by 188
pkg/query/flamegraph_arrow.go
Error
called by 139
pkg/parcacol/arrow.go
UnmarshalVT
called by 137
pkg/server/grpc_codec.go
Len
called by 97
pkg/query/flamegraph_arrow.go
useQueryState
called by 89
ui/packages/shared/profile/src/hooks/useQueryState.ts

Shape

Method 3,595
Function 1,300
Interface 497
Class 424
Struct 396
Enum 33
TypeAlias 23
FuncType 4

Languages

Go63%
TypeScript37%

Modules by API surface

gen/proto/go/parca/query/v1alpha1/query.pb.go576 symbols
gen/proto/go/parca/query/v1alpha1/query_vtproto.pb.go381 symbols
ui/packages/shared/client/src/parca/query/v1alpha1/query.ts353 symbols
ui/packages/shared/client/src/google/protobuf/descriptor.ts258 symbols
gen/proto/go/parca/metastore/v1alpha1/metastore.pb.go244 symbols
ui/packages/shared/client/src/parca/metastore/v1alpha1/metastore.ts213 symbols
gen/proto/go/parca/metastore/v1alpha1/metastore_vtproto.pb.go210 symbols
gen/proto/go/parca/debuginfo/v1alpha1/debuginfo.pb.go169 symbols
gen/proto/go/parca/profilestore/v1alpha1/profilestore_vtproto.pb.go127 symbols
gen/proto/go/parca/profilestore/v1alpha1/profilestore.pb.go116 symbols
gen/proto/go/parca/debuginfo/v1alpha1/debuginfo_vtproto.pb.go113 symbols
ui/packages/shared/client/src/parca/profilestore/v1alpha1/profilestore.ts105 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.25.1 · 1×
cloud.google.com/gov0.123.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/monitoringv1.24.3 · 1×
cloud.google.com/go/storagev1.61.3 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azcorev1.18.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azidentityv1.10.1 · 1×
github.com/Azure/azure-sdk-for-go/sdk/internalv1.11.1 · 1×
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5v5.7.0 · 1×

For agents

$ claude mcp add parca \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact