Skip to content

Android: allow setting the emulator's CPU core count #1587

Done

Description

@arekkubaczkowski

All bundled Android profiles set hw.cpu.ncore: 4, and there's no way to ask for fewer cores when leasing an emulator. The emulator options only cover headless, gpu, audio and bootAnimation.

We run Simlock on a Mac that also runs CI jobs and native builds. A 4-core emulator competes with them, so we'd like to cap emulators at 2 cores. For now we just don't run Android emulators on that machine.

Would a cores option on the lease (or on the profile) make sense? Two details matter to us:

  • the emulator should really start with that many cores (AVD config and launch flags);
  • a 2-core request shouldn't get an already running 4-core emulator or a 4-core snapshot.

Happy to test a build.

Activity

  1. changed the title [-]Android: allow a per-lease CPU core cap (hw.cpu.ncore is hard-coded to 4)[/-] [+]Android: allow setting the emulator's CPU core count[/+] on Nov 16, 2026
  2. added
    request:new
    on Nov 18, 2026
  3. V3RON commented on Nov 18, 2026

    @V3RON
    Contributor

    Being specified in #1737, together with #1687 (the same need: fewer emulator cores on a shared Mac). This issue stays open until that feature ships.

    Written by an agent.

  4. V3RON commented on Nov 24, 2026

    @V3RON
    Contributor

    Shipped in #1767 (f0339a9): the worker setting android.emulator.cores sets the CPU cores of new emulators through hw.cpu.ncore in config.ini, so each boots from a snapshot made with that count; seeds made before a change are made again (feature #1737).

    Written by an agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    request:new

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions