Repository navigation
perf: add configurable benchmarks - #681
kamenkremen wants to merge 2 commits into
Conversation
| end | ||
| -- Tarantool 2.11's popen:wait() ignores timeout options. | ||
| -- Give all children one grace period; close() kills those still alive. | ||
| local deadline = clock.monotonic() + 3 |
There was a problem hiding this comment.
Tarantool only waits 3 seconds for on_shutdown callbacks by default, so this 3-second grace period can use up the whole budget. I reproduced this with SIGTERM: the callback timed out before saving Interrupted, leaving Connection closed in the report. Could we set box.ctl.set_on_shutdown_timeout(10) before registering the callback? That fixed the repro for me.
| types: [opened, reopened, synchronize, labeled] | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 1 * * *' |
There was a problem hiding this comment.
Comment please, not everyone can parse the cron syntax that easy
| with: | ||
| path: /home/runner/tnt-release | ||
| key: cache-tnt-${{ inputs.tarantool_version }}${{ env.VERSION_POSTFIX }} | ||
| key: cache-tnt-${{ runner.environment }}-${{ inputs.tarantool_version }}${{ env.VERSION_POSTFIX }} |
There was a problem hiding this comment.
This change is not related to perf test, let's put it in separate commit: we're trying to distinguish github-hosted from self-hosted
| tarantool perf/export.lua \ | ||
| --input-dir perf/output/ci \ | ||
| --output perf/output/summary.txt | ||
| - name: Send results to InfluxDB |
There was a problem hiding this comment.
I didn't manage to find the dashboard on grafana, let's add the link to PR description
| @@ -0,0 +1,128 @@ | |||
| name: performance | |||
There was a problem hiding this comment.
This workflow is great, but I don't think it's enough, since we won't be able to see the perf degradation compared to master: it runs after merge or with performance tag in PR, which won't be used that often. So, we'll notice, that perf degraded only after merging to master, not good.
Can we also introduce the workflow, which will run on github runners: take master, run several times, take the mean, take branch, run several times, take the mean, compare them, if master has at least 5% more rps than branch, fail the workflow, again: router overload + storage overload.
| local util = require('perf.lib.util') | ||
|
|
||
| local help = [[ | ||
| Usage: tarantool perf/run.lua [options] |
There was a problem hiding this comment.
Unfortunately, the desktop computers (or github runners) are not as stable as perfomance machine. So, please, let's introduce the option to run it several times and get the mean perf after that
There was a problem hiding this comment.
Let's avoid introducing newly generated tools, when we already have well-written and tested one in tarantool. In this case we can take the aggregate.lua from there. It'll also force us to have the similar output layout to tarantool
And let's also put it inside tools dir. And let's try to be as consistent with tarantool's perf testing as possible, in CI too
| name: performance-${{ matrix.scenario }} | ||
| retention-days: 21 | ||
| path: perf/output/ | ||
| if-no-files-found: ignore |
There was a problem hiding this comment.
Here're the differences with tarantool's CI, which I don't really like:
| Host preparation | Runs setup_env.sh: checks isolation/SMT and adjusts CPU frequency, turbo, ASLR, and huge-page settings | No equivalent preparation step |
| CPU placement | Fixed CPU mask for CPUs 1–24, with chrt 50 | Reads isolated CPUs from sysfs, with chrt 50 |
| Concurrency | Cancels superseded developer-branch runs; preserves master/release/tag runs | Preserves running jobs, groups by workflow/ref, serializes matrix scenarios |
| Export | Uses perf/tools/aggregate.lua; generates InfluxDB data and analysis configuration | Uses its own perf/export.lua; generates InfluxDB data |
| Analysis | Downloads historical results and runs Otava | No historical comparison or regression analysis |
If we're going to use the setup_env.sh and aggregate.lua from Tarantool, maybe it's better to clone the repo in CI and use them explciitly without copy-pasting, they're not needed locally anyway
| - name: Setup Tarantool | ||
| uses: ./.github/actions/setup-tarantool | ||
| with: | ||
| tarantool_version: release-master |
There was a problem hiding this comment.
No way, we must use the pinned version, otherwise perf of tarantool's master will affect vshard's perf tests. Let's use the 3.9 release
| local args, opts = {}, {timeout = cfg.rpc_timeout_seconds} | ||
| local buckets = cfg.bucket_count | ||
| local request = {0, 'perf.noop', args, opts} | ||
| if case == 'callrw_noop' then |
There was a problem hiding this comment.
I don't think it has much sense in testing 2 rw requests. We should test callrw and callro, that's it
| max-parallel: 1 | ||
| matrix: | ||
| include: | ||
| - scenario: baseline |
There was a problem hiding this comment.
I'd stop on router/storage pressure to see the max possible perf of storage/router on that machine. Baseline seems useless
Use separate cache keys for GitHub-hosted and self-hosted runners to avoid restoring a build made for a different environment. NO_DOC=ci NO_TEST=ci
b654de3 to
3d6f9cf
Compare
Add callro_get and callrw_replace benchmarks with configurable storage, router and load generator processes on a single host. Warm up each bucket through every router before a shared 20-second measurement window. Support repeated measurements and report their mean RPS. Run router-pressure and storage-pressure configurations on the performance runner with Tarantool 3.9.0. Run daily for commits without a previous successful scheduled or manual run, on request, and for pull requests with the performance label. Use Tarantool's environment setup and result aggregation tools. Save JSON results and logs as artifacts and send results to InfluxDB, except for fork pull requests. Analyze performance history with Apache Otava. Compare each pull request with its base revision on GitHub-hosted runners using the same benchmarks and Tarantool version. Run three repetitions per configuration and fail if base RPS is at least 5% higher. Closes #587 NO_DOC=ci
3d6f9cf to
dabadfc
Compare
Closes #587
dashboard: https://mon.tarantool.io/grafana/d/eVuW-RRdz/vshard-performance