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

Added support for avro-util's fastserde. #85

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

FelixGV
Copy link
Contributor

@FelixGV FelixGV commented Jun 17, 2020

Added a "manual" optimization mode for Avro where object reuse is
exercised. The existing avro test cases are slightly refactored
but unchanged from the perspective of performance characteristics.

Fixed some of the SerFeatures characteristics for Avro.

Also tweaked the TestCaseRunner output format so that it looks a bit
more polished: added a time unit (ns) to all latency measures, made
each metric have its own line, limited latency to one digit (i.e.
100 pico granularity), added the test scenario (create, ser, deser)
next to the serde implementation name. Also added a p99 latency
metric.

@FelixGV FelixGV force-pushed the fast_avro_support branch from a4c4f7a to 2afdc87 Compare June 17, 2020 20:26
Copy link
Contributor Author

@FelixGV FelixGV left a comment

Choose a reason for hiding this comment

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

Left a few comments on the PR, to streamline the reviewer's work.

tpc/src/serializers/BenchmarkBase.java Outdated Show resolved Hide resolved
Comment on lines 56 to 67
System.err.println("-----------------------------------------------------------------------------");
System.err.println(serializer.getName());
System.err.println("min:" + measurementVals[0]);
System.err.println("1/4:"+measurementVals[count/4]);
System.err.println("1/2:"+measurementVals[count/2]);
System.err.println("3/4:"+measurementVals[count/4*3]);
System.err.println("max:"+measurementVals[count-1]);
System.err.println("average:"+ avg +"ns deviation:"+(avg-measurementVals[count/2])+"ns, total iteration:" + count * iterations);
System.err.println(testCaseName + ": " + serializer.getName());
System.err.println("min: " + printLatency(measurementVals[0]));
System.err.println(printNthPercentileLatency(count, 25));
System.err.println(printNthPercentileLatency(count, 50));
System.err.println(printNthPercentileLatency(count, 75));
System.err.println(printNthPercentileLatency(count, 99));
System.err.println("max: " + printLatency(measurementVals[count - 1]));
System.err.println("avg: " + printLatency(avg));
System.err.println("deviation: " + printLatency(avg-measurementVals[count/2]));
System.err.println("total iterations: " + count * iterations);
System.err.println("-----------------------------------------------------------------------------");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case anyone is wondering, the new output looks like this:

test-time 3333 iteration 2000
-----------------------------------------------------------------------------
Create: flatbuffers
min: 47.2 ns
p25: 50.1 ns
p50: 51.4 ns
p75: 55.8 ns
p99: 100.5 ns
max: 1640 ns
avg: 58.4 ns
deviation: 6.9 ns
total iterations: 56930000
-----------------------------------------------------------------------------
test-time 10000 iteration 2000
-----------------------------------------------------------------------------
Serialize: flatbuffers
min: 1430.5 ns
p25: 1548.7 ns
p50: 1595.8 ns
p75: 1655.8 ns
p99: 2228.5 ns
max: 3380.5 ns
avg: 1634.1 ns
deviation: 35.7 ns
total iterations: 6118000
-----------------------------------------------------------------------------
test-time 10000 iteration 2000
-----------------------------------------------------------------------------
Deserialize: flatbuffers
min: 923.9 ns
p25: 998.4 ns
p50: 1027.9 ns
p75: 1074 ns
p99: 1624.9 ns
max: 11662.7 ns
avg: 1067.2 ns
deviation: 38.1 ns
total iterations: 9358000
-----------------------------------------------------------------------------

This is a purely cosmetic change so I'm happy to drop it from the PR, if you think it's inappropriate. I am mostly interested in merging the enhanced Avro test coverage.

tpc/src/serializers/avro/AvroGeneric.java Show resolved Hide resolved
@FelixGV FelixGV force-pushed the fast_avro_support branch from 2afdc87 to 737f57d Compare June 17, 2020 21:28
Added a "manual" optimization mode for Avro where object reuse is
exercised. The existing avro test cases are slightly refactored
but unchanged from the perspective of performance characteristics.

Fixed some of the SerFeatures characteristics for Avro.

Also tweaked the TestCaseRunner output format so that it looks a bit
more polished: added a time unit (ns) to all latency measures, made
each metric have its own line, limited latency to one digit (i.e.
100 pico granularity), added the test scenario (create, ser, deser)
next to the serde implementation name. Finally, added a p99 latency
metric to the output.
@FelixGV FelixGV force-pushed the fast_avro_support branch from 737f57d to 806aa59 Compare June 17, 2020 21:29
@pascaldekloe
Copy link
Collaborator

Thank you Felix. 🙂 The optimisations and adjustments make sense.

@pascaldekloe pascaldekloe merged commit 734c0c1 into eishay:master Jun 17, 2020
@FelixGV
Copy link
Contributor Author

FelixGV commented Jun 18, 2020

Wow thanks, that was fast :D !

How does the results page update work? Do you have a given hardware that you run this on and update yourself? Or do you expect the community to submit a PR to update the results page?

@pascaldekloe
Copy link
Collaborator

You put in effort, and thank me for accepting the fruits. 😄 I hate how people get stuck on GitHub. The owner kindly allowed me to speed things up. So yes, more community work please. I've opened issue #82 because my hardware is too old. The results page is a public wiki.

@FelixGV
Copy link
Contributor Author

FelixGV commented Jun 18, 2020

Thanks, I add a comment on the other issue.

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