-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
refactoringRestructuring for better intelligibilityRestructuring for better intelligibility
Milestone
Description
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
lapis.caching/lapis/scheduler.py
Lines 138 to 188 in 8f4f614
| 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
lapis.caching/lapis/scheduler.py
Lines 915 to 922 in 8f4f614
| # 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
Labels
refactoringRestructuring for better intelligibilityRestructuring for better intelligibility