Skip to content

Use host.id for sorting security data#687

Merged
salvatore-campagna merged 1 commit intoelastic:masterfrom
salvatore-campagna:feature/security-sort-host-id
Oct 2, 2024
Merged

Use host.id for sorting security data#687
salvatore-campagna merged 1 commit intoelastic:masterfrom
salvatore-campagna:feature/security-sort-host-id

Conversation

@salvatore-campagna
Copy link
Contributor

@salvatore-campagna salvatore-campagna commented Oct 2, 2024

host.hostname has cardinality 100 while host.id has cardinality 50. This happen because in the dataset there is a host per each couple of hostnames, like a single host.id and for each of them two host names like 'dustin.windows' and 'dustin.linux'. This is probably an artifact of the data generation script.

Lower cardinality fields might:

  • reduce sorting overhead due to less comparisons, which might improve ingestion throughput
  • improve compression due to better data clustering, which might reduce disk storage (index size)

This change should at least allow us to see if there is any benefit in choosing a lower cardinality field
like host.id versus host.hostname.

Right now benchmarks run with version 9.0 of Elasticsearch and it looks like we still don't have
the corresponding branch in Rally. As a result, Rally is checked out from master. For this reason
back-porting is not strictly required. We do the backport to 8.15 in case we need to do some
comparison later on, comparing Elasticsearch 8.16 versus 8.15.

host.hostname has cardinality 100 while host.id has cardinality 50.
This happen because in the dataset there is a host.if per each couple
ho hostnames, like a single host.id and for each of them two hostnames
like 'dustin.windows' and 'dustin.linux'. This is probably an artifact
of the data generation script.

Lower cardinality fields might:
* reduce sorting overhead due to less comparisons
* improve compression due to more data clustering together

This change should at least allow us if there is any benefit in choosing
a lower cardinality field.
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@salvatore-campagna salvatore-campagna merged commit e2ca95e into elastic:master Oct 2, 2024
github-actions bot pushed a commit that referenced this pull request Oct 2, 2024
host.hostname has cardinality 100 while host.id has cardinality 50.
This happen because in the dataset there is a host.if per each couple
ho hostnames, like a single host.id and for each of them two hostnames
like 'dustin.windows' and 'dustin.linux'. This is probably an artifact
of the data generation script.

Lower cardinality fields might:
* reduce sorting overhead due to less comparisons
* improve compression due to more data clustering together

This change should at least allow us if there is any benefit in choosing
a lower cardinality field.

(cherry picked from commit e2ca95e)
@github-actions
Copy link

github-actions bot commented Oct 2, 2024

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

gbanasiak pushed a commit that referenced this pull request Oct 29, 2024
host.hostname has cardinality 100 while host.id has cardinality 50.
This happen because in the dataset there is a host.if per each couple
ho hostnames, like a single host.id and for each of them two hostnames
like 'dustin.windows' and 'dustin.linux'. This is probably an artifact
of the data generation script.

Lower cardinality fields might:
* reduce sorting overhead due to less comparisons
* improve compression due to more data clustering together

This change should at least allow us if there is any benefit in choosing
a lower cardinality field.

(cherry picked from commit e2ca95e)

Co-authored-by: Salvatore Campagna <93581129+salvatore-campagna@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants