Skip to content

Disable TCP compression when shipping Lucene segments during peer recovery #33844

@ywelsch

Description

@ywelsch

Shipping lucene segments during peer recovery is configured to set the transport compress options to false:

.withCompress(false) // lucene files are already compressed and therefore compressing this won't really help much so
// we are saving the cpu for other things

Unfortunately this is overridden when transport.tcp.compress is enabled, discarding the request-level option:

if (compress) {
options = TransportRequestOptions.builder(options).withCompress(true).build();
}

This means that when transport.tcp.compress is enabled, the (already compressed) Lucene files are unnecessarily compressed a second time, slowing peer recovery.

My preference would be that transport options that were explicitly set (withCompress(true) or withCompress(false)) take precedence over transport.tcp.compress.

Relates to https://discuss.elastic.co/t/elasticsearch-6-3-0-shard-recovery-is-slow/140940/

Metadata

Metadata

Labels

:Distributed Coordination/NetworkHttp and internode communication implementations:Distributed Indexing/RecoveryAnything around constructing a new shard, either from a local or a remote source.>enhancementTeam:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions