containerd/containerd
Defaults
Compile-time defaults live in the defaults/ package. They're per-OS so the daemon picks platform-appropriate values when no config is supplied.
Default paths and addresses
The values used at the time of this wiki (subject to platform):
| Constant | Linux | Windows | Source |
|---|---|---|---|
DefaultRootDir |
/var/lib/containerd |
C:\ProgramData\containerd\root |
defaults/defaults.go |
DefaultStateDir |
/run/containerd |
C:\ProgramData\containerd\state |
defaults/defaults.go |
DefaultAddress |
/run/containerd/containerd.sock |
\\\\.\\pipe\\containerd-containerd |
defaults/defaults.go |
DefaultDebugAddress |
/run/containerd/debug.sock |
\\\\.\\pipe\\containerd-debug |
defaults/defaults.go |
DefaultFIFODir |
/run/containerd/fifo |
n/a | defaults/defaults.go |
DefaultRuntime |
io.containerd.runc.v2 |
io.containerd.runhcs.v1 |
defaults/defaults.go |
DefaultConfigDir |
/etc/containerd |
C:\ProgramData\containerd |
defaults/defaults.go |
DefaultConfigFile |
/etc/containerd/config.toml |
C:\ProgramData\containerd\config.toml |
defaults/defaults.go |
gRPC message size limits
const (
DefaultMaxRecvMsgSize = 16 << 20 // 16 MiB
DefaultMaxSendMsgSize = 16 << 20
)These match Docker's defaults and are large enough for OCI manifests but small enough to bound resource usage. Configurable via [grpc] max_recv_message_size = ....
Default runtimes
Each platform's CRI default runtime:
- Linux:
io.containerd.runc.v2 - Windows:
io.containerd.runhcs.v1
The CRI plugin uses defaults.DefaultRuntime if the operator didn't specify a default_runtime_name.
Default snapshotter
- Linux:
overlayfs - Windows:
windows
Set in CRI config via snapshotter. The Go client falls back to the daemon's containerd.WithImageHandler defaults — see client/client.go.
Default GC scheduler thresholds
From plugins/gc/scheduler.go:
| Field | Default | Effect |
|---|---|---|
pause_threshold |
0.02 |
GC won't run if it would consume more than 2% of CPU |
deletion_threshold |
0 |
Trigger GC after this many deletes (0 = no auto-trigger) |
mutation_threshold |
100 |
Trigger GC after this many mutations |
schedule_delay |
0s |
Delay between scheduled GC runs |
start_delay |
100ms |
Delay before first GC after daemon start |
Where to override
Most defaults can be set via config.toml. Values that aren't surfaced in config are compile-time only — change defaults/ and rebuild.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.