RetroPie / RetroPie/RetroPie-Setup

lr-mame needs significantly higher ram to build then free

Open
#3,383 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
10.4k
Forks
1.4k
Avg merge
2d 12h
Merged PRs (30d)
11

Description

lr-mame compilation slows to a craw with only 4GB (ram+swap) allocated

as it is now, all ram+swap that retropie makes is filled during multiple parts of the lr-mame build, significantly slowing the build
this is because of the variable number of threads that could be assigned for the build, when you spawn more threads for a build it is pretty much guaranteed that the ram usage will increase as some function of the number of threads used for compilation

maybe the rpSwap on function could be made to scale with the max_threads value?

rpSwap on 4096

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the rpSwap calls and the max_threads handling used during lr-mame compilation. Reproduce the build with 4GB of RAM plus swap and compare memory use across thread counts. Done means swap allocation scales appropriately for the selected max_threads value and is freed after the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
raspberry-pi, shell
Domain
build-system, embedded-iot
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.