Memory usage consistently increases when processing a dataset with `.map`
{'login': 'apsdehal', 'id': 3616806, 'node_id': 'MDQ6VXNlcjM2MTY4MDY=', 'avatar_url': 'https://avatars.githubusercontent.com/u/3616806?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/apsdehal', 'html_url': 'https://github.com/apsdehal', 'followers_url': 'https://api.github.com/users/apsdehal/followers', 'following_url': 'https://api.github.com/users/apsdehal/following{/other_user}', 'gists_url': 'https://api.github.com/users/apsdehal/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/apsdehal/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/apsdehal/subscriptions', 'organizations_url': 'https://api.github.com/users/apsdehal/orgs', 'repos_url': 'https://api.github.com/users/apsdehal/repos', 'events_url': 'https://api.github.com/users/apsdehal/events{/privacy}', 'received_events_url': 'https://api.github.com/users/apsdehal/received_events', 'type': 'User', 'site_admin': False}
[{'id': 1935892857, 'node_id': 'MDU6TGFiZWwxOTM1ODkyODU3', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/bug', 'name': 'bug', 'color': 'd73a4a', 'default': True, 'description': "Something isn't working"}]
[]
Hi ! Can you share the function you pass to `map` ?
I know you mentioned it would be hard to share some code but this would really help to understand what happened
## Describe the bug

I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help.

## Steps to reproduce the bug

Providing code as it is would be hard. I can provide a MVP if that helps.

## Expected results

Memory usage should become consistent after some time following the launch of processing.

## Actual results

Memory usage keeps on increasing.

## Environment info

- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/2559/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}