[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/icecream/icecream/services
From:       Stephan Kulow <coolo () kde ! org>
Date:       2004-08-31 8:41:28
Message-ID: 20040831084128.77B32903E () office ! kde ! org
[Download RAW message or body]

CVS commit by coolo: 

* ignore the load of the submitter (it's all his fault)
* increase grace interval


  M +13 -11    scheduler.cpp   1.171


--- kdenonbeta/icecream/icecream/services/scheduler.cpp  #1.170:1.171
@@ -326,10 +326,16 @@ server_speed (CS *cs, Job *job)
       float f = (float)cs->cum_compiled.osize
                / (float) cs->cum_compiled.compile_time_user;
+
+      // we only care for the load if we're about to add a job to it
+      if (job) {
       /* The submitter of a job gets more speed.  So if he is equally
          fast to the rest of the farm it will be prefered to chose him
          to compile the job.  Then this can be done locally without
          needing the preprocessor.  */
-      if (job && job->submitter == cs)
+        if (job->submitter == cs)
         f *= 1.2;
+        else // ignoring load for submitter - assuming the load is our own
+          f *= float(1000 - cs->load) / 1000;
+      }
 
       // below we add a pessimism factor - assuming the first job a computer got is not representative
@@ -337,8 +343,4 @@ server_speed (CS *cs, Job *job)
           f *= ( -0.5 * cs->last_compiled_jobs.size() + 4.5 );
 
-      // we only care for the load if we're about to add a job to it
-      if (job) 
-          f *= (1000 - cs->load) / 1000;
-
       return f;
     }
@@ -761,5 +763,5 @@ prune_clients ()
   time_t now = time( 0 );
   for (it = css.begin(); it != css.end(); ) {
-    if ( now - ( *it )->last_talk > 15 ) {
+    if ( now - ( *it )->last_talk > 35 ) {
       if ( ( *it )->max_jobs > 0 ) {
         trace() << "send ping " << ( *it )->nodename << endl;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic