Skip to content

[cuebot/proto/pycue/cueadmin/cuegui/cueweb] Add per-host (per-machine) limits: count distinct hosts instead of running frames #2488

Description

@ramonfigueiredo

Describe the enhancement
Add an option for a limit to count usage once per distinct host rather than once per running frame, so limits can accurately model per-machine floating licenses (e.g. Nuke render licenses).

Today, limits are commonly used to cap concurrent license usage, e.g. a nuke limit set to the number of Nuke render licenses, applied to all Nuke layers.

The problem

Nuke render licenses are checked out per machine, so several Nuke frames running on the same host consume only one license. But OpenCue counts a limit as one unit per running frame and is completely host-blind, it computes usage as SUM(layer_stat.int_running_count) across the limit's layers and gates dispatch on sum_running < int_max_value. So 4 Nuke frames packed onto one machine count as 4 against the nuke limit even though they've only used 1 license.

The result is that limits systematically over-count relative to real license usage whenever frames pack onto shared machines, forcing sites to either inflate the limit above their true license count (imprecise and risky) or force one frame per host (wasting machine resources).

Proposed behavior

Allow a limit to be flagged as a host limit. When set, its usage is the number of distinct hosts currently running frames of the limit's layers (COUNT(DISTINCT host)) rather than the sum of running frames; non-host limits keep today's per-frame behavior. Notably, the limit_record table already has a b_host_limit BOOLEAN DEFAULT false NOT NULL column that appears to have been intended for exactly this, but was never wired up, no code reads or writes it. This enhancement would give that column its intended meaning.

Version Number

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to an existing feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions