Skip to content

Authorization for Internal Requests like Stats or Rollover is Slow in Large Clusters #79632

@original-brownbear

Description

@original-brownbear

This is a bit of a sub-issue of #67987 but I wonder if we can take similar short cuts here to the ones we took for e.g. local field caps requests.

For stats we have a lot of slow logging like this:

[2021-10-21T13:47:35,324][INFO ][o.e.x.s.a.AuthorizationService] [elasticsearch-8] Took [51ms] to resolve [42493] indices for action [indices:monitor/stats] and user [esbench]
[2021-10-21T13:47:35,956][INFO ][o.e.x.s.a.AuthorizationService] [elasticsearch-8] Took [52ms] to resolve [42493] indices for action [indices:monitor/stats] and user [esbench]
[2021-10-21T13:47:36,737][INFO ][o.e.x.s.a.AuthorizationService] [elasticsearch-8] Took [72ms] to resolve [42494] indices for action [indices:monitor/stats] and user [esbench]
[2021-10-21T13:47:37,199][INFO ][o.e.x.s.a.AuthorizationService] [elasticsearch-8] Took [81ms] to resolve [42494] indices for action [indices:monitor/stats] and user [esbench]
[2021-10-21T13:47:38,208][INFO ][o.e.x.s.a.AuthorizationService] [elasticsearch-8] Took [56ms] to resolve [42494] indices for action [indices:monitor/stats] and user [esbench]

on the master node once monitoring asks for stats. We do not have similar logging for field caps requests, so something must be different here in how the fan-out works. Could we short-circuit it here as well for a quick-win and more stability on transport threads?

We also see the same thing for setting updates (these are node local requests from ILM):

[2021-10-21T10:45:23,537][INFO ][o.e.x.s.a.AuthorizationService] [elasticsearch-8] Took [96ms] to resolve [41923] indices for action [indices:admin/settings/update] and user [esbench]

Also, we do see non-trivial CPU going into the internal DS rollover requests sent by ILM that are all node-local as well.

Can we possibly have more quick wins here for this class of requests @ywangd?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions