Skip to content

bpo-30919: shared memory allocation performance regression in multiprocessing #2708

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

Merged
merged 5 commits into from
Jul 23, 2017

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Jul 14, 2017

There is a huge regression in creating shared memory arenas in 3.x compared to 2.7. Python 2.7 created an anonymous memory mappping, while 3.x mmaps an actual file.

  • Use ftruncate instead of actual writes to create a sparse file where supported.
  • Try to locate the file on tmpfs (or equivalent) rather than a persistent storage-backed directory.

https://bugs.python.org/issue30919

@mention-bot
Copy link

@pitrou, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @shibturn and @abalkin to be potential reviewers.

@pitrou pitrou changed the title Fix #30919: shared memory allocation performance regression in multiprocessing bpo-30919: shared memory allocation performance regression in multiprocessing Jul 14, 2017
@pitrou pitrou merged commit 3051f0b into python:master Jul 23, 2017
@pitrou pitrou deleted the mp_heap_perf branch July 23, 2017 11:05
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.

3 participants