Hi,
Quick question that I was unable to find answer to in the docs.
How are job priorities and namespaces related? When I set a priority, does it apply across namespaces or does it just apply within the namespace?
I assume it’s the priority of the job just inside the namespace, correct?
If so, is there a way to set priority for namespaces, so to say? I think it would be useful for certain namespaces that have workload with higher priority.
Best,
Andreas
How are job priorities and namespaces related?
They aren’t.
When I set a priority, does it apply across namespaces or does it just apply within the namespace?
It applies on a job. A job is run with a priority. There is no namespace priority setting.
I assume it’s the priority of the job just inside the namespace, correct?
It is the priority of the job irrelevant of the namespace.
If so, is there a way to set priority for namespaces, so to say?
Just if a job runs inside specific namespace, start it with higher priority.
Note: priority is not schedule priority. Prioity is used only for preemption. See docs job Block - Job Specification | Nomad | HashiCorp Developer .
Thank you for your response and the link to the docs. That is good to know the prio is primarily used to decide which job is evicted first.
I mainly use it for some core infrastructure components (but different namespace), so it’s a good thing when these allocations lead to eviction of some less important jobs, even though they are defined in different namespaces.
I also noticed that I need to have a diff of at least 10 in the priorities, otherwise, no eviction takes place: