Lumiera
The new emerging NLE for GNU/Linux

State

Idea

Date

Fri Jul 23 20:33:32 2010

Proposed by

Christian Thaeter <ct@pipapo.org>

The Profiler will give some Idea about how much Resources can be used to optimally utilize the system. Knowing this number leads to the next challenge, distributing the resources to different subsystems, jobs and objects. Here, I introduce a budgeting system which takes care of this.

Description

The idea is quite simple, for each kind of resource we have a global budget manager which accounts for the available and used amounts of this resource.

Each user of a resource has its own account managing his share on the resource.

The system is completely voluntary giving only hints how much of a resource is available for anyone.

Tasks

  • define a sufficiently well defined goal first, to describe what shall and can be achieved through budgeting …

  • then develop a plausible model of suitable control and regulation mechanisms

  • very likely, practical tests will be required to show the feasibility of effective automatic regulation over a significant span of different use cases!

Discussion

Pros

Cons

Alternatives

Rationale

Comments

typedef ssize_t budget_count;

struct budgetmanager
{
  rwlock lock;

  void (*callback)();                   // called on resource shortage
  (resource collector)

  int sum_priorities;                   // sum of all client budgets .. each
  client is granted available/(sum_priorities/own_priority) of the resource

  budget_count available_prefs;         // configuration from preferences
  budget_count available_profile;       // tuned by profiler
  int available_factor;                 // how much % from prefs vs profile

  budget_count available;               // caclulated from above
  budget_count allocated;               // actively in use
};

struct budget
{
  BudgetManager manager;
  int priority;

  budget_count allocated;
};
ct

2010-07-23 20:55:49 CEST

​
​
​

Many years later, I’d like to confirm that this RfC describes a part of the core vision:
the engine shall make best use of limited resources.

Caution The same caveats as for the Profiling do apply here as well…

I’d recommend to be extremely cautions to take any achievement for granted for this topic, which is known to be notoriously difficult and insidious. With budgeting alone, we may be able to prevent overload of the system, yet for anything beyond that, we need an actual optimisation strategy.

Ichthyostega

2025-09-17