Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ethdb: Add paused write stat #15663

Closed

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Dec 13, 2017

Note: we need to wait this pr in goleveldb get merged and do the next :)

Implements #15347

@rjl493456442 rjl493456442 changed the title WIP: Add paused write stat ethdb: Add paused write stat Dec 15, 2017
@rjl493456442
Copy link
Member Author

@karalabe PTAL

@karalabe
Copy link
Member

Sweet :)

A few suggestions:

  • To truly make these measurements useful, it would be nice to actually print a warning message to the user whenever the delays exceed some threshold. Currently we just collect the measurements, but don't really act on it. A possible solution would be to define some tresholds and emit a warning if a collected stat is above that.
  • The stats gathering is only done if Geth is run with --metrics. That's fine as we don't want to gather all kinds of metrics all the time. However, if we want to warn the user about write delays, the write delay checking (not aggregation) should still run every now and again. A possible solution is to always run the meter() function, but skip most of it internally if we're not actually in metrics mode, only reacting to select tresholg exceeding events.

@rjl493456442
Copy link
Member Author

rjl493456442 commented Dec 19, 2017

Updated.

I run go-ethereum with fast sync mode at a clear state and dump write delay information to a file.
With the help of analysis script, i find the 90% write delay number is about 214.75933 and 90% write delay duration is about 350 milliseconds.

So i set the write delay number threshold at 200, and write delay duration threshold at 350 milliseconds. If the stats beyond the threshold, a warning log will been printed at user's console.

var OpenFileLimit = 64
const (
writeDelayNThreshold = 250
writeDelayThreshold = 500 * 1000 * 1000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use 500 * time.Millisecond here.

@rjl493456442
Copy link
Member Author

Superseded in #16499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants