Commit Graph

1182 Commits

Author SHA1 Message Date
Bruce Allen 40321131e9 Improved wording of message to users about a file scheduled for
deletion by BOINC.  Some users thought that perhaps action was
needed on their part.

svn path=/trunk/boinc/; revision=7191
2005-08-05 12:55:19 +00:00
Bruce Allen a0b30471c8 File deleter: only log message at level CRIT if we fail to
file an output file for a SUCCESSFUL result.  Failure to
find an output file for an UNSUCCESSFUL result is OK, and
just logged at level DEBUG.

svn path=/trunk/boinc/; revision=7184
2005-08-04 08:56:20 +00:00
David Anderson 18bf9ebf22 *** empty log message ***
svn path=/trunk/boinc/; revision=7177
2005-08-04 03:58:00 +00:00
David Anderson 9898cdd8e3 split up scheduler code
svn path=/trunk/boinc/; revision=7171
2005-08-04 03:50:04 +00:00
David Anderson 6fa5d3f7e2 replace wait3(), wait4() with waitpid()
svn path=/trunk/boinc/; revision=7170
2005-08-04 00:12:50 +00:00
Bruce Allen b3d49b64c7 scheduler: update of the resend-lost-work algorithm. Now try and
extend deadline somewhat, or cancel rather than resend work if
it's not feasible.

svn path=/trunk/boinc/; revision=6982
2005-08-02 19:38:43 +00:00
Jeff Cobb 6e87b15913 *** empty log message ***
svn path=/trunk/boinc/; revision=6885
2005-08-01 21:05:51 +00:00
Bruce Allen 6a978c3845 scheduler: don't resend a result to a host if any of the following is true:
[1] WU error flag set
      [2] WU already has canonical result
      [3] (report_deadline - current_time) < 25% of WU delay bound
      If any of these conditions is true, set the report deadline to the
      current time and set the WU transition time to the current time.
      The transitioner will then 'do the right thing'.

svn path=/trunk/boinc/; revision=6871
2005-07-29 22:38:27 +00:00
Bruce Allen a009ee9af7 scheduler: fixed to checkins on 28 July
(1) Put core client version number into wreq BEFORE searching for
          an app version. Problem is that reply.wreq.core_client_version was only being set in
          send_work(), which was too late for the resend_lost_work() part
          of the code.  You might want to move all the initialization of reply.wreq
          out of send_work().   The core client version is needed to see if the
          app is compatible with it when calling get_app_version().
      (2) In retransmitting lost work, do NOT set the deadline to new
          values.  Else the result will never time out!  But DO reset
          the sent_time, to indicate that result was resent.
transitioner:
          In the transitioner, make the next WU transition time be the min
          of deadlines of the in progress results, NOT the min of the
          sent_time+delay bound.  Unless a project wants to do dynamic
          adjustment of delay bounds for in progress results this should be OK.
          CPDN people: I don't think this does any harm for trickles but
          you might want to give it a quick look to be 100% sure.

svn path=/trunk/boinc/; revision=6870
2005-07-29 08:13:23 +00:00
Bruce Allen bedb30b032 In retransmitting lost work, do NOT set the send_time and the deadline to new
values.  Else the result will never time out!  (David, would it be OK to
simply modify the send_time but NOT the deadline?  This would make it easy
to see in the database that the result is being resent.)

svn path=/trunk/boinc/; revision=6868
2005-07-28 22:21:46 +00:00
Bruce Allen 3282d6125d David this is a bug fix for the 'resending lost results' part of the
scheduler.

Problem is that reply.wreq.core_client_version was only being set in
send_work(), which was too late for the resend_lost_work() part
of the code.  You might want to move all the initialization of reply.wreq
out of send_work().   The core client version is needed to see if the
app is compatible with it when calling get_app_version().

svn path=/trunk/boinc/; revision=6867
2005-07-28 15:12:51 +00:00
David Anderson 3f785e8bdd resend lost results
svn path=/trunk/boinc/; revision=6866
2005-07-28 10:13:30 +00:00
Bruce Allen 2e4989c238 Better logging
svn path=/trunk/boinc/; revision=6865
2005-07-28 09:48:12 +00:00
David Anderson 666da72e05 *** empty log message ***
svn path=/trunk/boinc/; revision=6864
2005-07-28 09:43:54 +00:00
David Anderson 4710fe1771 *** empty log message ***
svn path=/trunk/boinc/; revision=6863
2005-07-28 09:29:12 +00:00
David Anderson 793fbf57ee *** empty log message ***
svn path=/trunk/boinc/; revision=6862
2005-07-28 09:00:19 +00:00
David Anderson 3dfea63937 scheduler fix
svn path=/trunk/boinc/; revision=6860
2005-07-28 08:09:46 +00:00
Jeff Cobb e98554319c *** empty log message ***
svn path=/trunk/boinc/; revision=6822
2005-07-26 22:14:55 +00:00
David Anderson bb7f1e24b5 *** empty log message ***
svn path=/trunk/boinc/; revision=6721
2005-07-21 08:55:34 +00:00
David Anderson 511429769c *** empty log message ***
svn path=/trunk/boinc/; revision=6712
2005-07-21 08:24:09 +00:00
David Anderson d16fccdf1e *** empty log message ***
svn path=/trunk/boinc/; revision=6694
2005-07-19 19:33:22 +00:00
David Anderson 6adf04efda *** empty log message ***
svn path=/trunk/boinc/; revision=6684
2005-07-19 19:05:50 +00:00
David Anderson a400b6df5b *** empty log message ***
svn path=/trunk/boinc/; revision=6656
2005-07-17 19:52:44 +00:00
Bruce Allen 4d6193babb - Transitioner would not set a new WU transition time less
than 24 hours away, to prevent thrashing.  But this delayed
      reissuing of new results.  For example if two results were
      issued a hours 17 and 18, and both timed out (no reply). At
      time 17+deadline the first would time out and a new result
      would be issued.  But then instead of setting the transition
      time to 18+deadline it would be set to 18+deadline+1 day.

      To prevent thrashing I have fixed this so that if a transition
      time is in the past, I advance it by TWICE the amount it is late,
      but never less than 1 minute or more than 1 day.

    - Ops pages: show unsent/in-progress results in purple.  For
      unsent results show create time rather than deadline.

svn path=/trunk/boinc/; revision=6637
2005-07-14 20:22:53 +00:00
David Anderson a0c6b937a8 *** empty log message ***
svn path=/trunk/boinc/; revision=6611
2005-07-14 10:02:20 +00:00
David Anderson 21671f42de *** empty log message ***
svn path=/trunk/boinc/; revision=6608
2005-07-14 07:42:35 +00:00
Bruce Allen 03e53d6223 Brought comments into line with what the code actually does.
svn path=/trunk/boinc/; revision=6533
2005-07-06 08:44:44 +00:00
David Anderson e3b9e4d9e0 *** empty log message ***
svn path=/trunk/boinc/; revision=6525
2005-07-05 19:09:42 +00:00
Rom Walton 1e1b77375b *** empty log message ***
svn path=/trunk/boinc/; revision=6510
2005-07-04 21:47:53 +00:00
Rom Walton 1c481d2768 *** empty log message ***
svn path=/trunk/boinc/; revision=6509
2005-07-02 19:01:44 +00:00
David Anderson 814f30d3b7 *** empty log message ***
svn path=/trunk/boinc/; revision=6486
2005-06-29 04:17:28 +00:00
Bruce Allen 285052ce4a locality scheduler: make searches over file names distinguish
lower case and upper case
locality scheduler: when searching for new work using advertised
      files, retry ten times before starting a deterministic search.
      We should probably modify this to try ALL advertised files in
      a random order before moving onto a deterministic search.

svn path=/trunk/boinc/; revision=6482
2005-06-28 20:31:02 +00:00
David Anderson 3a1b32e7d6 *** empty log message ***
svn path=/trunk/boinc/; revision=6466
2005-06-28 05:43:22 +00:00
Bruce Allen 042bfde576 when using locality scheduler, have transitioner or backend
lib advertise data file when new result is created.
code organization: create new lib function boinc_touch_file()
      from code that was in locality scheduler module.

svn path=/trunk/boinc/; revision=6456
2005-06-27 16:31:49 +00:00
David Anderson f0cef4b197 *** empty log message ***
svn path=/trunk/boinc/; revision=6449
2005-06-26 22:23:38 +00:00
David Anderson 483a775065 *** empty log message ***
svn path=/trunk/boinc/; revision=6444
2005-06-26 19:34:17 +00:00
David Anderson 4549700894 *** empty log message ***
svn path=/trunk/boinc/; revision=6435
2005-06-25 17:48:17 +00:00
David Anderson 6722611151 *** empty log message ***
svn path=/trunk/boinc/; revision=6423
2005-06-24 04:34:45 +00:00
David Anderson 6a0176e6c8 *** empty log message ***
svn path=/trunk/boinc/; revision=6415
2005-06-23 07:42:45 +00:00
David Anderson 9f5adb0abc *** empty log message ***
svn path=/trunk/boinc/; revision=6404
2005-06-22 17:42:10 +00:00
David Anderson 213f2b1d1a *** empty log message ***
svn path=/trunk/boinc/; revision=6399
2005-06-22 06:02:59 +00:00
David Anderson 31659992b4 *** empty log message ***
svn path=/trunk/boinc/; revision=6398
2005-06-22 05:24:13 +00:00
David Anderson c1f7d8a890 *** empty log message ***
svn path=/trunk/boinc/; revision=6397
2005-06-22 02:40:14 +00:00
David Anderson 16225c01e8 *** empty log message ***
svn path=/trunk/boinc/; revision=6372
2005-06-17 23:12:00 +00:00
Jeff Cobb 917a5a4b5e *** empty log message ***
svn path=/trunk/boinc/; revision=6342
2005-06-14 17:43:30 +00:00
David Anderson 0ac17c0a7f *** empty log message ***
svn path=/trunk/boinc/; revision=6331
2005-06-12 20:43:59 +00:00
David Anderson 6aa21f5c1f *** empty log message ***
svn path=/trunk/boinc/; revision=6285
2005-06-03 21:39:38 +00:00
David Anderson 359c5de98f *** empty log message ***
svn path=/trunk/boinc/; revision=6282
2005-06-02 21:38:20 +00:00
David Anderson 197db0a3c5 *** empty log message ***
svn path=/trunk/boinc/; revision=6281
2005-06-02 07:04:29 +00:00
David Anderson f35a0a67bd *** empty log message ***
svn path=/trunk/boinc/; revision=6280
2005-06-01 22:41:41 +00:00
David Anderson 3828904a84 *** empty log message ***
svn path=/trunk/boinc/; revision=6270
2005-05-31 21:59:29 +00:00
David Anderson 23380d7e84 *** empty log message ***
svn path=/trunk/boinc/; revision=6255
2005-05-26 20:42:35 +00:00
David Anderson 356f447680 *** empty log message ***
svn path=/trunk/boinc/; revision=6254
2005-05-26 20:25:00 +00:00
David Anderson 3bb938159e *** empty log message ***
svn path=/trunk/boinc/; revision=6253
2005-05-26 20:23:24 +00:00
David Anderson 7b1bb7bc8f *** empty log message ***
svn path=/trunk/boinc/; revision=6232
2005-05-24 04:32:36 +00:00
David Anderson ece2ec37db *** empty log message ***
svn path=/trunk/boinc/; revision=6182
2005-05-17 21:08:48 +00:00
Bruce Allen fe47e56df6 scheduler: use locking to prevent more than one scheduler instance from
running for a given host.  This works by creating a file called
CGI_<HOSTID> in the cgi-bin/ directory, and using Posix advisory file
locking.  I have been testing this code for three days and am seeing
*some* invocations of this.  David, I'll send details to the dev mailing
list or talk with you about it later this week.  Note: this code probably
can be removed in the future, when the core client problems are fixed.
Also note: I don't know if this is compatible with the fast cgi sched.

svn path=/trunk/boinc/; revision=6172
2005-05-17 05:55:24 +00:00
David Anderson e76d620053 *** empty log message ***
svn path=/trunk/boinc/; revision=6133
2005-05-12 21:33:18 +00:00
Bruce Allen 903c361833 scheduler: if host reaches daily result quota and contacts the scheduler, tell
it to delay until a random time falling within the first hour of the following
day.  Previously the host would be told to delay one hour, which could lead to
as many as 24 retries in a one-day period.

svn path=/trunk/boinc/; revision=6132
2005-05-12 21:04:39 +00:00
David Anderson 1103eac5c8 *** empty log message ***
svn path=/trunk/boinc/; revision=6129
2005-05-12 00:32:03 +00:00
Bruce Allen 61efb5a027 Added comment and some E@H specific stuff.
svn path=/trunk/boinc/; revision=6097
2005-05-10 19:23:40 +00:00
David Anderson d18861e5e7 *** empty log message ***
svn path=/trunk/boinc/; revision=6092
2005-05-10 17:04:13 +00:00
David Anderson c219dedb19 *** empty log message ***
svn path=/trunk/boinc/; revision=6082
2005-05-09 20:20:33 +00:00
David Anderson 57f2da16f9 *** empty log message ***
svn path=/trunk/boinc/; revision=6045
2005-05-05 20:42:06 +00:00
Bruce Allen 6cb7ecb8c5 bug fix: with locality scheduling, permit multiple requests
to make work for same file. Bug introduced April 11, 2005.

svn path=/trunk/boinc/; revision=6024
2005-05-04 17:17:42 +00:00
Bruce Allen 835c2090f5 log execution times for two cgi scripts (scheduler and
file_upload_handler)

better print format for timezone

svn path=/trunk/boinc/; revision=6023
2005-05-04 16:31:25 +00:00
Bruce Allen d843372af7 Clearer wording of feedback message to user
svn path=/trunk/boinc/; revision=6010
2005-05-04 04:34:59 +00:00
Bruce Allen d839c2a8d8 ignore fields p_fpop_err in scheduler requests (still there from
4.19 core clients) else these generate lots of logfile noise.
David, please revert if you don't like it.

svn path=/trunk/boinc/; revision=6009
2005-05-04 04:26:58 +00:00
David Anderson 6971fddbde *** empty log message ***
svn path=/trunk/boinc/; revision=6003
2005-05-03 21:50:51 +00:00
Bruce Allen f76184d29e locality scheduling: if host resources are inadequate for ANY WU,
assume that they are inadequate for ALL WU.  Without this we will
execute an expensive deterministic search over all WU, looking
for one that is appropriate.  This could be a config option if
desired, or one might add in an extra search step to find WU with
appropriate resources.  But for now this is the cleanest.

svn path=/trunk/boinc/; revision=5999
2005-05-02 21:14:24 +00:00
David Anderson 845e4c09fa *** empty log message ***
svn path=/trunk/boinc/; revision=5993
2005-05-01 04:35:22 +00:00
David Anderson d8a43ac0fe *** empty log message ***
svn path=/trunk/boinc/; revision=5971
2005-04-29 06:55:44 +00:00
David Anderson 709ef2675c *** empty log message ***
svn path=/trunk/boinc/; revision=5911
2005-04-21 05:48:00 +00:00
Bruce Allen dbeedc0623 Tweaks
svn path=/trunk/boinc/; revision=5894
2005-04-19 19:51:45 +00:00
Bruce Allen d45bc3b42d A bit of further simplification
svn path=/trunk/boinc/; revision=5892
2005-04-19 16:35:59 +00:00
Bruce Allen 2f80ff3793 rework of file_upload_handler. I learned that is it not
reliable to use flock/lockf/fnctl file locking with buffered
IO.  This is because the stream libraries might unexpectedly
open/close/dup file descriptors on you.  So I have modified
the file write/append functions to use raw IO rather than
buffered IO.  In doing this I also found and fixed some small
bugs. There is no guarantee that one can mix flock/lockf/fnctl
file locking so I have settled on fnctl since it is POSIX and
gives the most control.

svn path=/trunk/boinc/; revision=5891
2005-04-19 14:30:07 +00:00
David Anderson 1c119cb037 *** empty log message ***
svn path=/trunk/boinc/; revision=5889
2005-04-18 18:42:29 +00:00
Bruce Allen 7a4a2a81f5 Einstein@Home-specific compile fix for new prototype
svn path=/trunk/boinc/; revision=5887
2005-04-18 18:12:21 +00:00
David Anderson 647c8122b3 *** empty log message ***
svn path=/trunk/boinc/; revision=5886
2005-04-18 17:54:03 +00:00
David Anderson 5a844bff5d *** empty log message ***
svn path=/trunk/boinc/; revision=5885
2005-04-18 05:37:31 +00:00
Bruce Allen d719fcfb88 file_upload_handler: fixed another bug. If you fopen(path, "a") in
append mode then fseek() then write to the file, the fseek() HAS
NO EFFECT.  This is documented ANSI C.  So I have eliminated the
fseek.  We now check that the file size corresponds exactly to the
claimed offset of the data.  If they do not agree then return a
transient error to force the host to ask again for the file length
and re-transmit data.

svn path=/trunk/boinc/; revision=5866
2005-04-15 19:44:26 +00:00
David Anderson 05ece15a25 *** empty log message ***
svn path=/trunk/boinc/; revision=5860
2005-04-15 18:43:53 +00:00
Bruce Allen 314c3b3d88 - file_upload_handler: when responding to a request for the
file length, check first that the file is not already
in open (locked) by another file_upload_handler.  If the
file IS open (locked), then do NOT hand back the file length.
Instead return a transient error. This will prevent
transmission of upload data starting at the wrong offset.

- To help understand when/why multiple file_upload_handlers
are trying to write to the same file, set default log level
to DEBUG.  Also log messages at level CRITICAL if there is
an attempt to write to a locked file. We may want to change
this level to DEBUG in the future, if this turns out to be
'normal' TCP buffering of data between host and server.

svn path=/trunk/boinc/; revision=5851
2005-04-14 18:01:54 +00:00
David Anderson 34bd6778d6 *** empty log message ***
svn path=/trunk/boinc/; revision=5841
2005-04-12 22:53:35 +00:00
David Anderson 1b0439c9a9 *** empty log message ***
svn path=/trunk/boinc/; revision=5840
2005-04-12 21:54:40 +00:00
Bruce Allen 4f2f6d4011 File upload handler: to prevent multiple instances of file_upload_handler
from trying to upload the SAME file, use lockf() to place an advisory lock on
the file.  David, I probably should have discussed this with you first, but it's
too early in the morning.  Please revert if this is a mistake!

svn path=/trunk/boinc/; revision=5837
2005-04-12 14:34:07 +00:00
Bruce Allen b9d649fbbc Scheduler: with locality scheduling, if we touch a trigger file then
sleep, and then try again, but DON'T find more work available, give up
trying to make work for that file.

svn path=/trunk/boinc/; revision=5836
2005-04-12 01:39:01 +00:00
Bruce Allen dbed4d264c Added one more PID to log file
svn path=/trunk/boinc/; revision=5825
2005-04-11 16:14:56 +00:00
Bruce Allen 48a37d0cd2 Added signal handler to file_upload_handler along with a bit
of logging.  This is intended to help debug file uploading
problems, where apache kills the file upload handler because
something is going wrong.

svn path=/trunk/boinc/; revision=5824
2005-04-11 09:00:50 +00:00
David Anderson 5fa6e0ec46 *** empty log message ***
svn path=/trunk/boinc/; revision=5794
2005-04-07 20:46:25 +00:00
David Anderson 7a6caef6cb *** empty log message ***
svn path=/trunk/boinc/; revision=5754
2005-04-01 22:30:08 +00:00
David Anderson 3bc9adca43 *** empty log message ***
svn path=/trunk/boinc/; revision=5747
2005-03-30 22:38:37 +00:00
David Anderson 99ef0b7b37 *** empty log message ***
svn path=/trunk/boinc/; revision=5738
2005-03-30 06:36:11 +00:00
David Anderson cfa55b2724 *** empty log message ***
svn path=/trunk/boinc/; revision=5736
2005-03-30 05:15:54 +00:00
David Anderson 0567b9caa2 *** empty log message ***
svn path=/trunk/boinc/; revision=5731
2005-03-29 20:07:58 +00:00
David Anderson 07dc396e04 *** empty log message ***
svn path=/trunk/boinc/; revision=5697
2005-03-22 05:30:32 +00:00
David Anderson e057c05dfa *** empty log message ***
svn path=/trunk/boinc/; revision=5696
2005-03-21 19:57:44 +00:00
Bruce Allen b2ec895c7a In reviewing CVS diffs, I see that I stepped on a change. This fixes it.
svn path=/trunk/boinc/; revision=5690
2005-03-19 18:40:11 +00:00
Bruce Allen 58f5b86288 - Overdue checkins on a bunch of minor scheduler code. Some that is
E@H specific is now included (but protected by
      #ifdef EINSTEIN_AT_HOME
      to make it simpler for me to maintain consistency with BOINC cvs.
    - Added project-specific unacceptable_os() function for rejecting hosts.
    - Transitioner and scheduler now initalize host.max_results_day correctly
      in database under all circumstances.
    - Browser requests are now correctly identifed (REQUEST_METHO=="GET") and
      properly redirected.  This was broken. David, please see comment near
      one of the probable_user_browser=true in handle_request.C.  I think
      something is wrong here (or I am missing the point!).
    - More info about requests is logged
    - If the scheduler hangs (incoming request incomplete) it will normally be
      killed by Apache after a timeout.  But this happens silently.  So I now
      install a signal handler and catch this SIGTERM.  In this case an
      error message is logged and all open files are flushed before exit(1)ing.
    - If IO is passed through files, check that request length and content length
      agree and log a message if they do NOT.
    - active_frac not correctly reported by 4.19 and earlier core clients.
      Adjust for this in estimating wallclock execution times.
    - Added a small block into validator code to attach a debugger.

svn path=/trunk/boinc/; revision=5688
2005-03-19 18:24:24 +00:00
Bruce Allen 50bd7802a4 Insert #ifdef'ed out block to attach debugger to the validator.
svn path=/trunk/boinc/; revision=5685
2005-03-19 16:03:21 +00:00
David Anderson 71c9615182 *** empty log message ***
svn path=/trunk/boinc/; revision=5657
2005-03-14 07:04:06 +00:00
David Anderson 46b0941447 *** empty log message ***
svn path=/trunk/boinc/; revision=5650
2005-03-13 20:10:03 +00:00
David Anderson e18a297017 *** empty log message ***
svn path=/trunk/boinc/; revision=5625
2005-03-10 22:05:42 +00:00
David Anderson c5761218cc *** empty log message ***
svn path=/trunk/boinc/; revision=5613
2005-03-09 20:51:15 +00:00
David Anderson 7300ca2b0d *** empty log message ***
svn path=/trunk/boinc/; revision=5612
2005-03-09 20:40:57 +00:00
David Anderson 3b3cd0f240 *** empty log message ***
svn path=/trunk/boinc/; revision=5577
2005-03-07 23:15:53 +00:00
Bruce Allen 57d412e804 messages containing newlines were being lost when sent to 4.19
core clients. Fix strips newlines from messages sent to clients
<= 4.19.  NOTE: stripping may ALSO be needed for more recent
clients.  But it would be better to fix the clients so that
embedded newlines in messages are respected.

svn path=/trunk/boinc/; revision=5543
2005-02-28 21:58:27 +00:00
David Anderson b152c3f453 *** empty log message ***
svn path=/trunk/boinc/; revision=5530
2005-02-26 00:24:37 +00:00
David Anderson 29e77cf1f0 *** empty log message ***
svn path=/trunk/boinc/; revision=5506
2005-02-23 19:44:59 +00:00
David Anderson d309b4d3e7 *** empty log message ***
svn path=/trunk/boinc/; revision=5503
2005-02-23 06:19:20 +00:00
David Anderson 20656a03df *** empty log message ***
svn path=/trunk/boinc/; revision=5499
2005-02-23 00:11:59 +00:00
David Anderson 41fb9a9e8c *** empty log message ***
svn path=/trunk/boinc/; revision=5496
2005-02-22 20:12:31 +00:00
Bruce Allen 0f6202fc9e When daily result quota exceeded, tell users what its value is for that host.
svn path=/trunk/boinc/; revision=5493
2005-02-22 17:53:17 +00:00
Bruce Allen b3f75a8aee - Bug fixes to scheduler code
- For locality scheduler, if anonymous platform lacks app, don't do deterministic
      search for work!
    - For locality scheduler, remove 'unsent' constraint from initial query so that
      existing index in result table can be used to perform a more efficient search.
    - Send multi-message replies to core clients > 4.19
    - Change 'no work available' message to 'no work sent' since this is often due
      to constraints at the client end, NOT lack of work at project end.

svn path=/trunk/boinc/; revision=5492
2005-02-22 17:37:03 +00:00
Bruce Allen 964d34b0e0 Correctly handle case where anonymous platform does NOT have a suitable
app.  Previously the code would do an exhaustive search of every unsent
result.

svn path=/trunk/boinc/; revision=5490
2005-02-22 04:38:09 +00:00
Bruce Allen f27abb4ea9 Break out of deterministic search if no work needed because we have
(for example) violated cpu, disk or mem limits.

svn path=/trunk/boinc/; revision=5488
2005-02-21 22:48:53 +00:00
Bruce Allen bca7853358 Eliminate a constraint from the query in the interest of efficiency. The
alternative is to add another index on (name, server_state) to the
result table.

svn path=/trunk/boinc/; revision=5487
2005-02-21 22:32:38 +00:00
Bruce Allen 73a99d6d17 Fixed a bug in locality scheduling. When old work was being sent,
the daily_result_quota constraint was not being enforced.
Normally this constraint is enforced in the work_needed()
function.  However note that the critical send_work() function
NEVER checks work_needed() [DAVID, perhaps it should?] before
calling send_work_locality() or scan_work_array().  Then, when
send_work_locality() was called, it would in turn call
send_old_work() immediately, WITHOUT checking to see if
work_needed() was TRUE.  This allowed the daily_result_quota
constraint to be broken.

    Possible fixes included:
      test work_needed() before calling send_old_work()
      test work_needed() WITHIN send_old_work()
      test work_needed() within possibly_send_result()
      test work_needed() within wu_is_infeasible()

Conclusion: work is ONLY sent by the function
possibly_send_result() which is called in two places in
sched_locality.C: once in send_results_for_file() and once in
send_old_work().  The first of these DOES check the value of
work_needed().  The second does NOT.  So I added a check of
work_needed() within send_old_work().  A also added
added another check of work_needed() at the top of
send_results_for_file() BEFORE any DB access is done.  It might be
better to put this test of work_needed() lower down (within
possibly_send_result()) or higher up (where send_old_work())
is called.  I am not sure. David, I'd appreciate your advice.

svn path=/trunk/boinc/; revision=5482
2005-02-20 14:19:12 +00:00
Bruce Allen e35fe95365 Oops, style
svn path=/trunk/boinc/; revision=5468
2005-02-17 22:04:10 +00:00
Bruce Allen e5cc67c06d make daily_result_quota be PER CPU with a hardwired limit of
4 CPUS.
Improved error messages if users are being denied work because of
      lack of CPU.  The message reports back their on fraction, active
      fraction, and resouce share fraction, as percentages.

svn path=/trunk/boinc/; revision=5466
2005-02-17 21:58:40 +00:00
Bruce Allen bc7a5cf597 Reduced redundant verbosity in debug mode
svn path=/trunk/boinc/; revision=5453
2005-02-17 03:17:49 +00:00
David Anderson 8d0ab453b3 *** empty log message ***
svn path=/trunk/boinc/; revision=5443
2005-02-16 23:17:43 +00:00
Bruce Allen 15c5fd2f11 Add curly brackets a la David
svn path=/trunk/boinc/; revision=5439
2005-02-16 01:26:43 +00:00
Bruce Allen 52d0c274c1 More sensible use of request_delay. If a host contacts the
scheduler, and fails to get work because there are N secs
      of pending work, then send a delay request of min(3600, N/5) secs.
      Otherwise the same host was coming back every hour, without being able
      to get additional work.
Implemented by adding a method set_delay() to
      SCHEDULER_REQUEST. This sets the delay to the maximum of the
      previous requested delay or the current requested delay. The
      delay is NEVER set longer than two days.

svn path=/trunk/boinc/; revision=5437
2005-02-16 01:14:12 +00:00
Bruce Allen e7e9d6d9a6 - Scheduler changes (global):
- Ignore CPU limitations and resource share entirely, IF
      a host:
        (1) has no work for this project
        (2) has no results in this sched reply
      This ensures that any host that wants to do work will at least
      get *something*. It liberalizes slightly David A's approach
      from 14 Feb 2005. Eliminate use_time_stats from wreq structure.
    - Scheduler changes (locality scheduling only):
    - Improve return value info for some functions.
    - Modify send_old_work() to accept a t_min < t < t_max time range
    - New sched locality algorithm to send work to hosts with no files.
      Send oldest result in the time range A < t < B where
      B = locality_scheduling_timeout/2
      A = B - rand*locality_scheduling_timeout/2
      Here rand is a uniformly distributed random number in [0,1].
    - When an unsent result is older than locality_scheduling_timeout, no
      longer send it to the FIRST host that requests work.  Instead send
      it to the first host which has a connection speed > 100kb/s.
    - Fix file deletion.  Previously we were deleting files from hosts
      when they got no work for that file.  But this might have been
      because the work was infeasible (cpu time).  Now delete files
      from host ONLY if there is no work remaining for that file.

svn path=/trunk/boinc/; revision=5434
2005-02-15 21:18:20 +00:00
David Anderson c825780c5a *** empty log message ***
svn path=/trunk/boinc/; revision=5426
2005-02-14 20:11:01 +00:00
David Anderson 0ddf2ed101 *** empty log message ***
svn path=/trunk/boinc/; revision=5423
2005-02-14 04:39:07 +00:00
David Anderson 01326be47f *** empty log message ***
svn path=/trunk/boinc/; revision=5419
2005-02-13 19:04:20 +00:00
Bruce Allen 8884984105 Fix typo in print format, improve wording of error message, properly indent
comment

svn path=/trunk/boinc/; revision=5418
2005-02-13 15:54:24 +00:00
Bruce Allen 7a68df5b2a Got rid of annoying 'no <host_venue>' tag messages from scheduler
svn path=/trunk/boinc/; revision=5399
2005-02-11 05:45:49 +00:00
Bruce Allen b193f36131 Sched locality change: if the host does not have enough memory to satisfy
a work request, do not search for or send further work.  This is the same
      way that disk space limits are handled.  This is necessary since otherwise
      a host with small memory will endlessly trigger the WU generator, churning
      out infeasible WUs.
Added boolean arg to host_has_file() following David A's advice. This
      eliminates the 'expensive' copy of a large data structure. The bool arg
      makes host_has_file() skip the final WU in the vector in hunting for a file.
Better log message for setting coredump size.
Added RCSID tag to sched_timezone.C

svn path=/trunk/boinc/; revision=5397
2005-02-11 04:00:51 +00:00
David Anderson 0aa720e8e1 *** empty log message ***
svn path=/trunk/boinc/; revision=5390
2005-02-10 20:31:11 +00:00
Eric J. Korpela c05d6d23a0 Because FCGI doesn't support fscanf() and fgetc(), the FILE pointers need to be
wrapped in a call to FCGI_ToFILE().  In the case where FCGI isn't being used
FCGI_ToFILE(x) is defined to (x).

svn path=/trunk/boinc/; revision=5387
2005-02-10 19:39:37 +00:00
Bruce Allen 5e98d1457d Added code to the scheduler so that it will dump core on SEGV. This
is disabled by default.  Having this
is really useful if the scheduler is crashing some of the time.  You
can load the core dump file into a debugger to see where things are
breaking.  To use this, edit sched/main.C by hand and set
#define DUMP_CORE_ON_SEGV 1

svn path=/trunk/boinc/; revision=5385
2005-02-10 16:50:37 +00:00
Bruce Allen 0bc36dd60d Remove left over debug scaffolding; need to check ENTIRE filename
not merely part of it! Always good to review the CVS diffs after
a commit...

svn path=/trunk/boinc/; revision=5383
2005-02-10 06:31:33 +00:00
Bruce Allen feb50863c2 More sched locality and other scheduler changes.
- Address David's comment of Feb 2.  Now properly reduce the
disk size resource requirements of a WU being sent if the
file is already on the host, or already included in a previous
WU being sent. DAVID: please check that reply_copy.wus.pop_back()
is right.
- For this, define a function host_has_file().  This can also
be used in the future for more intelligent file deletion
schemes.
- Make warnings to upgrade old clients have low priority until
3 days before deadline.  Then high priority.
- Fix sign error in messages sent to users about insufficient
disk space.
- Move extract_filename() from sched_locality.C to sched_util.C
- Pretty up the ordered list of URLs printed for a given host.
- I've even tested these changes before committing them!

svn path=/trunk/boinc/; revision=5382
2005-02-10 06:21:58 +00:00
David Anderson 36ed6019c2 *** empty log message ***
svn path=/trunk/boinc/; revision=5380
2005-02-09 23:49:46 +00:00
David Anderson 7df0115850 *** empty log message ***
svn path=/trunk/boinc/; revision=5376
2005-02-09 20:06:15 +00:00
Bruce Allen ac9b8547e3 inserted comment unintentionally!
svn path=/trunk/boinc/; revision=5372
2005-02-09 04:43:30 +00:00
Bruce Allen 3fecacdf78 Missing space
svn path=/trunk/boinc/; revision=5371
2005-02-09 04:42:03 +00:00
Bruce Allen 84a2eb306e Added new tag pair to config.xml:
<min_core_client_version_announced> N </min_core_client_version_announced>
<min_core_client_upgrade_deadline>  M </min_core_client_upgrade_deadline>
This is used to warn users in advance if a new minimum core client is going
to be required.  Users have until time 'M' (Unix epoch time(2) format)
to upgrade. Not yet tested.

svn path=/trunk/boinc/; revision=5370
2005-02-09 04:38:19 +00:00
David Anderson d01e0c50ab *** empty log message ***
svn path=/trunk/boinc/; revision=5363
2005-02-08 19:54:10 +00:00
Bruce Allen 3b99622e22 Well, the comment was worth keeping...
svn path=/trunk/boinc/; revision=5358
2005-02-08 07:07:19 +00:00
Bruce Allen d0098e38f3 Bug fix: method of determining which download site to point a host to
computing timezone differences, not taking into account the fact that
UTC+11 hours and UTC-11 hours are only 2 hours apart.  Duh.

svn path=/trunk/boinc/; revision=5357
2005-02-08 06:39:06 +00:00
David Anderson b961c2ce3d *** empty log message ***
svn path=/trunk/boinc/; revision=5349
2005-02-08 00:39:05 +00:00
David Anderson 694ae2973e *** empty log message ***
svn path=/trunk/boinc/; revision=5341
2005-02-07 06:24:14 +00:00
David Anderson daa7c4559d *** empty log message ***
svn path=/trunk/boinc/; revision=5335
2005-02-06 21:26:21 +00:00
David Anderson 981799643c *** empty log message ***
svn path=/trunk/boinc/; revision=5284
2005-02-02 22:58:46 +00:00
Bruce Allen 21e1990508 Made the caching of md5 info for source files a configuration option in
config.xml.  Use the boolean tag <cache_md5_info> to enable it.
This prevents the work generation library from having to go back and
continuously regenerate the md5 sums of your input data files.  Note
that reading these from disk can be expensive if you have many such files
that are large and that you re-use. See check-in notes from 30/31 Dec 2004
for some details.

svn path=/trunk/boinc/; revision=5281
2005-02-02 21:57:11 +00:00
Bruce Allen e5058d872f Correct typo in warning message, and improve comment
svn path=/trunk/boinc/; revision=5276
2005-02-02 19:31:40 +00:00
Bruce Allen a27705fd59 Improvements to the file deletion mechanism. Now try removing files if
no work was sent to hosts, and available space<0 OR if available space>0
      but work was unfeasible because the disk bound requirements of the work
      exceeded the available space.
Added a new config.xml boolean element called 'choose_download_url_by_timezone'
      This requires that projects provide a 2-column file in the project root named
      'download_servers'.  An example is:
           3600   http://einstein.aei.mpg.de
         -21600   http://einstein.phys.uwm.edu
      The first column is offset from UTC in seconds, and the second column is the URL
      of the download server.  When enabled, the scheduler will replace the download
      path for data and executables by a list of download URLs, ordered by proximity
      to the host's timezone.  The download path must start with the
      BOINC default download/ and the different download servers must have identical
      file paths under download/, in other words they must be mirrored.

svn path=/trunk/boinc/; revision=5275
2005-02-02 18:13:00 +00:00
Bruce Allen 02d0ac6fd8 Don't send an empty message if there is no message to send.
svn path=/trunk/boinc/; revision=5274
2005-02-02 15:16:59 +00:00
Bruce Allen 1d9d71cce4 Fixed trivial bug in scheduler which caused messages sent to clients
< 4.62 to be interchanged with their priority.  So if the message was
supposed to be 'No work available' with priority 'low', the actual

svn path=/trunk/boinc/; revision=5273
2005-02-02 14:43:22 +00:00
David Anderson 5b015af00f *** empty log message ***
svn path=/trunk/boinc/; revision=5264
2005-02-01 20:30:33 +00:00
David Anderson 4a0fb78aa6 *** empty log message ***
svn path=/trunk/boinc/; revision=5258
2005-01-31 23:20:49 +00:00
David Anderson 896d0b8a46 *** empty log message ***
svn path=/trunk/boinc/; revision=5257
2005-01-31 22:19:03 +00:00
Bruce Allen 8b6402cf21 More of the same, for reviewing by David
svn path=/trunk/boinc/; revision=5251
2005-01-31 19:34:43 +00:00
Bruce Allen 60c569a644 Extended scheduler run-time debug option to include writing of requests as
well as replies to a file.

svn path=/trunk/boinc/; revision=5248
2005-01-31 16:10:49 +00:00
Bruce Allen c4376b235c - scheduler changes: if host is not getting any work because available
disk space is < 0, delete files which have <sticky> and <report_on_rpc>
      set.  Note that (1) this deletion simply removes the <sticky> tag, so
      file won't be deleted until after all WU that depend upon it are
      completed and (2) the mechanism to determine which file to delete
      could be improved. TODO: improve messages to hosts which have no file
      space and ALSO have no files to delete.

- scheduler changes: locality scheduling.  Clean up code which makes a
      deterministic search of results to delete.  Data files names can not
      contain the "~" character!

- scheduler changes: added a simple debugging mechanism for scheduler
      replies.  If you touch a file named 'debug_sched' in the project
      root, then files called sched_reply_HOSTID_RPCNO will be created
      under cgi-bin/ which contain the scheduler replies.  You can turn on
      this mechanism for some time to study the scheduler replies.
      In a little while I will add a similar debugging feature which also
      prints the corresponding scheduler requests.

svn path=/trunk/boinc/; revision=5247
2005-01-31 11:45:45 +00:00
David Anderson 09d0878732 *** empty log message ***
svn path=/trunk/boinc/; revision=5244
2005-01-29 23:29:54 +00:00
David Anderson 3521428f85 *** empty log message ***
svn path=/trunk/boinc/; revision=5234
2005-01-28 18:27:00 +00:00
David Anderson 08b22711f2 *** empty log message ***
svn path=/trunk/boinc/; revision=5230
2005-01-28 00:48:05 +00:00
David Anderson e1c65eb341 *** empty log message ***
svn path=/trunk/boinc/; revision=5228
2005-01-27 23:09:19 +00:00
David Anderson 90b9a9a001 *** empty log message ***
svn path=/trunk/boinc/; revision=5221
2005-01-27 18:44:32 +00:00
David Anderson 05c9c5d782 *** empty log message ***
svn path=/trunk/boinc/; revision=5215
2005-01-27 00:34:35 +00:00
David Anderson cc63aaf090 *** empty log message ***
svn path=/trunk/boinc/; revision=5182
2005-01-21 07:54:15 +00:00
David Anderson 435f8edd47 *** empty log message ***
svn path=/trunk/boinc/; revision=5161
2005-01-20 23:22:22 +00:00
David Anderson 06773fb728 *** empty log message ***
svn path=/trunk/boinc/; revision=5158
2005-01-20 19:07:18 +00:00
David Anderson c5d4a375b8 *** empty log message ***
svn path=/trunk/boinc/; revision=5157
2005-01-20 19:03:03 +00:00
David Anderson b7a7cd825f *** empty log message ***
svn path=/trunk/boinc/; revision=5151
2005-01-20 18:50:49 +00:00
David Anderson 367a4426ca *** empty log message ***
svn path=/trunk/boinc/; revision=5147
2005-01-20 06:11:03 +00:00
David Anderson 1f5ef06046 *** empty log message ***
svn path=/trunk/boinc/; revision=5140
2005-01-19 05:34:18 +00:00
David Anderson a65c68db19 *** empty log message ***
svn path=/trunk/boinc/; revision=5139
2005-01-18 23:35:53 +00:00
David Anderson cc9c0a6341 *** empty log message ***
svn path=/trunk/boinc/; revision=5135
2005-01-18 19:56:18 +00:00
Bruce Allen 4746ea019f - Additional work on locality scheduling.
(a) make DB queries more efficient using name>'FILE__' and name<'FILE__~' rather than
          name like 'FILE__%'
      (b) Set 'no remaining work for this file' flag correctly by making a DB scan if needed.
          One can show that this is the 'cheapest' reliable place to put this scan.
      (c) Modify deterministic algorithm for finding unsent results so that instead of
          starting with FILE="" and scanning forward over all files, it starts at a random
          place in file space, scans cyclicly to the end, and then from "" to the start
          point.
      (d) Satisfy work request if possible.  Don't terminate sending work until none left that
          is feasible, or request satisfed.
      (e) If a new file is needed, first pick file associated with unsent results which are more
          than 2 hours old.  Note: need to make this a user-configurable option, and add some
          random +- slack.

       For the record, here is the current locality scheduler logic.
       I will update the docs once this is a bit better tested and
       stable.

      (1) If there is an (one) unsent result which is older than
      (1) config.locality_scheduling_send_timeout (7 days) and is
      (1) feasible for the host, sent it.

      (2) If we did send a result in the previous step, then send any
      (2) additional results that are feasible for the same input file.

      (3) If additional results are needed, step through input files on
      (3) the host.  For each, if there are results that are feasible for
      (3) the host, send them.  If there are no results that are feasible
      (3) for the host, delete the input file from the host.

      (4) If additional results are needed, and there is (one) unsent
      (4) result which is older than 2 hours and is feasible for the
      (4) host, send it.

      (5) If we did send a result in the previous step, then send any
      (5) additional results that are feasible for the same input file.

      (6) If additional results are needed, select an input file name at
      (6) random from the current input file working set advertised by
      (6) the WU generator.  If there are results for this input file
      (6) that are feasible for this host, send them.

      (7) If additional results are needed, carry out an expensive,
      (7) deterministic search for ANY results that are feasible for the
      (7) host.  This search starts from a random filename advertised by
      (7) the WU generator, but continues cyclicly to cover ALL results
      (7) for ALL files. If a feasible result is found, send it.  Then
      (7) send any additional results that use the same input file.  If
      (7) there are no feasible results for the host, we are finished:
      (7) exit.

      (8) If addtional results are needed, return to step 4 above.

svn path=/trunk/boinc/; revision=5129
2005-01-17 19:20:56 +00:00
David Anderson 335af90e5f *** empty log message ***
svn path=/trunk/boinc/; revision=5122
2005-01-14 21:21:04 +00:00
David Anderson aa1fceb978 *** empty log message ***
svn path=/trunk/boinc/; revision=5120
2005-01-14 03:32:16 +00:00
Bruce Allen b3ca6c771c Not incrementing nsent correctly
svn path=/trunk/boinc/; revision=5114
2005-01-13 23:24:49 +00:00
Bruce Allen dd0ff1ac2b - More work on sched_locality.C. Note that the 'wacky' warning is
actually not impossible.  Consider the following scenario: WU A
has result 1 and WU B has result 2.  These are both sent to a
host.  Some time later, result 1 fails and the transitioner
creates a new result, result 3 for WU A.  Then the host requests
a new result.  The maximum result already sent to the host is 2.
The next unsent result (sorted by ID) is #3.  But since it is
for WU A, and since the host has already gotten a result for WU
A, it's infeasible.  So I think this is only wacky if
!one_wu_per_result_per_host.

- David, I simplified the inner part of send_results_for_file()
somewhat.  I can't see the need/use for the bool bool
in_working_set argument.  If I have really screwed the pooch
please revert.

svn path=/trunk/boinc/; revision=5106
2005-01-13 17:33:29 +00:00
Bruce Allen 3d5ea7f3c4 Embedded comment describing start/end transaction bug. I'm too 'BOINCed'
to fix it.  David, your turn.

svn path=/trunk/boinc/; revision=5089
2005-01-12 22:32:42 +00:00
Bruce Allen 89028b1701 Fixed two bugs, one trivial, the other nasty.
Trivial bug, FPE on n % 0 when host has no files.
Hard bug, in the deterministic search to find a new result that can
be sent, the upwards search on name must be done not by comparing
RESULT name to FILENAME, but instead by comparing result name to the
maximal lexical resultname that can be constructed from the
filename, which is filename_ZZZ...Z where Z==0xff.

svn path=/trunk/boinc/; revision=5085
2005-01-12 21:04:25 +00:00
Bruce Allen 453b0b33f0 David, please check these diffs. In particular, I don't think we should
flag a file as over unless the WU generator has already indicated that
no further work can be remaining.  Search code for 'David' to find some
comments.

svn path=/trunk/boinc/; revision=5077
2005-01-12 10:46:44 +00:00
David Anderson 9602ccf95c *** empty log message ***
svn path=/trunk/boinc/; revision=5074
2005-01-12 01:21:45 +00:00
David Anderson 2cdb9fc3ef *** empty log message ***
svn path=/trunk/boinc/; revision=5073
2005-01-12 00:50:32 +00:00
David Anderson 4412f6a329 *** empty log message ***
svn path=/trunk/boinc/; revision=5072
2005-01-11 20:33:19 +00:00
David Anderson 71fec1defe *** empty log message ***
svn path=/trunk/boinc/; revision=5070
2005-01-11 05:18:34 +00:00
Bruce Allen 8addf5b6f9 install a larger buffer for stdout. This ensures that
log information from different scheduler requests running
in parallel don't collide in the log file and appear
intermingled. Very useful when doing verbose debugging.

svn path=/trunk/boinc/; revision=5069
2005-01-11 02:38:15 +00:00
Bruce Allen fa7399b26f Clean up, and one (perhaps) uninitialized variable
svn path=/trunk/boinc/; revision=5067
2005-01-10 22:22:00 +00:00
Bruce Allen b52c391f41 Typo
svn path=/trunk/boinc/; revision=5066
2005-01-10 22:16:45 +00:00
Bruce Allen 694c740e9c Cleaner and more effective approach (and in addition, it appears to work).
svn path=/trunk/boinc/; revision=5057
2005-01-10 01:40:14 +00:00
David Anderson 504957c0bd *** empty log message ***
svn path=/trunk/boinc/; revision=5054
2005-01-10 00:00:42 +00:00
David Anderson 505a0c15c8 *** empty log message ***
svn path=/trunk/boinc/; revision=5051
2005-01-09 22:57:59 +00:00
David Anderson e72fc28b13 *** empty log message ***
svn path=/trunk/boinc/; revision=5050
2005-01-09 22:43:02 +00:00
Bruce Allen fcfbb7d7a5 typo
svn path=/trunk/boinc/; revision=5049
2005-01-09 22:41:44 +00:00
Bruce Allen a3aa7eafaa printf
svn path=/trunk/boinc/; revision=5048
2005-01-09 22:38:13 +00:00
David Anderson 29a26d8e44 *** empty log message ***
svn path=/trunk/boinc/; revision=5047
2005-01-09 22:33:32 +00:00
David Anderson 8e55a2dd0f *** empty log message ***
svn path=/trunk/boinc/; revision=5046
2005-01-09 22:23:53 +00:00
Bruce Allen ded013cc4b print format string didn't agree with arguments
svn path=/trunk/boinc/; revision=5039
2005-01-09 08:04:38 +00:00
Bruce Allen b0fd04807b Corrected comment, and added a bit of additional DEBUG-level log information.
svn path=/trunk/boinc/; revision=5038
2005-01-09 08:01:15 +00:00
Bruce Allen 22c0a5155e The signal being used to control the daemons is SIGHUP not SIGINT. Changed
comment and print statement from SIGINT to SIGHUP.

svn path=/trunk/boinc/; revision=5037
2005-01-09 07:48:33 +00:00