Skip to content

Conversation

@colinthomas-z80
Copy link
Contributor

Description

This improves task throughput for taskvine serverless by caching the serialize module and base function definition in the library

Type of change

Choose which options apply, and delete the ones which do not apply.

  • New feature

@benclifford
Copy link
Collaborator

This needs cctools 7.13.0 (because thats the first release that has hoisting_modules) but I noticed that Parsl CI is still on 7.8.0 so I think there isn't any test coverage for this change.

@benclifford
Copy link
Collaborator

I tried this out on my laptop with serverless mode turned on: a pytest run reduces from 116 seconds to 20 seconds. So it would be good for timing considerations to switch our CI taskvine test over to this mode, perhaps.

and

parsl-perf --time 20 --config parsl/tests/configs/taskvine_serverless.py

goes from
6 tasks/sec
to
140 tasks/sec

Importing parsl.serialize will (in usual Python) import parsl first which will in turn import a very large part of the parsl package tree - because parsl/__init__.py imports a lot for re-export - to get a "batteries included" style of import parsl.

So I propose that importing plain parsl rather than parsl.serialize should result in the same performance change - I tried that out on my laptop and the results appear to have about the same distribution (by eyeball).

I'm a little unclear what happens for user code that would benefit from this kind of pre-load for other modules.

Copy link
Collaborator

@benclifford benclifford left a comment

Choose a reason for hiding this comment

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

see other comments

@dthain
Copy link
Contributor

dthain commented Jun 23, 2025

@benclifford thoughts on getting this merged? Is import parsl your recommended change?

@benclifford
Copy link
Collaborator

Is import parsl your recommended change?

@dthain yes

@dthain
Copy link
Contributor

dthain commented Jun 26, 2025

Closing in favor of #3902

github-merge-queue bot pushed a commit that referenced this pull request Jun 26, 2025
…ext (#3902)

# Description

This improves task throughput for taskvine serverless by caching the
serialize module and base function definition in the library.

# Changed Behaviour

All workflows using TaskVine

# Fixes

Minor update to PR #3604

## Type of change

Choose which options apply, and delete the ones which do not apply.

- Performance improvement

FYI @colinthomas-z80 @benclifford

---------

Co-authored-by: Ben Clifford <[email protected]>
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.

3 participants