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

Lessen resource usage when multiprocessing not in use #178

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

rtobar
Copy link
Contributor

@rtobar rtobar commented Jun 12, 2022

One of the problems with the current multiprocessing support in daliuge
is that it requires too many resources. This is because each DropProxy
object is creating its own RPCClient, which internally create their own
ZMQ context. This not only increases the runtime requirements of the
system (more objects need to be created, etc.) but also puts pressure on
system resources. This situation is described in detail in YAN-976, and the
test/manager/test_dm.py::TestDM::test_many_relationships unit test in
particular triggers this issue with ease.

This commit implements a partial fix for this issue. While it doesn't
take care of the problem itself, it identifies when a DropProxy is
created from a NodeManager that is not using multiprocessing support,
and avoid creating an RPCClient instance itself, instead using the
client provided as a parameter. This brings stability back to the
daliuge runtime when multiprocessing isn't used, containing the resource
over-usage to only when strictly necessary.

Signed-off-by: Rodrigo Tobar rtobar@icrar.org

One of the problems with the current multiprocessing support in daliuge
is that it requires too many resources. This is because each DropProxy
object is creating its own RPCClient, which internally create their own
ZMQ context. This not only increases the runtime requirements of the
system (more objects need to be created, etc.) but also puts pressure on
system resources. This situation is described in detail in YAN-976, and the
test/manager/test_dm.py::TestDM::test_many_relationships unit test in
particular triggers this issue with ease.

This commit implements a partial fix for this issue. While it doesn't
take care of the problem itself, it identifies when a DropProxy is
created from a NodeManager that is *not* using multiprocessing support,
and avoid creating an RPCClient instance itself, instead using the
client provided as a parameter. This brings stability back to the
daliuge runtime when multiprocessing isn't used, containing the resource
over-usage to only when strictly necessary.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@rtobar rtobar requested a review from pritchardn June 14, 2022 03:56
Copy link
Collaborator

@pritchardn pritchardn left a comment

Choose a reason for hiding this comment

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

Looks good and resonable to me

@rtobar rtobar merged commit 0a38df4 into master Jun 14, 2022
@rtobar rtobar deleted the yan-976-constrain-resource-overusage branch June 14, 2022 06:35
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.

None yet

2 participants