• Job dispatch: how do we decide whether to send a job to a host, based on the job's memory requirements and the host's memory resources?
  • Client CPU scheduling: how do memory factors affect when jobs should run?
  • Job abort policy: when must a job be aborted because it is using too much memory?

    Issues and goals

    BOINC applications run at the lowest CPU priority. However, they can impact user-visible performance because of their memory usage:

    These effects can be minimized by limiting BOINC apps to a very small amount of memory. However, this reduces the CPU time available to BOINC, and on some systems BOINC would do no work at all. There is a tradeoff: the more work BOINC does, the greater its potential impact on user-visible performance. One goal of our design is to provide user-adjustable controls (i.e. general preferences) over this tradeoff.

    A second goal is to maximize the CPU efficiency of BOINC apps, i.e. to ensure that they don't thrash. On a multiprocessor, it may sometimes be more efficient (in terms of total CPU time per wall time) to run fewer jobs than the number of CPUs.

    A third goal is to support applications that are memory-aware, i.e. that can trade off memory usage for speed. Such applications should be made aware of the current memory constraints, so that they can adapt accordingly.

    Client data

    When it starts up, BOINC measures: BOINC measures the following periodically (every 10 seconds or so): Data we don't have:

    Server data

    Each workunit record includes:

    Preferences

    We propose the following:

    Scheduler (server side)

    A result is sent to a client only if

    rsc_memory_bound < (RAM size)*min(ram_max_used_frac_busy, ram_max_used_frac_idle)

    Client CPU scheduler

    The scheduler is divided into two parts: This will be modified as follows: In addition, we will add a new 'memory usage check' that runs every 30 seconds or so. This will compute the working sets of all running tasks. If the total is too large, it will trigger CPU scheduler enforcement (see above). If an individual task's working set is too large for it to every run, it is aborted (see below).

    Note: the above policies may cause some tasks to not get run for long periods. For example, suppose that

    In this case, Y won't run until X has finished, even if it more deserving (in terms of debt) than the other small jobs. However, Y won't starve indefinitely. Eventually it will run into deadline trouble, and will run ahead of everything else.

    Aborting tasks

    A task is aborted if, at any point, its working set size is larger than

    (RAM size)*max(ram_max_used_frac_busy, ram_max_used_frac_idle)

    since this means it can't be scheduled.

    Memory-aware applications

    The following items will be added to the BOINC_STATUS structure:

    double working_set_size;        // app's current WS (non-smoothed)
    double max_working_set_size;    // app will be aborted if WS exceeds this
    

    Future work

    "; ?>