I wonder how many workers running inside the querier component.
Autoscaling Loki queriers page described it as if it could be set by the user, but I can’t find any relevant parameters on Configure page.
Or does .querier.concurrent
represent the number of workers?
I could be wrong, but I don’t think querier has the concept of workers. You have X number of queriers, they can process queries in parallel (configurable), but i don’t think they function as workers.
Now if you were to actually implement query parallelization, you’d need to implement query frontend, whether as its own component (microservice mode) or as part of read target (simplescalable mode), and you would configure your queries to connect to the query frontend service (see Query frontend example | Grafana Loki documentation). In that topology you could consider each querier as a worker, but I don’t personally refer to them as such.
First of all, thank you for your reply.
Documentation In many places, it looks like there are some workers inside each querier. I understand that these workers takes the query out of the query-frontend(or query-scheduler) and runs it in parallel.
Below are some of the contents I found in documentation.
Each querier
component process runs a number of parallel workers to process queries simultaneously.
Querier workers process queries from the queue. You can configure each Loki querier to run several workers. To reserve workforce headroom to address workload spikes, our recommendation is not to use more than 75% of the workers. For example, if you configure the Loki queriers to run 6 workers, set a threshold of floor(0.75 * 6) = 4
Even the Shuffle sharding documentation(I can’t put 3 links because I’m a new user) explains that it can be set through the querier.concurrent
parameter. Of course, i cannot find out whether the parameter can be set with yaml or CLI
Configuration parameter querier.concurrency
controls the quantity of worker threads (goroutines) per single querier.
Thank you. I see what you’re talking about.
I was too obsessed with the word worker
. What’s important is the .querier.max_concurrent
parameter that controls the concurrency of the querier.