-
Notifications
You must be signed in to change notification settings - Fork 7
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
Liu 128 #79
Conversation
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
…f CPU time appending random numbers to a list. Useful for performance benchmarking.
Otherwise drops run within their own thread (presumably within a single core).
…unctional and efficient (although resizing is not quite working yet)
Makes test_speedup actually test the speedup and increases test size.
… separate files. DlgSharedMemoryManager now handles duplicate and unregistered session requests.
- Creating random files - Handling multiple unlinks
- Creating random files - Handling multiple unlinks (warns) Adds tests for DlgSharedMemory
… this behaviour later)
… - gives a tighter bound on size.
…ng v as an array of bools
…n produce a checksum.
…angers may still need them). This functionality is moved to 'destroy_session' and is triggered when the memory manager itself is shutdown.
…ously found, then not found when opening
…r something else.
… 3.8. Improves formatting of new code-files.
# Conflicts: # daliuge-engine/dlg/apps/simple.py # docs/architecture/dataflow.rst # docs/architecture/index.rst # docs/deployment.rst # docs/development/data_development.rst # docs/development/dev_index.rst # docs/index.rst # docs/intro.rst
Can you resolve the merge conflicts with master first, please? |
# Conflicts: # daliuge-engine/dlg/apps/crc.py # daliuge-engine/dlg/drop.py # daliuge-engine/dlg/io.py # daliuge-engine/test/apps/test_simple.py # daliuge-engine/test/apps/test_socket.py # daliuge-engine/test/manager/test_dm.py # daliuge-engine/test/test_drop.py # docs/intro.rst
# Conflicts: # daliuge-engine/dlg/apps/simple.py # daliuge-engine/dlg/drop.py # daliuge-engine/dlg/droputils.py # daliuge-engine/dlg/io.py # daliuge-engine/dlg/manager/cmdline.py # daliuge-engine/dlg/manager/node_manager.py # daliuge-engine/dlg/rpc.py # daliuge-engine/test/apps/test_crc.py # daliuge-engine/test/apps/test_simple.py # daliuge-engine/test/manager/test_dm.py
awicenec
approved these changes
Dec 13, 2021
awicenec
added a commit
that referenced
this pull request
May 19, 2022
pritchardn
pushed a commit
that referenced
this pull request
May 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Full 'end-to-end' multiprocessing tests have been skipped on machines with < 4 (logical) cores.
The added components of a shared-memory manager and process wrapper are still present.
I now repeat the message written in preparation for the pull request:
The summary
O-boy this sure was more than a 2-line fix. The overall idea remains to execute each drop in a separate process provided by Python.multiprocessing and to replace the memory-io InMemory drops with a new shared-memory-io implementation but the devil is in the details as with all things.
We use a (slightly) custom Multiprocessing.processsub-class and implementation of shared memory to allow for named shared memory blocks
In its current form this addition breaks Python 3.7 support (must be >=3.8) and well and truly breaks windows support (would need to implement shared-memory for Windows). Import guards are in place to continue supporting Python 3.7
Changes
Drops now re-compute their checksum if it does not exist but the drop has COMPLETED. Shared memory drops present themselves to the main process as if they were written externally
Drop Proxys now have their own context, rather than treating the node-manager itself as the RPC endpoint. While this consumes many more resources than is truly necessary, this is the fastest way (to me at least) to implement this functionality.
The -t flag for node managers has changed behaviour:
MemoryDrops now check for the existence of a thread-pool argument, which if present uses a shared_memory io handle instead of the normal handle. There is no ‘shared-memory drop' explicitly as such.
Additions
process.py implements DlgProcess - a lightweight wrapper around Multiprocessing.process. The only major difference is that a pipe is opened between the parent and child process allowing exceptions to be passed back to the node manager for handling.
shared_memory.py - (re)-implements the shared-memory primitive from Multiprocessing to allow for named shared memory in addition to catching some peculiar edge-cases this invites (files that exist in one process but not another for instance)
io.py - Adds a shared-memory IO module that attempts to ensure a minimally sized shared memory chunk
shared_memory_manager.py - A small module that handles the registration and unlinking of shared memory blocks on a per-session basis.
Currently, there could be a name-collision for drops with the same oid and the same session name (only a problem if setting the session id explicitly).
Some mention of this feature in the documentation, introduction.rst, graphs.rst and managers.rst specifically
All of these features are tested separately, the test_dm suite has been duplicated for parallel testing - mileage seems to vary on Travis but works locally
I hope this provides a decent summary, and I am open to making further changes, but for now, this seems to suffice.