Commit Graph

223 Commits

Author SHA1 Message Date
David Anderson 14c5493c69 - client: change the job scheduling policy for MT jobs.
The old policy avoided running an N-CPU job unless N CPUs were free.
    This could result in idle CPUs for long periods; for example:
    on a 4-CPU machine, suppose you have a long 1-CPU job in EDF mode,
    and some 4-CPU jobs.
    3 CPUs will be idle until the 1-CPU job finishes.
    Furthermore, the work fetch mechanism won't try to get
    jobs (possibly non-MT) from other projects,
    because the RR simulation doesn't reflect the scheduling
    policy's exclusion principle.

    The change: schedule jobs until ncpus_used >= ncpus.
    E.g. in the above situation run the 1- and 4-CPU jobs together.
    In extreme cases we might run 3 1-CPU jobs and the 4-CPU job.
    This will degrade the performance of the 4-CPU job,
    but that's probably better than having idle CPUs.


svn path=/trunk/boinc/; revision=25312
2012-02-22 21:11:41 +00:00
David Anderson 015a70e757 - client: define a "arrived-first" order on results
in which the tiebreaker is MD5 of name.
    That way the order is stable
    (it doesn't change from one run of the client to the next)
    and it doesn't grep results with similar names
    (and hence for the same app).
    This ordering is used for
    1) the order of display in the manager
    2) the job scheduler's notion of FIFO


svn path=/trunk/boinc/; revision=25300
2012-02-20 22:31:40 +00:00
David Anderson a4cd8e5cdb - storage stuff
- client: message tweak


svn path=/trunk/boinc/; revision=25244
2012-02-13 08:41:48 +00:00
David Anderson b36779b22a - client: fix job scheduler problem:
old: RR simulation marks some jobs as missing their deadline,
        and the job scheduler runs those jobs as "high priority".
    problem: those generally aren't the ones we should run.
        E.g. if the client has a lot of jobs from a project,
        typically the ones with later deadlines are the ones
        whose deadlines are missed in the simulation.
        But in this case the EDF policy says we should run
        the ones with earliest deadlines.
    new: if a project has N deadline misses,
        run its N earliest-deadline jobs,
        regardless of whether they missed their deadline in the sim.
    Note: this is how it used to be (as designed by John McLeod).
        I attempted to improve it, and got it wrong.


svn path=/trunk/boinc/; revision=25188
2012-02-02 17:05:55 +00:00
Charlie Fenton 65b5930423 client: don't defer scheduling a task based on insufficient GPU RAM
svn path=/trunk/boinc/; revision=25166
2012-01-30 10:09:44 +00:00
David Anderson f4b8f357bb - client: fix divide-by-zero bug in calculation of priority
of projects with zero resource share

svn path=/trunk/boinc/; revision=25127
2012-01-23 07:34:16 +00:00
Charlie Fenton bd55ab5968 client: Add logging message for insufficient GPU RAM details to coproc_debug flag
svn path=/trunk/boinc/; revision=25077
2012-01-17 04:03:19 +00:00
Charlie Fenton ee48c85db6 client: Add logging message for insufficient GPU RAM details to coproc_debug flag
svn path=/trunk/boinc/; revision=25074
2012-01-17 02:42:49 +00:00
David Anderson bba4ce24ce - client: compute projects' disk share (based on resource share).
Report it (along with disk usage) in scheduler request messages.
    This will allow the scheduler to send file-delete commands
    if the project is using more than its share.
- client: add <disk_usage_debug> log flag
- create_work: add --help, show --command_line option


svn path=/trunk/boinc/; revision=24968
2012-01-02 05:53:42 +00:00
David Anderson 69834e0c01 - client: compile fix; remove redundant total_peak_flops()
svn path=/trunk/boinc/; revision=24738
2011-12-06 09:20:30 +00:00
David Anderson bc35060726 - client: when contacting a project for reasons other than
work fetch (e.g. to report completed jobs)
    only request work if it's the project we would have chosen
    if we were fetching work.
- client: the way in which project priorities were adjusted
    in work fetch to reflected currently queued work was wrong.
- client: fix bug in the way project priorities are adjusted
    in RR simulator
- client emulator: if there are results in the state file
    with states DOWNLOADING or UPLOADING,
    change them to DOWNLOADED or UPLOADED.
    Otherwise they're stuck.


svn path=/trunk/boinc/; revision=24737
2011-12-06 04:21:27 +00:00
David Anderson 07e54fc86b - client: fix work fetch bug.
If we're contacting a project to report results,
    only piggyback work requests for resources for which
    that project is the highest priority that may have work.
- client: compute result.not_started more efficiently

TODO: continue efficiency work.  There's still some quadratic stuff


svn path=/trunk/boinc/; revision=24523
2011-11-04 08:15:04 +00:00
David Anderson ad2f3771da - client: fix bugs when writing/parsing cc_config.xml via GUI RPCs
(e.g. when editing it via the Manager).
    Include only the GPUs that were specified in the original cc_config.xml,
    not those detected by the client.
- client: fix bug that failed to require authorization for
    GUI RPCs that are supposed to be authorized
- client: report parse errors in acct_mgr_url.xml and acct_mgr_login.xml
- fix compile warnings
- user web: in sample project_specific_prefs.inc,
    get app names from the DB instead of listing them in the PHP code.


svn path=/trunk/boinc/; revision=24518
2011-11-03 19:19:36 +00:00
David Anderson 6297bdbc77 - web: typo in forum RSS from Daniel L G; fixes #1147
- client: message tweak


svn path=/trunk/boinc/; revision=24483
2011-10-25 17:22:18 +00:00
David Anderson b95ac02c5b - client: change the way project priorities are computed,
so that they do what they're supposed to
    (i.e. enforce resource shares)
- client: change log flag <debt_debug> to <priority_debug>
- client simulator: update REC even with large delta-t.
- client simulator: handle "no new work" apps correctly


svn path=/trunk/boinc/; revision=24429
2011-10-19 06:37:03 +00:00
David Anderson f8e7662e1f - client: improvements to job scheduling and work fetch policies.
- Job scheduling: the baseline policy is to schedule based on "project priority",
            which is how much processing P should receive based on resource share
            minus how much it actually has received recently.
            This policy tends to run jobs from the same project together,
            so we modified it by adding a priority adjustment as jobs are scheduled.
            The idea is that if 2 projects have about the same priority
            they should split the processors.

            The problem: the adjustment was too large on hosts that are on
            only a small fraction of the time,
            thus tending to run 1 job from each project, regardless of priority.

            Solution: make an adjustment that reflects the host's actual throughput.
            See adjust_rec_sched() for details.

        - Work fetch: similar situation.
            We were making an adjustment based on how much work the project currently has queued,
            but the adjustment drowned out the project priority,
            so we'd tend to always get work from the project that has least work queued.
            Solution: make a smaller adjustment (-.3 ... .3)

    - client: in message announcing app start, show the plan class

    - client: don't show "unrecognized XML" messages for account files.
        It's typically project-specific prefs that the client doesn't know about.

svn path=/trunk/boinc/; revision=24403
2011-10-15 20:28:26 +00:00
David Anderson 80a6db29d6 - client: win compile fixes
svn path=/trunk/boinc/; revision=24330
2011-10-04 18:19:57 +00:00
Charlie Fenton 95ecb2acda client: Fix compiler warnings
svn path=/trunk/boinc/; revision=24319
2011-10-03 07:55:33 +00:00
Charlie Fenton ebdb8094f1 client: Fix compiler warnings
svn path=/trunk/boinc/; revision=24318
2011-10-03 07:54:22 +00:00
David Anderson 5c0d5d371e - client: compute project scheduling priority more efficiently
- client: if an app version can't be used because the GPUs it needs
    are all excluded, mark it and all its results as "coproc missing"
    so that they won't be looked at in scheduling logic.


svn path=/trunk/boinc/; revision=24317
2011-10-03 06:18:58 +00:00
David Anderson 090050c0ca - client: fix bug that could cause GPU idleness
in the presence of GPU exclusions.
    The problem was in the job-selection phase,
    which picks enough jobs to use all devices.
    It was ignoring GPU exclusions, so for example on
    a 2 GPU system it could pick 2 jobs from a project
    for which 1 GPU is excluded,
    and as a result 1 GPU would be idle.

    Solution: during job selection,
    keep track of GPU usage on a per-instance basis.
    Select a job only if it can run on a non-excluded GPU.

- client: in computing ncprocs_excluded (which is used in
    work fetch policy) don't count exclusions of non-existent devices


svn path=/trunk/boinc/; revision=24316
2011-10-03 03:29:58 +00:00
Charlie Fenton a0096d3ae1 client: Fix compile break on Mac
svn path=/trunk/boinc/; revision=24299
2011-09-27 11:34:18 +00:00
David Anderson 9667ff52a8 - client simulator: fixes
- client: message tweaks


svn path=/trunk/boinc/; revision=24297
2011-09-26 23:34:40 +00:00
David Anderson 7411dd60aa - client: change in the use of GPU available RAM:
- measure the available RAM of each GPU when BOINC starts up.
        If this fails, set available = physical.
        Show available RAM in startup messages.
    - use available RAM rather than physical RAM in selecting
        the "best" GPU instance
    - report available RAM to the scheduler
TODO: change the scheduler to use available rather than physical
    if it's reported


svn path=/trunk/boinc/; revision=24210
2011-09-14 22:45:26 +00:00
David Anderson 7f2a3c0ce1 - client: get GPU available RAM at startup (only)
- client: fix compile warning


svn path=/trunk/boinc/; revision=24188
2011-09-13 22:58:39 +00:00
David Anderson 9856f795ed - client: remove code related to debt-based scheduling
svn path=/trunk/boinc/; revision=24163
2011-09-12 17:57:31 +00:00
David Anderson f81cb82b8e - client: make RR simulation more accurate
by simulating time-slicing explicitly.
    Also simulate changes in project REC
    and hence in scheduling priority.
- client: add a log flag "rrsim_detail" that prints
    time-slice-level info.


svn path=/trunk/boinc/; revision=24161
2011-09-12 17:01:54 +00:00
Charlie Fenton 97f5146f2a define GPU_TYPE_NVIDIA, GPU_TYPE_ATI, use everywhere instead of literal strings "NVIDIA" and "ATI" to ensure uniformity
svn path=/trunk/boinc/; revision=24090
2011-08-31 11:08:13 +00:00
David Anderson 2fa2ae125b svn path=/trunk/boinc/; revision=23979 2011-08-10 17:58:16 +00:00
David Anderson e033c50df6 - client: projects with zero resource share are always lower priority,
for both job sched and work fetch,
    than projects with positive resource share.

svn path=/trunk/boinc/; revision=23946
2011-08-08 00:49:16 +00:00
David Anderson 3f4c207636 - client: fix bug in <exclude_gpu> config option
- client: extend <exclude_gpu> option so that if <device_num> is omitted,
		all GPUs of the given type are excluded.

svn path=/trunk/boinc/; revision=23902
2011-07-29 17:54:49 +00:00
David Anderson 5b159c6735 - remote job submission: bug fix and tweaks
- client: cc_config.xml: if <devnum> is omitted from a <exclude_gpu>,
    it means exclude all instances of that GPU type
- client: if all instances of a GPU type are excluded for a project,
    don't ask the project for jobs of that type


svn path=/trunk/boinc/; revision=23898
2011-07-29 00:07:20 +00:00
David Anderson bb63eba187 - client: show the right prefix for <cpu_sched_debug> messages
svn path=/trunk/boinc/; revision=23845
2011-07-14 16:40:06 +00:00
David Anderson 979e57767e - client: add <rec_half_life_days> config option
svn path=/trunk/boinc/; revision=23843
2011-07-14 16:15:45 +00:00
David Anderson 8ca24cbbab - client, work fetch policy:
adjust project REC by the amount of work queued, to increase variety
    NOTE: at some point I think I had a reason to not do this,
    but I can't remember what it is.
- client, job scheduling policy: fix how project REC is adjusted


svn path=/trunk/boinc/; revision=23838
2011-07-13 19:46:03 +00:00
David Anderson c0417a8aaa - client: fix scheduler bug that treated all CPU jobs
as non-high-priority
	- client: don't print spurious "domino prevention"
		and "thrashing prevention" msgs
	- manager: show project descriptions in same size font
		as the rest of the dialog

svn path=/trunk/boinc/; revision=23831
2011-07-11 05:34:09 +00:00
David Anderson 047fba0e7c - client: add optional <app> elements to <exclude_gpu> config option,
to allow app-level exclusions


svn path=/trunk/boinc/; revision=23778
2011-06-25 17:32:26 +00:00
David Anderson 4403df42d8 - client: add <type> element to <exclude_gpu> config option,
in case of multiple GPU types


svn path=/trunk/boinc/; revision=23777
2011-06-25 05:13:56 +00:00
David Anderson c177d990ea - client: add per-project GPU exclusion.
If you put an element of the form
        <exclude_gpu>
            <url>http://project_url.com/</url>
            <device_num>1</device_num>
        </exclude_gpu>
    in your cc_config.xml, that GPU won't be used for that project


svn path=/trunk/boinc/; revision=23774
2011-06-24 03:33:22 +00:00
David Anderson 94e8c48220 - client: change --detach_phase_two (??) to --detach_console
- eliminate compiler warnings (e.g. shadowed vars)
    in various places, mostly in client


svn path=/trunk/boinc/; revision=23710
2011-06-12 20:58:43 +00:00
David Anderson 365137b3f1 - client: fix boinc_make_dirs() (from Josh Highley)
- client: allow "non_cpu_intensive" to be specified independently
    for different apps in a project.
    This is intended to support projects that use the
    Attic file distribution system,
    which needs to have a daemon running.


svn path=/trunk/boinc/; revision=23610
2011-05-25 21:16:45 +00:00
David Anderson 57a41e14d9 - client: if <ncpus> is specified in config file,
set host_info.p_ncpus to that value,
		so that scheduler requests report that number of CPUs

svn path=/trunk/boinc/; revision=23608
2011-05-25 18:37:08 +00:00
David Anderson 36ba561326 - client: add log messages showing steps in exiting all tasks,
enabled by <task_debug/>
- client: remove redundant task-start messages


svn path=/trunk/boinc/; revision=23566
2011-05-20 05:38:22 +00:00
David Anderson 6d1133fb1d - scheduler: add <user_filter> config option.
If set, and a WU has nonzero batch,
    it is interpreted as a user ID,
    and the job will be sent only to hosts with that user ID.

    Note: the use of workunit.batch is arbitrary;
    we could also use workunit.opaque or other deprecated field.


svn path=/trunk/boinc/; revision=23556
2011-05-17 21:11:39 +00:00
David Anderson 93735f7172 - client: XML-escape the contents of stderr files;
otherwise non-ASCII characters in client_state.xml
    make it invalid XML
- client: fix (I think) to scheduling logic.
    a job is preemptable if it's finished its time slice and
    Old: has checkpointed in last 10 sec
    New: has checkpointed since the end of the time slice


svn path=/trunk/boinc/; revision=23551
2011-05-17 00:31:41 +00:00
David Anderson 8757e07f4f - client: change the handling of account manager replies:
Old:
        If the AM sends us a project we're already attached to,
        and the authenticator is different,
        print an error message and don't change anything.
    Problem:
        If the AM is using weak authenticators,
        and the user has changed their password,
        the weak authenticator changes.
        In this case the AM will send the new weak auth,
        the client will ignore it,
        and all subsequent scheduler RPCs will fail
        until the user removes/adds the project.
    Solution:
        If the AM sends us a new auth for a project, use it.
    Note:
        From the time the password is changed on the project
        to the next AM RPC,
        the client will have a bad weak auth and scheduler RPCs will fail.
        That's OK.

client/
    acct_mgr.cpp

svn path=/trunk/boinc/; revision=23479
2011-04-28 22:10:23 +00:00
David Anderson 3b906a191c - client: generalize the GPU framework so that
- new GPU types can be added easily
		- users can specify GPUs in cc_config.xml,
			referred to by app_info.xml,
			and they will be scheduled by BOINC
			and passed --device N options
			Note: the parsing of cc_config.xml is not done yet.
		- RPC protocols (account manager and scheduler)
			can now specify GPU types in separate elements
			rather than embedding them in tag names
			e.g. <no_rsc>NVIDIA</no_rsc> rather than <no_cuda/>
	- client: in account manager replies, parse elements of the form
		<no_rsc>NAME</no_rsc>
		indicating the GPUs of type NAME should not be used.
		This allows account managers to control GPU types
		not hardwired into the client.
		Note: <no_cuda/> and <no_ati/> will continue to be supported.
	- scheduler RPC reply: add
		<no_rsc_apps>NAME</no_rsc_apps>
		(NAME = GPU name)
		to indicate that the project has no jobs for the indicated GPU type.
		<no_cuda_apps> etc. are still supported 
	- client/lib: remove set_debts() GUI RPC
	- client/scheduler RPC
		remove <cuda_backoff> etc. (superceded by no_app)
		Exception: <ip_result> elements in sched request
		still have <ncudas> and <natis>.
		Fix this later.

	Implementation notes:
	- client/lib: change "CUDA" to "NVIDIA" in type/variable names, and in XML
		Continue to recognize "CUDA" for compatibility
	- host_info.coprocs no longer used within the client;
		use a global var (COPROCS coprocs) instead.
		COPROCS now has an array of COPROCs;
		GPUs types are identified by the array index.
		Index zero means CPU.
	- a bunch of other resource-specific structs (like RSC_WORK_FETCH)
		are now stored in arrays, with same indices as COPROCS
		(i.e. index 0 is CPU)
	- COPROCS still has COPROC_NVIDIA and COPROC_ATI structs to hold vendor-specific info
	- APP_VERSION now has a struct GPU_USAGE to describe its GPU usage

svn path=/trunk/boinc/; revision=23253
2011-03-25 03:44:09 +00:00
David Anderson 3c74717d04 - client simulator stuff
svn path=/trunk/boinc/; revision=23235
2011-03-14 23:56:14 +00:00
David Anderson 73dfafde79 - validator: if --credit_from_wu is set, and no credit specified in WU,
assign zero credit and keep going
- client simulator work


svn path=/trunk/boinc/; revision=23231
2011-03-14 06:27:51 +00:00
David Anderson 3b05dc6203 - scheduler: fix a problem with job resend.
When we first send a job, we pick an app version,
    then call wu_is_infeasible_fast()
    to see if the host is able to run the job with that app version.
    In addition to checking disk space etc.
    this calls wu_is_infeasible_custom() to do project-specific checks
    (e.g. for SETI@home: don't use GPUs for VLAR jobs).

    However, when we resend a job, we pick an app version
    (possibly different from the original one)
    and send the job without any checking.
    So, for example, we might send a VLAR job to a GPU,
    or send a job to a host with insufficient disk space
    (because free space has changed since original send).

    Solution: call wu_is_infeasible_fast() before resending a job,
    and if it returns true, mark the job as done and don't resend it.


svn path=/trunk/boinc/; revision=23098
2011-02-24 19:30:43 +00:00