-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update worker images to optimize IO performance using local data #675
Open
robertbartel
wants to merge
24
commits into
NOAA-OWP:master
Choose a base branch
from
robertbartel:f/bmi_cfg_gen_io/worker_changes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c14cb26
Update DataRequirement with needs_data_local attr.
robertbartel 36338d0
Setting needs_data_local when fulfilled_by is set.
robertbartel 4507699
Update, document ngen image custom dir structure.
robertbartel 0916112
Update Launcher for using local data volumes.
robertbartel 0a9ce77
Update ngen-related images to have mc client.
robertbartel 95aa90e
Update worker Python functions to make data local.
robertbartel 1f50ce3
Update worker entrypoints for local data.
robertbartel b44e50a
Fix fast dev update script GUI handling.
robertbartel 304d953
Move call to make_data_local in entrypoints.
robertbartel 7f9f972
Fix issues w/ use of separate cluster/local data.
robertbartel 2b0f4bd
Fix more issues with py_funcs functions.
robertbartel 8cad34e
Update worker entrypoints for permissions issues.
robertbartel 5b5dfa0
Bump core version to 0.20.0.
robertbartel a6db862
Update scheduler dep to latest core.
robertbartel a930cf5
Bump scheduler version to 0.14.0.
robertbartel 724120a
Update dataservice internal deps to latest.
robertbartel 91204ca
Bump dataservice version to 0.13.0.
robertbartel d0534f8
Update schedulerservice internal deps to latest.
robertbartel 107cae8
Bump schedulerservice version to 0.13.0.
robertbartel 9161c38
Update requestsservice to latest core dep.
robertbartel 4d593ee
Bump requestservice version to 0.12.0.
robertbartel ea1f092
Update partitionerservice internal deps to latest.
robertbartel 0b2563c
Bump partitionerservice version to 0.3.0.
robertbartel f85ea7b
Account for platform in image mc client download.
robertbartel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# About | ||
|
||
<b style="color: red">TODO:</b>More details about the image. | ||
|
||
<b style="color: red">TODO:</b>Once implemented, details about available image variants. | ||
|
||
<b style="color: red">TODO:</b>Once implemented, details about extending the image with additional modules. | ||
|
||
# Image `/dmod/` Directory | ||
|
||
## TL;DR - Directories for Configs | ||
|
||
Several important pieces details if manually constructing configurations to upload into DMOD datasets: | ||
* Compiled BMI module libraries will be in `/dmod/shared_libs/` | ||
* Data used during job execution (e.g., forcings, configs) will (or at least appear) under `/dmod/datasets/` | ||
* Paths descend first by data type, then by dataset name | ||
* E.g., `/dmod/datasets/config/vpu-01-bmi-config-dataset-01/NoahOWP_cat-9999.namelist` | ||
* E.g., `/dmod/datasets/forcing/vpu-01-forcings-dataset-01/cat-1000.csv` | ||
|
||
## Directory Structure Details | ||
|
||
Several important directories exist in the worker images' file system under the `/dmod/` directory, which are important to the operation of job worker containers. | ||
|
||
## Static Directories | ||
|
||
Several important DMOD-specific directories in the worker images are static. They contain things either created or copied in during the image build. These are standard/general things, available in advance, that need to be in fixed, well-defined locations. Examples are the ngen executables, Python packages, and compiled BMI modules. | ||
|
||
### `/dmod/bin/` | ||
* Directory containing custom executables and scripts | ||
* Location for parallel and serial ngen executables, plus the `ngen` symlink that points to one of them (dependent on build config, but parallel by default) | ||
* Path appended to `PATH` in environment | ||
|
||
### `/dmod/bmi_module_data/` | ||
* Directory containing any necessary generic per-BMI-module data files | ||
* `/dmod/bmi_module_data/noah_owp/parameters/` | ||
* Nested directory containing parameters files for Noah-OWP-Modular | ||
* `/dmod/bmi_module_data/lgar-c/data/data/` | ||
* Nested directory for generic LGAR data files | ||
|
||
### `/dmod/shared_libs/` | ||
* Directories containing libraries built during intermediate steps of the image building process that will be needed for worker container execution | ||
* E.g., Compiled BMI module shared libraries, like `libcfebmi.so` for CFE | ||
* Path is appended to `LD_LIBRARY_PATH` | ||
|
||
### `/dmod/venv/` | ||
* Directory for Python virtual environment loaded by worker for execution | ||
|
||
## Dynamic Directories | ||
|
||
Others important DMOD-specific directories in the worker images are dynamic. There is a higher level baseline directory structure that is created by the image build, but the nested contents, which are what is most important to job execution, is put into place when the job worker container is created. Examples of this are configs and forcings. | ||
|
||
### `/dmod/datasets/` | ||
* This contains the paths from which jobs should read their necessary data, and which config files should reference | ||
* Contains subdirectories for different dataset types | ||
* `config`, `forcing`, `hydrofabric`, `observation`, `output` (e.g., `/dmod/datasets/forcing/`) | ||
* Each subdirectory may contain further "subdirectories" (really symlinks) containing different data needed for the current job | ||
* E.g., `/dmod/datasets/config/vpu-01-bmi-config-dataset-01/` | ||
* Has data from `vpu-01-bmi-config-dataset-01` dataset | ||
* Data subdirectories are actually symlinks to an analogous mounted path for either a [cluster volume](#dmodcluster_volumes) or [local volume](#dmodlocal_volumes) | ||
* If a dataset can be mounted as a cluster volume and used directly by the job without local copying, the symlink will be to an analogous cluster volume | ||
* e.g., `/dmod/datasets/config/real-cfg-ds-01/ -> /dmod/cluster_volumes/config/real-cfg-ds-01/` | ||
* If data from a dataset needs to be local or preprocessed in some way by the worker before use, it will be prepared in a local volume, and a symlink here will point to that | ||
* e.g., `/dmod/datasets/config/vpu-01-bmi-config-dataset-01/ -> /dmod/local_volumes/config/vpu-01-bmi-config-dataset-01/` | ||
|
||
|
||
### `/dmod/cluster_volumes/` | ||
* First level subdirectories correspond to DMOD dataset types, as with `/dmod/datasets/` | ||
* e.g., `/dmod/cluster_volumes/config/` | ||
* Second-level subdirectories are mounted Docker cluster volumes that are, in some way or another, synced across all physical nodes of the deployment | ||
* e.g., `/dmod/cluster_volumes/config/vpu-01-bmi-config-dataset-01/` | ||
* Automatic synchronization at the DMOD deployment level | ||
* All workers for a job see exactly the same set of mounted volumes here | ||
* All workers on all physical nodes see the same contents in each mounted volume directory | ||
* Writes done on any worker to a file under a volume subdirectory are seen (essentially) immediately by workers on **all** physical nodes | ||
* Common scenario (typical case at the time of this writing) for these are DMOD dataset volumes | ||
* A dataset is directly mounted as Docker volume via some specialized storage driver (e.g., `s3fs`) | ||
* The contents of the dataset can then be interacted with by the worker as if they were a regular file system (even if they aren't) | ||
* The mount directory name matches the DMOD dataset name | ||
* E.g., the `vpu-01-bmi-config-dataset-01` dataset would be at `/dmod/cluster_volumes/config/vpu-01-bmi-config-dataset-01/` | ||
|
||
*** TODO: set up to link or do pre-processing/extraction/etc. as needed on startup *** | ||
*** TODO: have indication that be that there exists a directory already for the dataset under `/dmod/datasets/` | ||
TODO: have this be for local Docker volumes that are just on individual hosts that we want to keep synced | ||
|
||
### `/dmod/local_volumes/` | ||
* First level subdirectories correspond to DMOD dataset types, as with `/dmod/datasets/` | ||
* e.g., `/dmod/local_volumes/config/` | ||
* Second-level subdirectories are mounted Docker local volumes | ||
* e.g., `/dmod/local_volumes/config/vpu-01-bmi-config-dataset-01/` | ||
* These local volumes are job-wide but host-specific | ||
* All workers for a job see exactly the same set of mounted volumes here | ||
* All workers on the same physical nodes are using the same local volume on that physical host | ||
* Workers on different physical nodes are using different volumes | ||
* This means some coordinated synchronization needs to be performed by a subset of worker | ||
* The use case is for any data that needs to be local on the container/host (generally for performance reasons) to be copied/extracted to a subdirectory here, typically from an analogous subdirectory under `/dmod/cluster_volumes/` | ||
* This at least reduces copying somewhat by allowing workers on same node to share the same local volume | ||
|
||
TODO: make scheduler create these per dataset on the fly at job time and mount them in (and have something to clean them up, but maybe not right away) | ||
TODO: make one worker per physical host extract data when needed from archives in analogous cluster volumes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm ... good catch, but the suggestion won't work as needed with Linux on an Intel machine (it produces
linux-x86_64
instead oflinux-amd64
). I will make an adjustment, but I'll need to think more about exactly how.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wasn't the only case that would have been a problem, but I've made a change now that I think should catch the platform types we can reasonably expect that would need to be transformed to something else for purposes of that URL, and done the adjustment accordingly.