Comments (4)
Hi @VladVin, thanks for posting this!
The problem in Modin 0.1.2 is not a memory leak, rather a result of the way that Ray + Arrow's Plasma store handle objects that are no longer referenced. We depend on both of these projects for the backend of Modin. I will explain the way that Ray and Arrow handle python objects put into memory and then explain how this will be fixed in 0.2 (and is partly fixed in current master).
The way the Ray interacts with the plasma store is that it will continue adding objects to the plasma store until a new object cannot be added. This includes objects that are no longer being referenced from the Python applications. Once it encounters this, it will evict objects in FIFO order. This can be particularly problematic for most workloads in Modin. Recently @robertnishihara added a feature to Ray that allows for manual freeing of objects from the plasma object store. We will be able to use it once Ray 0.6 is released.
In Modin 0.1.2 the copying/caching we do is excessive. That will add to the memory usage of each DataFrame, and in 0.1.2 there is no way to free them. We rewrote the backend in #70 and it no longer has the memory overhead you will see in 0.1.2. We also added handles to free the objects once they are no longer being referenced. This way, when Ray 0.6 is released we can just add the 2 or 3 lines of code needed. We expect this to effectively solve the high memory usage problem.
To some degree, there will always be some copying, this is unavoidable with an immutable store as the backend (Plasma). However, there is a lot we can do to reduce this so you aren't using 110GB of memory for your 3GB dataset.
cc @robertnishihara @pcmoritz (Feel free to correct me if I'm wrong)
from modin.
One minor comment is that the object store evicts objects in a least-recently-used order instead of FIFO.
from modin.
@devin-petersohn , @robertnishihara , thank you for the comments very much. Nice to hear that it will be fixed in the near releases
from modin.
Closing this. Feel free to reopen if the discussion should continue or if issue was not resolved.
from modin.
Related Issues (20)
- Support right merge/join
- Update docs as to from_* functions
- Use `extract_dtype` function in more places
- Empty docstrings should not be inherited
- Automatic publication of Modin wheel to PyPI
- Using decorators makes the profile confusing with a lot of circular dependencies.
- Remove `instance_type` attribute of axis partitions
- Remove HDK engine
- Remove deprecated functions from `utils.py`, `accessor.py` and `io.py`
- BUG: AttributeError: 'bool' object has no attribute 'all'
- Remove Cudf storage format as unmaintained
- `enable_logging` decorator does not preserve decorated function type hints
- Using a custom pandas accessor with Modin HOT 2
- Installation of modin using pip fails HOT 4
- Introduce MinRowPartitionSize and MinColumnPartitionSize to make partitioning more flexible
- Remove deprecated configs
- Update Modin on Dask documentation.
- Push computation to query compiler for Series.corr
- Prepare Modin code to NumPy 2.0 HOT 4
- REFACTOR: Minimize the access of methods _modin_frame methods from ._query_compiler layer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modin.