Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/24/11 16:55:48 (13 years ago)
Author:
cneumuel
Message:

#1233

  • extended statistics recording:
    • execution times of users are captured
    • execution times and start-to-finish time of finished jobs is captured (to computer hive overhead)
    • data of deleted jobs is automatically captured in DeletedJobStatistics
  • changed ExecutionTime type in database from string to float (milliseconds are stored instead of TimeSpan.ToString())
  • added IsPrivileged field to job to indicate if it should be executed in a privileged sandbox
  • added CpuUtilization field to slave to be able to report cpu utilization
  • added GetJobsByResourceId to retrieve all jobs which are currently beeing calculated in a slave(-group)
  • TransactionManager now allows to use serializable tranactions (used for lifecycle trigger)
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs

    r6168 r6267  
    147147      return trans.UseTransaction(() => {
    148148        Job job = dao.UpdateJobState(jobId, jobState, slaveId, userId, exception);
    149        
     149
    150150        if (job.Command.HasValue && job.Command.Value == Command.Pause && job.State == JobState.Paused) {
    151151          job.Command = null;
     
    280280          dbSlave.Memory = slaveInfo.Memory;
    281281          dbSlave.OperatingSystem = slaveInfo.OperatingSystem;
    282          
    283           dbSlave.LastHeartbeat = DateTime.Now;         
     282
     283          dbSlave.LastHeartbeat = DateTime.Now;
    284284          dbSlave.SlaveState = SlaveState.Idle;
    285285
     
    472472
    473473    public void TriggerLifecycle(bool force) {
     474      // use a serializable transaction here to ensure not two threads execute this simultaniously (locking would not work since IIS may use multiple AppDomains)
    474475      trans.UseTransaction(() => {
    475476        DateTime lastCleanup = dao.GetLastCleanup();
     
    478479          lifecycleManager.Cleanup();
    479480        }
    480       });
     481      }, true);
    481482    }
    482483    #endregion
     
    526527      return trans.UseTransaction(() => dao.GetAppointments(x => x.ResourceId == resourceId));
    527528    }
     529
     530    public IEnumerable<Job> GetJobsByResourceId(Guid resourceId) {
     531      return trans.UseTransaction(() => dao.GetJobsByResourceId(resourceId));
     532    }
    528533    #endregion
    529534  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/LifecycleManager.cs

    r6229 r6267  
    5252
    5353      dao.AddStatistics(stats);
    54 
    55       //int slaveCount = slaves.Count();
    56       //int cores = slaves.Select(x => x.Cores.HasValue ? x.Cores.Value : 0).Sum();
    57       //int usedCores = slaves.Select(x => x.FreeCores.HasValue ? x.FreeCores.Value : 0).Sum();
    58 
    59       //long memoryMb = slaves.Select(x => x.Memory.HasValue ? x.Memory.Value : 0).Sum(); ;
    60       //long memoryUsedMb = slaves.Select(x => x.FreeMemory.HasValue ? x.FreeMemory.Value : 0).Sum();
    61 
    62       //double averageCpuUtilization = slaves.Select(x => x.CpuUtilization.HasValue ? x.CpuUtilization.Value : 0).Average();
    63 
    64       //int executionTimeDelta = 0; // since last update
    65 
    66       //{ // per user
    67       //  int activeJobs = 0; // calculating, transferring
    68       //  int waitingJobs = 0; // waiting
    69       //  int stoppedJobs = 0; // finished, failed, aborted, paused
    70       //}
    71 
    72       //{ // per slave
    73       //  int activeJobs = 0; // calculating, transferring
    74       //  double cpuUtilization = 0.0;
    75       //}
    76 
    7754    }
    7855
Note: See TracChangeset for help on using the changeset viewer.