Skip to content

Commit 3172560

Browse files
committed
Use guest VM stats for peak memory reporting (#8175)
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.
1 parent 131c069 commit 3172560

File tree

1 file changed

+4
-0
lines changed
  • enterprise/server/remote_execution/containers/firecracker

1 file changed

+4
-0
lines changed

enterprise/server/remote_execution/containers/firecracker/firecracker.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,6 +2742,10 @@ func combineHostAndGuestStats(host, guest *repb.UsageStats) *repb.UsageStats {
27422742
// the host without introspection into the ext4 metadata blocks - just
27432743
// continue to get these from the guest for now.
27442744
stats.PeakFileSystemUsage = guest.GetPeakFileSystemUsage()
2745+
// Host memory usage stats might be confusing to the user, because the
2746+
// firecracker process might hold some extra memory that isn't visible to
2747+
// the guest. Use guest stats for memory usage too, for now.
2748+
stats.PeakMemoryBytes = guest.GetPeakMemoryBytes()
27452749
return stats
27462750
}
27472751

0 commit comments

Comments
 (0)