Skip to content

Conversation

@original-brownbear
Copy link
Contributor

Just like #56094 but for the request side.
Removes a lot of redundant ShardId instances from bulk shard requests as well as stops serializing index names when they're not needed because they're not different from what is in the shard id.

Even ignoring the index name serialization savings here, this change saves one ShardId instance per bulk shard request at least. This means it saves approximately:

  • 8 bytes for the ShardId object (itself + one field)
      • another 4 bytes for the int in the ShardId
  • 16 bytes (two fields + the instance itself + the padding) for the Index object
      • 30 bytes for the Index uuid string
      • all the bytes in the index name string

=> 60+ bytes per bulk request item saved on heap and over the wire

backport of #56209

Just like elastic#56094 but for the request side.
Removes a lot of redundant `ShardId` instances from bulk shard requests as well as stops serializing index names when they're not needed because they're not different from what is in the shard id.

Even ignoring the index name serialization savings here, this change saves one `ShardId` instance per bulk shard request at least. This means it saves approximately:

* 8 bytes for the `ShardId` object (itself + one field)
   * + another 4 bytes for the `int` in the `ShardId`
* 16 bytes (two fields + the instance itself + the padding) for the `Index` object
   * + 30 bytes for the `Index` uuid string
   * + all the bytes in the index name string

=> 60+ bytes per bulk request item saved on heap and over the wire
@original-brownbear original-brownbear added :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. backport labels Jun 23, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/CRUD)

@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Jun 23, 2020
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jun 23, 2020
Disabling BwC tests so that elastic#58414 can be merged.
@original-brownbear
Copy link
Contributor Author

Jenkins run elasticsearch-ci/1 (dep download issue)

original-brownbear added a commit that referenced this pull request Jun 23, 2020
Disabling BwC tests so that #58414 can be merged.
@original-brownbear original-brownbear merged commit 943efb7 into elastic:7.x Jun 23, 2020
@original-brownbear original-brownbear deleted the 56209-7.x branch June 23, 2020 10:35
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jun 23, 2020
Now that elastic#58414 has been merged, reenabling BwC tests
original-brownbear added a commit that referenced this pull request Jun 23, 2020
Now that #58414 has been merged, reenabling BwC tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants