Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move scheduler implementation to LAPIS #28

Open
eileen-kuehn opened this issue Jun 22, 2021 · 0 comments
Open

Move scheduler implementation to LAPIS #28

eileen-kuehn opened this issue Jun 22, 2021 · 0 comments
Labels
refactoring Restructuring for better intelligibility

Comments

@eileen-kuehn
Copy link
Member

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
)

@eileen-kuehn eileen-kuehn added this to the Basic functionality milestone Jun 22, 2021
@eileen-kuehn eileen-kuehn added the refactoring Restructuring for better intelligibility label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Restructuring for better intelligibility
Projects
None yet
Development

No branches or pull requests

1 participant