Configuring Title Memory on Xbox One X

Titles running on Xbox One X have access to up to 9GB (gigabytes) of memory. Since the needs of modern games can vary widely this value is configurable by the title developer. Some games may want a consistent memory profile across the Xbox One family of consoles, and others may need more memory to load higher resolution textures or perform Xbox One X specific optimizations. You can choose an integer value between 5GB and 9GB. If you do not set a value, the default is 5GB.

Choosing how much memory to give your title

So why not just set TitleMemory to 9GB? Isn’t more title memory always better? Not necessarily! Xbox One X includes a read-only file system cache, and any memory that you do not allocate to your title is used for that file system cache. The cache intelligently loads frequently used title assets for rapid access by the title, reducing load and reload times, which results in an improved user experience. You should test your title to see what split between title memory and file system cache memory gives the best user experience for your title.

If your title does not need all 9GB of memory, we recommend allocating at least 1GB for the file system cache, although the more memory you can allocate to the cache the better your title’s load and reload times will be. For example if you set TitleMemory to 5GB, we will allocate 4GB to the file system cache.

What benefit will my title see from the file system cache?

Real world performance will vary depending on title read patterns and resource sizes, disk fragmentation, cache size, and so on. Our recommendation is that you test your title to see what split between title memory and file system cache memory gives you the best results. Having said that, here are the performance test results we see on an Xbox One X devkit comparing the internal hard drive to cache performance when the content being read is 100% in the cache. As you can see the file system cache can give dramatic improvements:

Read operation No cache 100% cache hit
4K random read, 1 thread 0.4MB/s 45MB/s
4K random read, 3 threads 0.6MB/s 130MB/s
4K sequential read 1 threads 6.6MB/s 47MB/s
4K sequential read 3 threads 14MB/s 130MB/s
512K random read, 1 threads 36MB/s 1500MB/s
512K random read, 3 threads 43MB/s 3200MB/s
512K sequential read, 1 threads 120MB/s 1500MB/s
512K sequential read, 3 threads 40MB/s 3200MB/s

Declaring TitleMemory in your app manifest

To specify the amount of memory for your title, add an mx:TitleMemory element to your title’s application manifest. In the mx:TitleMemory element set the ConsoleType attribute to “Xbox_One_X” and the Size attribute to the desired amount of memory to an integer value between 5 (GB) and 9 (GB).

For example to specify your title requires 8GB of memory you would use the following snippet in your application manifest:

<Applications>      
  <Application Id="App"
    Executable="$targetnametoken$.exe" 
    EntryPoint="Direct3DGame1.App">
    ...
    <Extensions>
      <mx:Extension Category="xbox.system.resources">
        <mx:XboxSystemResources>
          <mx:TitleMemory ConsoleType="Xbox_One_X" Size="8"/>
        </mx:XboxSystemResources>
      </mx:Extension>
    </Extensions>
  </Application>
</Applications>  

If you want finer grained control of the amount of memory you allocate to your title you can use the SizeInMegabytes attribute instead of the Size attribute. You can choose a value between 5120 (MB) and 9216 (MB). We recommend that you do not specify a value between 8704 and 9216, as the minimum effective file cache size is 512MB.

You cannot specify both Size and SizeInMegabytes. If you do so your title will fail to launch.

Testing your TitleMemory setting and the file system cache

The following requirements must be true for you to be able to test the effect of the file system cache on your title on a Xbox One X dev kit or test kit:

  1. You must turn off Profiling/Tooling Memory. See Configuring and Accessing Extra Memory during Development for details on how to turn Profiling Memory on and off.
  2. And you must use a signed packaged build - loose file builds do not benefit from the cache.

Note To flush the cache, simply run a sample game with TitleMemory set to 9GB.

How does TitleMemory affect Profiling Mode and Tooling Memory?

In the October 2017 recovery, turning on profiling mode causes the TitleMemory setting to be ignored, so that your title always has a minimum of 9GB of memory when running with Profiling Mode turned on. This has been addressed in the November 2017 recovery. See Configuring and Accessing Extra Memory during Development for more information on Profiling Mode and Tooling memory.

Other Considerations

Other Considerations relating to title memory: