Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Main memory allocator granularity? How to properly set it?

Discussion in 'Editor & General Support' started by Blastom1016, Jun 27, 2023.

  1. Blastom1016

    Blastom1016

    Joined:
    Oct 4, 2019
    Posts:
    11
    We've already made some progress by setting the Bucket Allocator. But by adjusting the main allocator, we barely felt any difference.
    How to determine a proper value of main allocator granularity?
    What performance change would happen if we set it to a lower value or a higher value?
    Should it be as close to the size of the largest frequently used asset as possible? Or close to expected largest allocation in one frame?

    Many thanks.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    After 11 years of using Unity you're the first person who seems to feel a need to tinker with this thing.

    But most curiously you have left off the purpose of your tinkering.

    WHY are you tinkering with that setting, and more importantly, what do you even need it to do that it isn't already doing?

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    This is the bare minimum of information to report:

    - what you want <----------- start here
    - what you tried
    - what you expected to happen
    - what actually happened, log output, variable values, and especially any errors you see
    - links to documentation you used to cross-check your work (CRITICAL!!!) <-- don't forget this; we're not gonna go looking if you haven't!!!
     
  3. Blastom1016

    Blastom1016

    Joined:
    Oct 4, 2019
    Posts:
    11
    I just need some advices on the performance impacts on tweaking down or up the granularity value instead of asking solutions to a problem.
    The aim to tweak it was to reduce the gap between reserved native memory and used native memory to prevent out of memory issues.