Skip to content

Instantly share code, notes, and snippets.

@tom-clickhouse
Created October 17, 2023 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-clickhouse/6c2bd2b6bd18aca4a1cce665d0c806fe to your computer and use it in GitHub Desktop.
Save tom-clickhouse/6c2bd2b6bd18aca4a1cce665d0c806fe to your computer and use it in GitHub Desktop.
min_insert_block_size_rows = 1_000_000
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- 59 insert threads
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- clickhouse-client output --------------------------------------------------------------------------------------------
0 rows in set. Elapsed: 3272.546 sec. Processed 65.33 billion rows, 9.60 TB (19.96 million rows/s., 2.93 GB/s.)
Peak memory usage: 43.39 GiB.
-- number of active parts at ingest finish -----------------------------------------------------------------------------
┌─parts─┐
│ 56794 │
└───────┘
-- time to less than 3k active parts ----------------------------------------------------------------------------------
┌─seconds─┐
│ 12015 │
└─────────┘
-- number of initial parts written to storage --------------------------------------------------------------------------
┌─parts──────────┬─rows_max─────┬─rows_avg─────┬─rows_min──────┬─size_uncompressed_avg─┬─size_compressed_avg─┬─rows_total────┐
│ 65.15 thousand │ 1.01 million │ 1.00 million │ 2.03 thousand │ 224.54 MiB │ 23.53 MiB │ 65.33 billion │
└────────────────┴──────────────┴──────────────┴───────────────┴───────────────────────┴─────────────────────┴───────────────┘
-- number of initial parts written to storage per cluster node ---------------------------------------------------------
┌─n─┬─parts──────────┬─rows_total────┐
│ 1 │ 22.88 thousand │ 22.94 billion │
│ 2 │ 18.89 thousand │ 18.95 billion │
│ 3 │ 23.38 thousand │ 23.44 billion │
└───┴────────────────┴───────────────┘
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- 32 insert threads
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- clickhouse-client output --------------------------------------------------------------------------------------------
0 rows in set. Elapsed: 3884.216 sec. Processed 65.33 billion rows, 9.60 TB (16.82 million rows/s., 2.47 GB/s.)
Peak memory usage: 26.46 GiB.
-- number of active parts at ingest finish -----------------------------------------------------------------------------
┌─parts─┐
│ 50088 │
└───────┘
-- time to less than 3k active parts ----------------------------------------------------------------------------------
┌─seconds─┐
│ 12002 │
└─────────┘
-- number of initial parts written to storage --------------------------------------------------------------------------
┌─parts──────────┬─rows_max─────┬─rows_avg─────┬─rows_min───────┬─size_uncompressed_avg─┬─size_compressed_avg─┬─rows_total────┐
│ 65.07 thousand │ 1.01 million │ 1.00 million │ 16.38 thousand │ 225.40 MiB │ 23.08 MiB │ 65.33 billion │
└────────────────┴──────────────┴──────────────┴────────────────┴───────────────────────┴─────────────────────┴───────────────
-- number of initial parts written to storage per cluster node ---------------------------------------------------------
┌─n─┬─parts──────────┬─rows_total────┐
│ 1 │ 21.47 thousand │ 21.56 billion │
│ 2 │ 20.58 thousand │ 20.66 billion │
│ 3 │ 23.02 thousand │ 23.12 billion │
└───┴────────────────┴───────────────┘
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- 16 insert threads
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- clickhouse-client output --------------------------------------------------------------------------------------------
0 rows in set. Elapsed: 5059.903 sec. Processed 65.33 billion rows, 9.60 TB (12.91 million rows/s., 1.90 GB/s.)
Peak memory usage: 15.22 GiB.
-- number of active parts at ingest finish -----------------------------------------------------------------------------
┌─parts─┐
│ 34447 │
└───────┘
-- time to less than 3k active parts ----------------------------------------------------------------------------------
┌─seconds─┐
│ 11470 │
└─────────┘
-- number of initial parts written to storage --------------------------------------------------------------------------
┌─parts──────────┬─rows_max─────┬─rows_avg─────┬─rows_min───────┬─size_uncompressed_avg─┬─size_compressed_avg─┬─rows_total────┐
│ 65.06 thousand │ 1.01 million │ 1.00 million │ 49.15 thousand │ 232.40 MiB │ 22.92 MiB │ 65.33 billion │
└────────────────┴──────────────┴──────────────┴────────────────┴───────────────────────┴─────────────────────┴───────────────┘
-- number of initial parts written to storage per cluster node ---------------------------------------------------------
┌─n─┬─parts──────────┬─rows_total────┐
│ 1 │ 22.77 thousand │ 22.87 billion │
│ 2 │ 20.05 thousand │ 20.13 billion │
│ 3 │ 22.24 thousand │ 22.34 billion │
└───┴────────────────┴───────────────┘
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- 8 insert threads
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- clickhouse-client output --------------------------------------------------------------------------------------------
0 rows in set. Elapsed: 8577.387 sec. Processed 65.33 billion rows, 9.60 TB (7.62 million rows/s., 1.12 GB/s.)
Peak memory usage: 9.86 GiB.
-- number of active parts at ingest finish -----------------------------------------------------------------------------
┌─parts─┐
│ 11569 │
└───────┘
-- time to less than 3k active parts ----------------------------------------------------------------------------------
┌─seconds─┐
│ 12417 │
└─────────┘
-- number of initial parts written to storage --------------------------------------------------------------------------
┌─parts──────────┬─rows_max─────┬─rows_avg─────┬─rows_min──────┬─size_uncompressed_avg─┬─size_compressed_avg─┬─rows_total────┐
│ 65.05 thousand │ 1.01 million │ 1.00 million │ 6.17 thousand │ 227.47 MiB │ 22.80 MiB │ 65.33 billion │
└────────────────┴──────────────┴──────────────┴───────────────┴───────────────────────┴─────────────────────┴───────────────┘
-- number of initial parts written to storage per cluster node ---------------------------------------------------------
┌─n─┬─parts──────────┬─rows_total────┐
│ 1 │ 20.73 thousand │ 20.82 billion │
│ 2 │ 22.68 thousand │ 22.78 billion │
│ 3 │ 21.64 thousand │ 21.73 billion │
└───┴────────────────┴───────────────┘
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- 4 insert threads
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-- clickhouse-client output --------------------------------------------------------------------------------------------
0 rows in set. Elapsed: 14536.156 sec. Processed 65.33 billion rows, 9.60 TB (4.49 million rows/s., 660.63 MB/s.)
Peak memory usage: 6.79 GiB.
-- number of active parts at ingest finish -----------------------------------------------------------------------------
┌─parts─┐
│ 1488 │
└───────┘
-- time to less than 3k active parts ----------------------------------------------------------------------------------
┌─seconds─┐
│ 14536 │
└─────────┘
-- number of initial parts written to storage --------------------------------------------------------------------------
┌─parts──────────┬─rows_max─────┬─rows_avg─────┬─rows_min───────┬─size_uncompressed_avg─┬─size_compressed_avg─┬─rows_total────┐
│ 65.03 thousand │ 1.01 million │ 1.00 million │ 75.10 thousand │ 230.69 MiB │ 22.69 MiB │ 65.33 billion │
└────────────────┴──────────────┴──────────────┴────────────────┴───────────────────────┴─────────────────────┴───────────────┘
-- number of initial parts written to storage per cluster node ---------------------------------------------------------
┌─n─┬─parts──────────┬─rows_total────┐
│ 1 │ 22.25 thousand │ 22.36 billion │
│ 2 │ 20.67 thousand │ 20.76 billion │
│ 3 │ 22.11 thousand │ 22.21 billion │
└───┴────────────────┴───────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment