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

Add some version-store microbenchmarks #6952

Merged
merged 2 commits into from Jun 5, 2023

Conversation

snazy
Copy link
Member

@snazy snazy commented Jun 1, 2023

This can serve as a tool to later optimize these parts in the Nessie code base:

  • version store implementation
  • database specific Persist implementations
  • storate logic implementations

So far, the results look good enough, no concerning outliers w/ in-memory, mongo + cassandra.

Microbenchmarks use BackendTestFactory to locate and initialize a Backend (and in turn Persist) implementation. Microbenchmarks are intended to inspect the Nessie code down up to the database level, but not intended to optimize configurations for a particular database. In other words: only the Nessie code is interesting, but the performance of the database itself is not (that much).

The BackendTestFactory interface got a new function getName() and the corresponding service definitions have been added.

@snazy snazy force-pushed the version-store-microbench branch 2 times, most recently from 15d4151 to 5fdd4b7 Compare June 3, 2023 10:21
This can serve as a tool to later optimize these parts in the Nessie code base:
* version store implementation
* database specific `Persist` implementations
* storate logic implementations

So far, the results look good enough, no concerning outliers w/ in-memory, mongo + cassandra.

Microbenchmarks use `BackendTestFactory` to locate and initialize a `Backend` (and in turn `Persist`) implementation. Microbenchmarks are intended to inspect the Nessie code down up to the database level, but not intended to optimize configurations for a particular database. In other words: only the Nessie code is interesting, but the performance of the database itself is not (that much).

The `BackendTestFactory` interface got a new function `getName()` and the corresponding service definitions have been added.

Needed to use a new Gradle project, because the microbenchmarks need the Java `ServiceLoader` for various reasons, so it the JMH uber-jar needs the _shadow_ plugin, but its presence would make `nessie-services.jar` an uber-jar as well - so it's easier to use a separate Gradle project.
@snazy snazy force-pushed the version-store-microbench branch from 5fdd4b7 to 4c649ce Compare June 3, 2023 11:37
@snazy snazy requested a review from adutra June 5, 2023 13:06
adutra
adutra previously approved these changes Jun 5, 2023

## Linux Perf tools

Install the appropriate `linux-tools` package for your distribution, or `make` it from the Linux sources in `tools/perf`
Copy link
Contributor

Choose a reason for hiding this comment

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

From what I could find, the linux-tools package is a Ubuntu thing. Maybe we could rephrase this paragraph and focus more on which commands need to be available, rather than which packages contain those commands.

Copy link
Member Author

Choose a reason for hiding this comment

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

Rephrased


Running (Linux):
```bash
LD_LIBRARY_PATH=(PATH-TO-LIBRARY)/ java \
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, the only command that worked for me on macOS was:

java -Djava.library.path=/path/to/async-profiler-2.9-macos/build/ -jar servers/services-bench/build/libs/nessie-services-bench-*-jmh.jar -prof async

Neither LD_LIBRARY_PATH nor DYLD_LIBRARY_PATH worked.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated README

@snazy snazy merged commit dcd08e6 into projectnessie:main Jun 5, 2023
20 of 21 checks passed
@snazy snazy deleted the version-store-microbench branch June 5, 2023 17:27
snazy added a commit to snazy/nessie that referenced this pull request Jun 5, 2023
snazy added a commit to snazy/nessie that referenced this pull request Jun 5, 2023
snazy added a commit that referenced this pull request Jun 5, 2023
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.

None yet

2 participants