Skip to content

Commit

Permalink
Use guest VM stats for peak memory reporting (#8175)
Browse files Browse the repository at this point in the history
Since switching to the host cgroup for memory usage reporting, we've
gotten a few user reports where the UI shows the VM's memory usage
exceeding the available memory. Switch back to guest stats for now.
  • Loading branch information
bduffany committed Jan 14, 2025
1 parent 131c069 commit 3172560
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2742,6 +2742,10 @@ func combineHostAndGuestStats(host, guest *repb.UsageStats) *repb.UsageStats {
// the host without introspection into the ext4 metadata blocks - just
// continue to get these from the guest for now.
stats.PeakFileSystemUsage = guest.GetPeakFileSystemUsage()
// Host memory usage stats might be confusing to the user, because the
// firecracker process might hold some extra memory that isn't visible to
// the guest. Use guest stats for memory usage too, for now.
stats.PeakMemoryBytes = guest.GetPeakMemoryBytes()
return stats
}

Expand Down

0 comments on commit 3172560

Please sign in to comment.