我正在设置一个节点ES来处理来自网络的udp消息,我正在使用logstash来管理消息。
输入 - > UDP 没有过滤器 输出 - > Elasticsearch(单个工作者,刷新大小为5000)
对于我运行的所有测试,25k是重大数据包丢失之前的最大事件数/秒。我知道瓶颈不是udp输入或网络,因为当我使用stdout或文件输出而不是ES时,吞吐量可能高达80k / s。
节点为16G / 12T(RAID 0),但磁盘为HDD。 我尝试了不同的设置,但无法超过25k evts / s。我想知道我是否只是硬件限制,唯一的方法就是使用SSD。 任何人都处于相同的情况?允许ES以接近stdout的速度索引的任何技巧?这是我到目前为止所尝试的(在40s内发送1M udp pkts,大约是25K / s):
这是我在elasticsearch.yml
中添加的内容script.disable_dynamic: true
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
action.auto_create_index: false
bootstrap.mlockall: true
action.disable_delete_all_indices: true
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.node_initial_primaries_recoveries:15
indices.recovery.concurrent_streams: 4
index.routing.allocation.disable_allocation: false
index.merge.scheduler.max_thread_count: 1
index.store.type: mmapfs
index.refresh_interval: 60000
threadpool.bulk.queue_size: 30000
indices.memory.index_buffer_size: 30%
index.translog.flush_threshold_ops: 50000
答案 0 :(得分:1)
从我的经验来看,最好的方法是将磁盘切换到SSD,它将真正提高您的性能。另一种可能是从单个elasticsearch服务器迁移到集群中的多个服务器。
从你的问题我看到你已经尝试了一些不太明显的解决方案,比如增加工人数量和indices.memory.index_buffer_size参数,所以这些技巧似乎达到了硬件限制。
我建议使用“sar”或“iotop”工具验证限制是否真的在磁盘中,如果你看到磁盘的100%利用率,那么除非你使用elasticsearch写,否则没有配置方法来修复它数据更有效地传输到磁盘。