s3store: Add tools for debugging bottlenecks #924
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using tusd with the s3store, high CPU usage can occur frequently. At some point, the upload speed is limited by the available CPU resources. When comparing to a regular filestore, the s3store results in a reduced upload speed. This PR adds a tool to facilitate the investigation into how performance bottlenecks can be identified and resolved.
How to use this tool:
1_run_tests.sh
to execute benchmarks and record data2_plot_resource_usage.py
to plot the upload performanceWe also previously used CPU profiles to find compute-intensive method, but only with limited success. We found that the computation of checksums and SSL can add CPU usage and implemented flags to disable them (see
tusd/cmd/tusd/cli/flags.go
Lines 81 to 82 in a75c249
We also attempted to switch to AWS SDK v2 and Minio SDK (see
tusd/cmd/tusd/cli/flags.go
Line 84 in a75c249