我使用SingleStore从Kafka加载事件。我用以下脚本创建了Kafka管道:
create pipeline `events_stream`
as load data kafka 'kafka-all-broker:29092/events_stream'
batch_interval 10000
max_partitions_per_batch 6
into procedure `proc_events_stream`
fields terminated by '\t' enclosed by '' escaped by '\\'
lines terminated by '\n' starting by '';和SingleStore失败与OOM错误如下:
Memory used by MemSQL (4537.88 Mb) has reached the 'maximum_memory' setting (4915 Mb) on this node. Possible causes include (1) available query execution memory has been used up for table memory (in use table memory: 71.50 Mb) and (2) the query is large and complex and requires more query execution memory than is available我很困惑为什么4Gb不足以成批阅读卡夫卡.
是否可以为管道配置batch_size以避免内存问题并使管道更可预测?
发布于 2022-08-09 07:09:32
不幸的是,当前版本的Singlestore管道只有全局批处理大小,不能在存储过程中单独设置。
但是,在一般的中,每个管道批处理都有一定的开销,因此对10000条消息运行1批应该比对相同数量的消息运行100或10批更好。如果存储过程相对较轻,则您正在经历的时间延迟很可能由500 by的网络下载所主导。
值得检查的是,是否有10000条大型消息到达同一分区或多个分区。在Singlestore的管道中,每个数据库分区从不同的kafka分区下载消息,这有助于并行工作负载。但是,如果消息只到达一个分区,那么您就得不到并行执行的好处。
https://stackoverflow.com/questions/69709061
复制相似问题