-
Notifications
You must be signed in to change notification settings - Fork 366
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
Chunk ingestion performance regression because of compaction logic #8101
Comments
Thanks for the neat little repro @rgolovanov, that made it a breeze 👍 |
@teh-cmc Thanks for the extremely fast fix 🙏 We will be looking forward for new release 😊 |
@teh-cmc I installed rerun_sdk-0.20.0a4+dev-cp38-abi3-win_amd64.whl from latest development build which includes your fix. For me, it still shows growing latency... |
Both 0.17 and the latest development wheel seem to have the same latencies for me @rgolovanov, i.e. they can both sustain the above script at 100Hz but fall behind at 1kHz. Note that the script in the issue description has a typo in it -- it's running at 1kHz, not 100Hz: - time.sleep(0.001) # Sleep for 10ms to achieve approximately 100Hz
+ time.sleep(0.010) # Sleep for 10ms to achieve approximately 100Hz |
Yes, frequency matters of course. I think I started local testing with 100Hz and then switched to 1KHz because it was easier and faster way to reveal the issue. With |
The amount of data already present shouldn't have any impact on the ingestion speed. What I assume you're experiencing here is another issue: the fact that ingestion and rendering both happen on the same thread as of today: By the time you've ingested 130MiB worth of scalars, and assuming your plot view is configured to display them all, rendering times will skyrocket and therefore ingestion will start lagging behind because the thread is being hogged by the renderer. The reason this might appear to be faster on 0.17 is simply because scalars consumes at least 1 order of magnitude more memory than on 0.18+, so 130MiB worth of scalars on 0.17 is way, way less scalars than on 0.20, and therefore takes far less time to render. |
@teh-cmc I updated to new official release 0.20.0 and can confirm that the performance is still low. the latency is rapidly growing even if only 10sec of recording (current time with offset) is shown in the view. As a workaround we use older version I know the description of the issue mentions 0.17.0 but could you profile performance difference between 0.16.1 and 0.20.0? |
😞 I'll have a look. |
TL;DR:
|
It is likely that some of this ingestion overhead can be mitigated with more aggressive SDK-side chunk compaction. This can be enabled by changiung the environment variable |
Describe the bug
The latency in the Viewer is rapidly growing when dozens of scalar values are logged. The performance has degraded between 0.17.0 and 0.19.0 (or maybe even 0.18.1)
To Reproduce
Steps to reproduce the behavior:
pip install rerun-sdk==0.17.0
python rerun_latency_test.py
(see code below)Expected behavior
The latency stays within 10-15ms range as it was in earlier versions.
Screenshots
Test script
rerun_latency_test.py
probably, numbers can be different depending on the machine, but in my case the problem is visible when I log 10x5x3=150 scalar values.
Desktop (please complete the following information):
Rerun version
Detected in 0.19.0 but likely appeared in 0.18.0 or 0.18.1
The text was updated successfully, but these errors were encountered: