If a job reports its network usage (via boinc_network_usage()),
keep track of this across episodes of the job, and report it to the server
(some projects may want to give credit for network usage).
Context:
1) Some clients are behing proxies that compress image files
2) We added a preference dont_verify_images that disables
size/MD5 verification of image files, if they're nonempty.
3) If a download finishes, the file is incomplete, and we
read less than 5 KB, we assume that what we read was a proxy
error message, and we truncate it from the file.
Bug: if a project has a small image file,
and a UMTS proxy compresses it to < 5 KB,
3) will truncate it to zero, and 2) will flag it as an error,
and the job will fail.
Fix: don't do 3) if it's an image file and dont_verify_images is set.
Also fixed a bug where, if a job was aborted while not running,
its final CPU and elapsed time weren't copied from ACTIVE_TASK to RESULT,
hence not sent to scheduler
On client startup, decide whether we need to do CPU benchmarks
(cmdline option was set, or we haven't done them for 30 days).
If so, do them when possible.
On second thought, I don't think this is change was desirable.
Currently many projects underestimate rsc_memory_bound,
so lots of jobs would be aborted.
I don't want to force projects to give accurate estimates of RAM usage.
That may not even be possible.
And we already have mechanisms for aborting jobs
for which WSS > available RAM,
and only scheduling sets of jobs whose total WSS is < available RAM
- If AMS supplies resource share, don't override it with
project setting (my last fix didn't quite do this)
- When detach from AMS, set RS to project-supplied value
Inexplicably, the client was comparing a job's working set size
only with the client's overall RAM limit, not with the WU limit.
Check both.
Note: this may require some projects to update their values
of workunit.rsc_memory_bound.
With old (7.15) versions of libcurl, args passed to curl_easy_setopt()
(such as the URL) were supposed to remain unchanged until
the operation was done.
Starting with 7.17 it was changed so that curl_easy_setopt()
copied its arguments.
The BOINC client was assuming the latter.
When linked against the former,
URLs would mysteriously change to garbage strings.
I changed things to work with the old libcurl semantics.
My commit of Feb 7 caused work fetch to project P
to be deferred for up to 5 min if an upload to P is active,
even if some instances are idle.
This was to deal with a case where the idleness was caused
by a jobs-in-progress limit by P,
and work requests lead to long backoff.
However, this can cause instances to be idle unnecessarily.
I changed things so that, if instances are idle,
a work fetch can happen even during upload.
But only one such fetch will be done.
- gpu_active_frac is the fraction of time GPU use is allowed
while the client is running.
Previously the client reported it but we weren't storing it in the DB.
We may need it in the future for batch scheduling logic.
- fix a crashing bug in scheduler
- client: minor message tweak