Skip to content

Commit

Permalink
Merge pull request #11986 from cfc4n/fdusage-limit
Browse files Browse the repository at this point in the history
etcdserver:set FDUsage ticker to 10 minute from 5 seconds.
  • Loading branch information
gyuho authored Jun 16, 2020
2 parents af7128c + 144beba commit 8720f98
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 8720f98

Please sign in to comment.