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

TSan report in base64_codec_choose. #8397

Closed
alexey-milovidov opened this issue Dec 25, 2019 · 5 comments · Fixed by #8403
Closed

TSan report in base64_codec_choose. #8397

alexey-milovidov opened this issue Dec 25, 2019 · 5 comments · Fixed by #8403
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@alexey-milovidov
Copy link
Member

alexey-milovidov commented Dec 25, 2019

https://clickhouse-test-reports.s3.yandex.net/0/8d1165ed9217f6e512dff65167ae495094daf90e/stress_test_(thread)/stderr.log

Not a bug. Trivial.

@alexey-milovidov alexey-milovidov added the bug Confirmed user-visible misbehaviour in official release label Dec 25, 2019
@alexey-milovidov alexey-milovidov self-assigned this Dec 25, 2019
@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Dec 25, 2019

https://github.com/aklomp/base64 has poor design of initialization
and at least two new competitive libraries exist:
https://github.com/lemire/fastbase64
https://github.com/powturbo/TurboBase64

@alexey-milovidov
Copy link
Member Author

We usually encode and decode huge amount of short strings (instead of one large string), so the relevance of benchmarks of these libraries are in question.

@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Dec 25, 2019

TurboBase64 library looks half baked and it doesn't support strings longer than 4 GiB.

Update: now it does!

@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Dec 25, 2019

The library TurboBase64 is at least tens percent worse than aklomp/base64 on test:

clickhouse-benchmark <<< "SELECT sum(length(base64Encode(URL))) FROM test.hits"
localhost:9000, queries 2319, QPS: 8.579, RPS: 76129062.788, MiB/s: 6283.060, result RPS: 8.579, result MiB/s: 0.000.

0.000%          0.094 sec.
10.000%         0.102 sec.
20.000%         0.105 sec.
30.000%         0.108 sec.
40.000%         0.110 sec.
50.000%         0.113 sec.

localhost:9000, queries 1483, QPS: 7.669, RPS: 68056225.151, MiB/s: 5616.795, result RPS: 7.669, result MiB/s: 0.000.

0.000%          0.097 sec.
10.000%         0.108 sec.
20.000%         0.115 sec.
30.000%         0.121 sec.
40.000%         0.125 sec.
50.000%         0.130 sec.

This is due to processing of "tails".

@alexey-milovidov
Copy link
Member Author

The branch with TurboBase64 can be found here: https://github.com/ClickHouse/ClickHouse/compare/base64-update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant