Skip to content

Commit

Permalink
server: add time series for disk and net IO stats
Browse files Browse the repository at this point in the history
Use new library `gopsutil` to gather IO stats from the host kernel and
save them as time series.

Caveat: these counters are for the entire host over its lifetime. As
such, the first value cockroach records may be very high, and if we plot
these charts as derivatives, the derivative from zero to the first
recorded data point will be much higher than subsequent derivatives,
making a plot where it's hard to see changes after that.

A future commit will gather per-process IO stats, but gopsutil only
provides that on Linux.

Release note (admin ui change): gather disk and network IO statistics and
save them as time series.
  • Loading branch information
Pete Vilter committed Jul 19, 2018
1 parent d08a3ec commit 837c6de
Show file tree
Hide file tree
Showing 3 changed files with 481 additions and 50 deletions.
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func NewServer(cfg Config, stopper *stop.Stopper) (*Server, error) {
s.recorder = status.NewMetricsRecorder(s.clock, s.nodeLiveness, s.rpcContext, s.gossip, st)
s.registry.AddMetricStruct(s.rpcContext.RemoteClocks.Metrics())

s.runtime = status.MakeRuntimeStatSampler(s.clock)
s.runtime = status.MakeRuntimeStatSampler(ctx, s.clock)
s.registry.AddMetricStruct(s.runtime)

s.node = NewNode(
Expand Down
Loading

0 comments on commit 837c6de

Please sign in to comment.