我要将20亿个文档编入索引,一旦完成,我将每秒连续更新(upserts)40k文档。
以下是我的群集详细信息:
我有一个固定的模式(大约10个字段,1个字段作为整数数组)
_all
已停用。我不能使用自动生成的id。我为doc定义了自己的id。
以下是一些设置:
threadpool.bulk.queue_size: 3000
indices.cache.query.size: 10%
index.index_concurrency: 50
index.refresh_interval: 600s
index.translog.flush_threshold_ops: 50000
indices.memory.index_buffer_size: 30%
indices.fielddata.cache.size: 40%
indices.cluster.send_refresh_mapping: false
indices.store.throttle.max_bytes_per_sec" : 100mb
群集启动很快,每秒写入120k。但是一旦加载了20亿个文档,它就会降到20k。
我尝试了15个分片,30个分片:两者都会产生相同的结果。
如何实现每秒至少40k的更新(upsert操作)?