Skip to content

Increased disk and memory usage after in-place upgrade from Dgraph v24.1.2 to v25.3.8 #9805

Description

@gooohgb

Hi Dgraph team,
We observed a significant increase in disk and memory usage after performing an in-place upgrade of a Dgraph Alpha cluster from v24.1.2 to v25.3.8.
Environment
Previous version: v24.1.2
Upgraded version: v25.3.8
Upgrade type: in-place upgrade using the existing data directories
Cache configuration remained unchanged across versions:size-mb=96384
percentage=0,80,20
remove-on-update=false

Observed behavior

After the upgrade, the upgraded environment shows noticeably higher disk usage and memory usage compared with the same workload/configuration before upgrade.
From /debug/prometheus_metrics, we observed that on upgraded Alpha nodes:
dgraph_disk_used_bytes is significantly higher than expected.
badger_size_bytes_lsm and badger_size_bytes_vlog do not fully explain the total filesystem usage reported by dgraph_disk_used_bytes.
process_resident_memory_bytes / dgraph_memory_proc_bytes are also higher after upgrade.
badger_compaction_current_num_lsm and badger_write_pending_num_memtable were 0 in sampled metrics.
Example pattern from upgraded nodes:
badger_size_bytes_lsm ~99-112 GiB
badger_size_bytes_vlog ~2 GiB
dgraph_disk_used_bytes ~131-150 GiB
process_resident_memory ~188-191 GiB
For comparison, nodes still running v24.1.2 show disk usage much closer to badger_size_bytes_lsm + badger_size_bytes_vlog.
Question
Could there be any known issue or expected behavior in v25.3.8 when opening or continuing to operate on data directories created by v24.1.2, especially around Badger storage, compaction, temporary files, memory mapping, or filesystem usage accounting?
We would appreciate guidance on what additional metrics, logs, or directory-level checks would help determine whether this is expected after upgrade or indicates a leak/stale file accumulation issue.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions