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

EPIC: Benchmarking 1/x #76

Closed
mavilein opened this issue Sep 26, 2019 · 8 comments
Closed

EPIC: Benchmarking 1/x #76

mavilein opened this issue Sep 26, 2019 · 8 comments
Assignees
Milestone

Comments

@mavilein
Copy link
Contributor

Description: We want to convert the benchmarking suite that we used for Prisma 1 to run against Prisma 2 to know where we are performance wise.

Spec:

  • Convert the existing benchmarking tooling to run against Prisma 2.
  • Explore whether we can store the results in a timescaledb
  • Explore whether Grafana is a good fit to visualize test results.
  • Make it convenient to profile applications locally, by e.g. integrating flamegraphs.
  • Create small reports on our findings, e.g.: Where are we worse and where are we better? Can we pinpoint the underlying issues?
  • Create an automated setup so that we can see the change of benchmarks over time. E.g. run them daily or on each commit or ...
@pimeys
Copy link
Contributor

pimeys commented Sep 26, 2019

Working on it.

  • The benchmarking tools work against prisma2.
  • Chose the schemaless and easier option with InfluxDB
  • Grafana is a beaut. Already running graphs with it.

Now for the upcoming days I plan to:

  • Test different scenarios against scala and rust versions
  • Try out different executors
  • Try to integrate metrics to the rust codebase so I'll see real time histograms and CPU/RAM usage
  • Write that report :)

@pimeys
Copy link
Contributor

pimeys commented Sep 26, 2019

Some performance tests:

  • Switch the global allocator from system to jemalloc, which works quite well for multi-threaded applications, but increases the binary size a bit (700kb) https://crates.io/crates/jemallocator
  • Switch from actix to tokio executor and see how it affects to the throughput

@pimeys
Copy link
Contributor

pimeys commented Sep 26, 2019

@pimeys
Copy link
Contributor

pimeys commented Sep 26, 2019

@mavilein mavilein added this to the Preview 14 milestone Sep 30, 2019
@pimeys
Copy link
Contributor

pimeys commented Oct 4, 2019

The results from the benchmarks and what could we do better:

https://www.notion.so/prismaio/Benchmarking-9cfa29eb09924f39a908184a49780673

@pimeys
Copy link
Contributor

pimeys commented Oct 7, 2019

New issues from this:

  • Test possible slog replacements, such as tracing. We might need to write our own json output module.
  • Automated benchmarks. We should instrument prisma server to measure every single request and have a prometheus/grafana setup for better timescale graphs.
  • Threaded connection pool with poll_fn/blocking, async/await all the way up.
  • Never ever start a transaction if not really needed.

Should we close the epic? @janpio @mavilein

@janpio janpio changed the title EPIC: Benchmarking EPIC: Benchmarking 1/x Oct 8, 2019
@janpio
Copy link
Contributor

janpio commented Oct 8, 2019

If all the work suggested here was done, this seems like a reasonable thing. But maybe @mavilein wants to add these follow up tasks.

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

No branches or pull requests

3 participants