pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Data ingestion CPU efficiency improvements

Open lnbest0707 opened this issue 1 year ago • 1 comments

Pinot data ingestion from Kafka is following the 1 thread per Kafka partition mechanism. The scaling up is relying on increasing number of Kafka topic partitions. However, due to the nature of ingestion computation load, Kafka broker usually has a far higher traffic volume limit per partition than Pinot. For example, with same type of hardware, Kafka could afford traffic over 8MB/s/partition but Pinot if doing complex transformation and index building (e.g. SchemaConformingTransformer & text index) can only afford <2 MB/s/partition. This makes the Kafka partition expansion not able to be always in sync with Pinot's system load. In reality, we are observing that in a Pinot server with tens of cores, only 20% are busy with ingesting and others relatively idle.

Hence, there's requirement to improve the computation efficiency and do parallel (at least part of) single partition message processing. image From the attached pic, there are a few components to be improved:

  • gzip compression -> to zstd with proper level
  • transformers -> using batch and parallel processing, there are some other OSS projects like uForwarder doing the batch message processing
  • indexing -> TBD
  • Kafka polling -> batch polling

lnbest0707 avatar Jun 05 '24 19:06 lnbest0707

Good findings! Let's first check if there are some low hanging fruit optimizations. cc @swaminathanmanish

Jackie-Jiang avatar Jun 10 '24 19:06 Jackie-Jiang