ClickHouse / ClickHouse/clickhouse-java

Slow deserialization of DateTime values

オープン
#715 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:data-type performance test
主要言語
Java
スター
1.6k
フォーク
636
平均マージ
2日 23時間
マージ済み PR(30日)
29

説明

Deserialization of DateTime value seems very slow comparing to string and number.

Below are benchmarks against ClickHouse 21.8.
```
Benchmark (client) (connection) (statement) Mode Cnt Score Error Units
Query.select10kStringRows clickhouse-jdbc(0.3.1-patch) reuse normal thrpt 20 55.892 ± 3.277 ops/s
Query.select10kTimestampRows clickhouse-jdbc(0.3.1-patch) reuse normal thrpt 20 10.243 ± 0.627 ops/s
Query.select10kUInt64Rows clickhouse-jdbc(0.3.1-patch) reuse normal thrpt 20 54.420 ± 4.530 ops/s
Query.select10kStringRows clickhouse-native-jdbc-shaded(2.5.6) reuse normal thrpt 20 73.846 ± 5.486 ops/s
Query.select10kTimestampRows clickhouse-native-jdbc-shaded(2.5.6) reuse normal thrpt 20 83.446 ± 5.502 ops/s
Query.select10kUInt64Rows clickhouse-native-jdbc-shaded(2.5.6) reuse normal thrpt 20 83.512 ± 4.226 ops/s
```

`clickhouse-grpc-client`(0.3.2) with grpc compression disabled on server:
```
Benchmark (connection) (format) (mode) (protocol) (transport) Mode Cnt Score Error Units
Query.select10kStringRows reuse RowBinaryWithNamesAndTypes sync GRPC netty thrpt 20 82.786 ± 4.334 ops/s
Query.select10kStringRows reuse RowBinaryWithNamesAndTypes sync GRPC okhttp thrpt 20 70.753 ± 4.797 ops/s
Query.select10kStringRows reuse TabSeparatedWithNamesAndTypes sync GRPC netty thrpt 20 60.482 ± 4.466 ops/s
Query.select10kStringRows reuse TabSeparatedWithNamesAndTypes sync GRPC okhttp thrpt 20 52.046 ± 2.540 ops/s
Query.select10kTimestampRows reuse RowBinaryWithNamesAndTypes sync GRPC netty thrpt 20 99.147 ± 5.190 ops/s
Query.select10kTimestampRows reuse RowBinaryWithNamesAndTypes sync GRPC okhttp thrpt 20 86.454 ± 5.485 ops/s
Query.select10kTimestampRows reuse TabSeparatedWithNamesAndTypes sync GRPC netty thrpt 20 48.739 ± 3.207 ops/s
Query.select10kTimestampRows reuse TabSeparatedWithNamesAndTypes sync GRPC okhttp thrpt 20 29.759 ± 1.812 ops/s
Query.select10kUInt64Rows reuse RowBinaryWithNamesAndTypes sync GRPC netty thrpt 20 121.422 ± 6.465 ops/s
Query.select10kUInt64Rows reuse RowBinaryWithNamesAndTypes sync GRPC okhttp thrpt 20 73.226 ± 3.930 ops/s
Query.select10kUInt64Rows reuse TabSeparatedWithNamesAndTypes sync GRPC netty thrpt 20 66.267 ± 4.822 ops/s
Query.select10kUInt64Rows reuse TabSeparatedWithNamesAndTypes sync GRPC okhttp thrpt 20 56.022 ± 4.188 ops/s
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず Query.select10kTimestampRows ベンチマークを再現し、その DateTime の結果を、RowBinaryWithNamesAndTypes と TabSeparatedWithNamesAndTypes における string および UInt64 のケースと比較します。Java クライアントで使用されているデシリアライゼーションパスと、pull request #736 に示されている関連作業を確認します。ベンチマークによる証拠をもって DateTime のスループットの差を特定し、対処できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
grpc, java
領域
performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。