Skip to content

RestHighLevelClient low performance when indexing #46370

@xavierfacq

Description

@xavierfacq

Hi,

I'm refactoring our code to migrate from Transport Client to RestHighLevelClient.
I do not have monitored searches at now but I have problems during indexations.
Indexation are super longer than with the Transport Client.

Version
Cluster nodes and client are in version 6.6.1

JDK:
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)
OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode)

OS:
Linux BP-PRD-SFX13 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

`My first mesure of performance are duration of the full process of indexation:

Indexing type 1:
Transport Client: P0Y0M0DT1H23M13.066S / P0Y0M0DT1H26M31.467S
RestHighLevelClient: P0Y0M0DT2H42M54.303S

For this index, time is x2 !

Indexing type 2:
Transport Client: P0Y0M0DT2H38M5.045S / P0Y0M0DT2H37M46.819S / P0Y0M0DT2H40M22.611S / P0Y0M0DT2H36M23.148S
RestHighLevelClient: P0Y0M0DT4H21M7.071S / P0Y0M0DT4H16M25.221S / P0Y0M0DT4H6M15.441S

For this one we are at ~2h40 with the Transport Client and ~4h15 with RestHighLevelClient

Another mesure is the index rate every 30 minutes

Transport Client:
INFO: >>> Indexation progress: Total nbQueuedElements = 16635825 / Total nbIndexedElements = 16529138 / Total QueueingRate = 9242 elements/sec / Loop nbQueuedElements = 16635817 / Loop nbIndexedElements = 16529138
INFO: >>> Indexation progress: Total nbQueuedElements = 102867389 / Total nbIndexedElements = 102800459 / Total QueueingRate = 28574 elements/sec / Loop nbQueuedElements = 86231522 / Loop nbIndexedElements = 86271321

RestHighLevelClient :
INFOS: >>> Indexation progress: Total nbQueuedElements = 15812209 / Total nbIndexedElements = 15592210 / Total QueueingRate = 8784 elements/sec / Loop nbQueuedElements = 15812209 / Loop nbIndexedElements = 15592210
INFOS: >>> Indexation progress: Total nbQueuedElements = 33418351 / Total nbIndexedElements = 33218352 / Total QueueingRate = 9282 elements/sec / Loop nbQueuedElements = 17606142 / Loop nbIndexedElements = 17626142
INFOS: >>> Indexation progress: Total nbQueuedElements = 54120571 / Total nbIndexedElements = 53951028 / Total QueueingRate = 10022 elements/sec / Loop nbQueuedElements = 20702217 / Loop nbIndexedElements = 20732676
INFOS: >>> Indexation progress: Total nbQueuedElements = 75133642 / Total nbIndexedElements = 74944797 / Total QueueingRate = 10435 elements/sec / Loop nbQueuedElements = 21013063 / Loop nbIndexedElements = 20993769
INFOS: >>> Indexation progress: Total nbQueuedElements = 103712979 / Total nbIndexedElements = 103492980 / Total QueueingRate = 11523 elements/sec / Loop nbQueuedElements = 28579328 / Loop nbIndexedElements = 28548183
INFOS: >>> Indexation progress: Total nbQueuedElements = 130101615 / Total nbIndexedElements = 129891151 / Total QueueingRate = 12046 elements/sec / Loop nbQueuedElements = 26388636 / Loop nbIndexedElements = 26398171
INFOS: >>> Indexation progress: Total nbQueuedElements = 157731630 / Total nbIndexedElements = 157511631 / Total QueueingRate = 12518 elements/sec / Loop nbQueuedElements = 27630015 / Loop nbIndexedElements = 27620480

Max index rate with RestHighLevelClient is 12518 elements/sec, whereas we are up to 28574 elements/sec with Transport Client.

The BulkProcessor is builded with this options:

`
.setBulkActions(20000)
.setBulkSize(new ByteSizeValue(500, ByteSizeUnit.MB))
.setFlushInterval(TimeValue.timeValueMinutes(5))
.setConcurrentRequests(6)
.setBackoffPolicy(
BackoffPolicy.exponentialBackoff(TimeValue.timeValueMillis(100), 3))
.build();

`

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions