Skip to content

Commit

Permalink
Merge pull request #12064 from cfc4n/automated-cherry-pick-of-#11986-…
Browse files Browse the repository at this point in the history
…upstream-release-3.4

Automated cherry pick of #11986
  • Loading branch information
gyuho authored Jun 25, 2020
2 parents 1a12810 + ee96347 commit 45192cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion etcdserver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,13 @@ func init() {
}

func monitorFileDescriptor(lg *zap.Logger, done <-chan struct{}) {
ticker := time.NewTicker(5 * time.Second)

// This ticker will check File Descriptor Requirements ,and count all fds in used.
// And recorded some logs when in used >= limit/5*4. Just recorded message.
// If fds was more than 10K,It's low performance due to FDUsage() works.
// So need to increase it.
// See https://github.com/etcd-io/etcd/issues/11969 for more detail.
ticker := time.NewTicker(10 * time.Minute)
defer ticker.Stop()
for {
used, err := runtime.FDUsage()
Expand Down

0 comments on commit 45192cf

Please sign in to comment.