Can we take control of placement set selecting order?

According to Section of AG (Page. 157)
We have a built in placement set selection algorithm within pools

My question is : Can scheduler take over this and use user defined rules,
say look in to set 2 unconditionally prior to set 1 regardless of static or dynamic ncpus or mem

btw, node_sort_key would work within placement set(as long as it was chosen) , but not work while choosing placement set.

Yes and no,
The supported answer is no. There is a static placement set sort.

With that said, there is a way to affect the placement set sort. It isn’t pretty and it’s a hack, but it does work. The placement set sort is made from summing the resources for all nodes in a placement set. This includes offline nodes. It is possible to create a dummy vnode with a mom v2 config file with a huge number of ncpus. Set this vnode offline. Since the vnode is offline, it won’t be used to place jobs on, but it will affect the size of the placement set. The scheduler will think the placement set has a huge number of ncpus, and move it later in the sort.

1 Like