Skip to content

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

Merged
pitrou merged 5 commits into
python:masterfrom
pitrou:mp_heap_perf
Jul 23, 2017
Merged

bpo-30919: shared memory allocation performance regression in multiprocessing#2708
pitrou merged 5 commits into
python:masterfrom
pitrou:mp_heap_perf

Conversation

@pitrou

@pitrou pitrou commented Jul 14, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown

@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