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

Pass coprocess parameter to WorkQueue #60

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

benclifford
Copy link
Contributor

This allows Work Queue coprocesses to be enabled from the bps yaml config without having to fiddle with Python configuration.

Copy link
Collaborator

@jchiang87 jchiang87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. Can you comment here on what the coprocess functionality in work_queue provides?

@benclifford
Copy link
Contributor Author

@jchiang87 in Work Queue by default a new Python process is started up to do the per-task Python code (because all parsl tasks are at heart Python tasks) - in the DESC case most usually this is monitoring wrapping code wrapped around a fork of the actual user process. The HTEX and thread executors do not start up a Python process per-task this way because they are already inside Python: the htex workers are implemented in Python, and the thread executor runs stuff directly inside the submitting Python process (as a thread).

The Work Queue coprocess mode gives Work Queue persistent Python workers that are used for a sequence of tasks - so those workers look more like HTEX Python workers.

In the DESC case, where I've found this helpful is in an environment where the cost of Python process startup and import is expensive: this cost gets paid once per worker, rather than once per task. That process startup and import has been expensive sometimes when working with Python coming from heavily loaded shared filesystems when there is a lot to import.

@jchiang87 jchiang87 merged commit dfb717b into LSSTDESC:master Jan 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants