Q: Memory release when removing the column?
MEMBER
Hi ! Datasets are memory mapped from your disk, i.e. they're not loaded in RAM. This is possible thanks to the Arrow data format.

Therefore the column you remove is not in RAM, so removing it doesn't cause the RAM to decrease.
2022-11-14T11:05:55Z
https://github.com/huggingface/datasets/issues/5226#issuecomment-1313500541
https://api.github.com/repos/huggingface/datasets/issues/5226
IC_kwDODunzps5OSm19
https://api.github.com/repos/huggingface/datasets/issues/comments/1313500541/reactions
2022-11-14T11:05:55Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1313500541
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
Thanks for the explanation! @lhoestq 
I wonder since it is memory mapped, can we reduce or remove this memory map?
2022-11-15T20:04:34Z
https://github.com/huggingface/datasets/issues/5226#issuecomment-1315804441
https://api.github.com/repos/huggingface/datasets/issues/5226
IC_kwDODunzps5ObZUZ
https://api.github.com/repos/huggingface/datasets/issues/comments/1315804441/reactions
2022-11-15T20:36:39Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1315804441
https://avatars.githubusercontent.com/u/43239645?v=4
https://api.github.com/users/bayartsogt-ya/events{/privacy}
https://api.github.com/users/bayartsogt-ya/followers
https://api.github.com/users/bayartsogt-ya/following{/other_user}
https://api.github.com/users/bayartsogt-ya/gists{/gist_id}
https://github.com/bayartsogt-ya
bayartsogt-ya
MDQ6VXNlcjQzMjM5NjQ1
https://api.github.com/users/bayartsogt-ya/orgs
https://api.github.com/users/bayartsogt-ya/received_events
https://api.github.com/users/bayartsogt-ya/repos
https://api.github.com/users/bayartsogt-ya/starred{/owner}{/repo}
https://api.github.com/users/bayartsogt-ya/subscriptions
User
https://api.github.com/users/bayartsogt-ya
public
MEMBER
Yes you can `del common_voice` for example or wait for it to be garbage collected
2022-11-16T13:20:39Z
https://github.com/huggingface/datasets/issues/5226#issuecomment-1317011157
https://api.github.com/repos/huggingface/datasets/issues/5226
IC_kwDODunzps5Of_7V
https://api.github.com/repos/huggingface/datasets/issues/comments/1317011157/reactions
2022-11-16T13:20:39Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1317011157
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
### Describe the bug

How do I release memory when I use methods like `.remove_columns()` or `clear()` in notebooks?
```python
from datasets import load_dataset
common_voice = load_dataset("mozilla-foundation/common_voice_11_0", "ja", use_auth_token=True)
# check memory -> RAM Used (GB):  0.704 / Total (GB)  33.670
common_voice = common_voice.remove_columns(column_names=common_voice.column_names['train'])
common_voice.clear()
# check memory -> RAM Used (GB):  0.705 / Total (GB)  33.670
```

I tried `gc.collect()` but did not help

### Steps to reproduce the bug

1. load dataset
2. remove all the columns
3. check memory is reduced or not


[link to reproduce](https://www.kaggle.com/code/bayartsogtya/huggingface-dataset-memory-issue/notebook?scriptVersionId=110630567)

### Expected behavior

Memory released when I remove the column

### Environment info

- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5