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

[core] Make hdrhistogram default measurement type #371

Merged
merged 5 commits into from Sep 12, 2015
Merged

[core] Make hdrhistogram default measurement type #371

merged 5 commits into from Sep 12, 2015

Conversation

nitsanw
Copy link
Contributor

@nitsanw nitsanw commented Jul 27, 2015

This is first step to removing internal implementation which is made obsolete by HdrHistogram

@nitsanw
Copy link
Contributor Author

nitsanw commented Jul 27, 2015

The first commit and the test fixup are required for making hdrhistogram type default.
Further work is done here to cleanup some inconsistencies in reporting.
I would like to remove histogram and the double reporting measurement type and stick with time-series and hdr-histogram. I'm pretty sure TS is also redundant with the histogram file reporting.

@nitsanw
Copy link
Contributor Author

nitsanw commented Jul 27, 2015

also, generating many PRs for these changes would be pretty annoying, please let me know if above trajectory is sensible so I don't pollute good PRs with bad

@bigbes
Copy link
Collaborator

bigbes commented Jul 27, 2015

@nitsanw why TS are obsolete? I want to see if perfomance is degrading (increasing of latency) if DB is used for a long period of time. Can i do this with HDRHistogram?

@nitsanw
Copy link
Contributor Author

nitsanw commented Jul 27, 2015

@bigbes histograms can be persisted to log every X seconds (the status reporting interval). From the log file you can reconstruct the percentiles over any period in the benchmark. Histograms are additive and the persistence is lossless so the data is accurate down to the status reporting interval. I think this is more than what time series have on offer.

@bigbes
Copy link
Collaborator

bigbes commented Jul 27, 2015

@nitsanw I can't find anywhere, where i can do thing, that you've described. ("persisted to log every X seconds")
Also, i can't find any example what i should do with *.hdr files, that i get from 'hdrhistogram.fileoutput' property.

@nitsanw
Copy link
Contributor Author

nitsanw commented Jul 27, 2015

@bigbes To control the status printout interval you can use -s T where T is the number of seconds you want the interval to be.
For HdrHistogram documentations see: https://github.com/HdrHistogram/HdrHistogram
I wrote a post on usage: http://psy-lob-saw.blogspot.com/2015/02/hdrhistogram-better-latency-capture.html
See the compressed logging section at the end.

@bigbes
Copy link
Collaborator

bigbes commented Jul 27, 2015

@nitsanw about '-s' - it's human-readable option, it's not very "parse-friendly".
For exporting i've used JSONArrayMeasurementsExporter. Is it hard to add support of something like this for 'exporter' output?

@nitsanw
Copy link
Contributor Author

nitsanw commented Jul 27, 2015

@bigbes the -s interval is used for histogram logging, but these are separate concerns and could be done on different intervals with different options to control them.
The binary output for the histograms could be put into the exporter, but you'll have to unpack it again yourself where as the library has tools for handling it's own log format.

@nitsanw
Copy link
Contributor Author

nitsanw commented Aug 3, 2015

Hi, can you please let me know when someone will be free to look at this? feedback?

@busbey
Copy link
Collaborator

busbey commented Aug 3, 2015

We're still in the midst of getting the 0.3.0 release out the door in #358 (and it seems like most community members are overloaded at that). that should wrap up shortly which will increase the rest of our bandwidth. The easiest way for folks to get more reviewer time is helping on whatever blockers remain on that.

It's much easier to review these kinds of changes when the PR succinctly states what components get impacted and what, if any, compatibility issues are introduced. Also, it's easier when commit messages include the scope of what's impacted (a quick glance makes me think this is all [core]). While I realize PRs for the individual bits is less convenient, it also massively reduces the difficulty in reviewing. Especially since one of your commits changes a default behavior, which means it'll take more scrutiny. My apologies that #245 still is open, since it's what should cover these factors.

The big unknown I see unanswered from @bigbes is documented instructions on how folks will use hdrhistogram to generate timeseries. but again at a quick glance I think this set of commits doesn't actually remove the old timeseries, so a clear statement on if this set of patches changes that would help. The larger concern is the compatibility impact on our exporter formats, since those are what should be used for follow-on analysis.

My next solid block of review time is tomorrow in the early CDT morning. This particular change set will be hard to do then as it currently stands, since it requires checking things that are not well covered by our test sets (exporter formats) and that block of time happens to be phone-based-reviews.

@nitsanw nitsanw changed the title make hdrhistogram default measurement type [core] Make hdrhistogram default measurement type Aug 4, 2015
@nitsanw
Copy link
Contributor Author

nitsanw commented Aug 4, 2015

@busbey Thanks for your reply. I was hoping to get an ETA.
From your comments I understand you recommend the following steps:

  1. Declare component effected in PR title (fixed)
  2. Declare compatibility issues: this PR changes the default reporting measurement type. As such it will potentially break compatibility for scripts/tools which rely on the default setting.
  3. Clarify contents( @bigbes ): This PR does NOT remove other measurement types. I have opened a separate ticket to cover that follow-on change Remove histogram/time-series measurements as they are made obsolete by hdrhistogram #375. If that change is approved I will invest the time in supporting any previous formats/functionality to minimize transition pain, including the exporters (it would be handy to have an idea of how people use them etc).

I understand the limited time you have to spend on maintaining this repo, and appreciate your efforts. The downside for me is that making dependant changes in different PRs adds unnessary overhead, while waiting for one PR to be accepted before moving on to the next breaks my flow. I'll try and work out a workflow that supports both of us(recommendations welcome, I'm not much of a git ninja).

@busbey
Copy link
Collaborator

busbey commented Aug 9, 2015

FYI, I'm trying to wrap up #98 this week and then this issue will become the next focus for reviews that require a console.

@nitsanw
Copy link
Contributor Author

nitsanw commented Aug 21, 2015

Hi,
Would splitting this into several PRs help?
Thanks

@busbey
Copy link
Collaborator

busbey commented Aug 21, 2015

generally speaking, smaller targeted PRs are much easier for reviewers to get through.

In the specific case of this PR, IIRC we're just waiting on someone to go through making export files and getting enough of an understanding that we can explain the impact of this change to downstream users.

Unfortunately, I've been buried under licensing blockers over on the HBase project. @bigbes or @gkamat , could one of you take care of this issue?

@busbey busbey merged commit 5adc3dd into brianfrankcooper:master Sep 12, 2015
busbey added a commit that referenced this pull request Sep 12, 2015
- *incompatible* Default measurement changed from histogram to hdrhistogram
  Users who want previous behavior can set the 'measurementtype' property to 'histogram'

- *incompatible* Reported 95th and 99th percentile latencies now in microseconds (previously in milliseconds)

Conflicts:
	core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java

closes #371
@busbey
Copy link
Collaborator

busbey commented Sep 12, 2015

Merged into master. Sorry again for the delay @nitsanw. Please let me know if you think the summary I made on the merge commit is accurate.

@nitsanw
Copy link
Contributor Author

nitsanw commented Sep 15, 2015

Thanks, looking good

@allanbank allanbank mentioned this pull request Sep 17, 2015
@Thomas-Yang
Copy link

Hey @nitsanw, could you explain more specifically on how to measure the latency in time series with HDRHistogram? Let's say I would like to measure the avg and 99th latency every 10 ms. I am also interested in using HDRHistogram to match up the latency information from YCSB with the system activities (such as JVM GC) so that I can reason about the latency variation. If necessary, scale out to massive nodes (also see #415 ).

@nitsanw
Copy link
Contributor Author

nitsanw commented Sep 30, 2015

@Thomas-Yang Currently the histogram file is written out on the status interval. I think the lowest interval for writing out the file is once per second. It is unusual to require a histogram (which is a summary) for such a 10ms time window, how many samples would you expect in that period? it might be easier to log out all the latencies and summarize them in a post processing step.

jaricftw pushed a commit to jaricftw/YCSB that referenced this pull request Jul 19, 2016
…/master'

- *incompatible* Default measurement changed from histogram to hdrhistogram
  Users who want previous behavior can set the 'measurementtype' property to 'histogram'

- *incompatible* Reported 95th and 99th percentile latencies now in microseconds (previously in milliseconds)

Conflicts:
	core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java

closes brianfrankcooper#371
jaricftw pushed a commit to jaricftw/YCSB that referenced this pull request Jul 19, 2016
…/master'

- *incompatible* Default measurement changed from histogram to hdrhistogram
  Users who want previous behavior can set the 'measurementtype' property to 'histogram'

- *incompatible* Reported 95th and 99th percentile latencies now in microseconds (previously in milliseconds)

Conflicts:
	core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHdrHistogram.java

closes brianfrankcooper#371
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.

4 participants