Skip to content

Instantly share code, notes, and snippets.

@spongeyperson
Last active January 18, 2024 20:42
Show Gist options
  • Save spongeyperson/869ed83f72d51b029bc41e62d906688a to your computer and use it in GitHub Desktop.
Save spongeyperson/869ed83f72d51b029bc41e62d906688a to your computer and use it in GitHub Desktop.
How to *attempt* to get Unity to use more Cores on a heavily Multi-core system.

Unity Multicore Tweaks

This guide gives you some tweaks you can try in boot.config inside your Unity Game to get some more performance out of your Multi-core system.

Performance Flags to Try:

  • gc-max-time-slice=3

    • This increases the slice of time Unity's Garbage Collector is allowed to spend on a single frame. Increasing this value increases the amount of time until the Garbage Collector is run. Setting this helps limit the impact of garbage collection on framerate by specifying a maximum time that the garbage collector is allowed to consume during a frame. If the garbage collection process exceeds this time limit, it may be interupted, and the remaining work may be moved to the next frame. Value is in Milliseconds.
  • gfx-enable-gfx-jobs=1

    • Enables Standard Graphics Jobs. Enabling this, Unity will attempt to use multiple CPU cores for certain graphics tasks, which can result in better performance.
  • gfx-enable-native-gfx-jobs=1

    • Explicitly enables the use of Native Graphics Jobs. Native Graphics Jobs are a more advanced version of Graphics Jobs, designed to provide even better multicore performance.

Quick Copy-Paste Final Result.

# boot.config
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
wait-for-native-debugger=0
hdr-display-enabled=0
single-instance=
gc-max-time-slice=3

Legal Notice: I do NOT pretend to own any content on this git repository. All contents are copyright of their respective owners. This repository is intented for informational purposes only. Content on this repository is used at your own risk. If you have any legal issue with the content on this repository, please submit a email at gitissue@spongey.xyz with your complaint.

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