Skip to content

Move scheduler implementation to LAPIS #28

Open
@eileen-kuehn

Description

@eileen-kuehn

The scheduler implementation is currently contained within this extension although it should be part of the core LAPIS package. However, there are still some hacks that specifically implement caching-related logic to make the scheduler work. Those should be removed before the CondorClassadJobScheduler can actually be moved.

Locations that are caching-specific include:

  • details in the WrappedClassAd

elif "cache_demand" == item:
caches = self._wrapped.connection.storages.get(
self._wrapped.sitename, None
)
try:
return mean(
[1.0 / cache.connection._throughput_scale for cache in caches]
)
except TypeError:
return 0
elif "cache_scale" == item:
caches = self._wrapped.connection.storages.get(
self._wrapped.sitename, None
)
try:
return mean(
[cache.connection._throughput_scale for cache in caches]
)
except TypeError:
return 0
elif "cache_throughput_per_core" == item:
caches = self._wrapped.connection.storages.get(
self._wrapped.sitename, None
)
try:
return sum(
[
cache.connection.throughput / 1000.0 / 1000.0 / 1000.0
for cache in caches
]
) / float(self._wrapped.pool_resources["cores"])
except TypeError:
return 0
elif "cached_data" == item:
return self._wrapped.cached_data / 1000.0 / 1000.0 / 1000.0
elif "data_volume" == item:
return self._wrapped._total_input_data / 1000.0 / 1000.0 / 1000.0
elif "current_waiting_time" == item:
return time.now - self._wrapped.queue_date
elif "failed_matches" == item:
return self._wrapped.failed_matches
elif "jobs_with_cached_data" == item:
return self._wrapped.jobs_with_cached_data

  • specifics in the matching itself

# monitoring/coordination stuff
if (
candidate_job._wrapped._total_input_data
and matched_drone._wrapped.cached_data
):
candidate_job._wrapped._cached_data = (
matched_drone._wrapped.cached_data
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringRestructuring for better intelligibility

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions