YTD texture memory calculator

FXServer warns when a streamed file needs more than 16 MiB of physical memory. Drop a .ytd here to see that number before you start the server, with the textures sorted by how much of it each one takes. Your browser reads the file and it is not uploaded.

Drop .ytd files here

Texture memory by size and format

No file at hand? Pick a size and a format to see what one texture costs.

How to use it

  1. Drop the .ytd

    Drop one or more .ytd files on the box, or pick them. Files from FiveM (legacy) and from GTA V Enhanced both work.

  2. Read the physical memory

    This is the number FXServer prints in the "uses X MiB of physical memory" line. Above 16 MiB the server warns.

  3. Find the heavy textures

    The table is sorted by memory. A 4096 texture or an uncompressed one is usually at the top.

  4. Shrink and check again

    Halve the resolution or switch to a compressed format, save the .ytd and drop it again.

How is the number calculated?

Every streamed file starts with a 16-byte RSC7 header. Two fields in it encode how much memory the file needs once unpacked: one for virtual memory (structure data) and one for physical memory (texture pixels). FXServer decodes those fields when a resource starts and compares each against 16, 32, 48 and 64 MiB. This page uses the same formula, the one in ResourceStreamComponent.cpp.

For the texture list the page unpacks the structure part of the file and reads the name, size, format and mip count of each texture. It never needs the pixels, so a 150 MiB dictionary is fine.

The warning steps and ways to get under them are in vehicle model files and the oversized asset warning. Texture sizes by role are in how to optimise a FiveM vehicle.

What do the warning steps mean?

Memory of one fileServer console
16 MiB or lessNothing is printed.
Over 16 MiBWarning printed in blue.
Over 32 MiBWarning printed in yellow.
Over 48 MiBThe line adds "Oversized assets can and WILL lead to streaming issues (such as models not loading/rendering)".
Over 64 MiBWarning printed in red.

Frequently asked questions

What is the FiveM 16 MiB limit?
It is the first step of an FXServer warning. A streamed file that needs more than 16 MiB of physical or virtual memory gets a line in the server console. The line turns yellow above 32 MiB and red above 64 MiB, and above 48 MiB it adds that oversized assets "can and WILL lead to streaming issues". The server still streams the file.
Why is the memory bigger than the file on disk?
Streamed files are compressed. The header stores the size of the unpacked data, which is what the game has to hold in memory.
Why do the textures add up to less than the physical memory?
Memory is reserved in pages of fixed sizes and textures do not always pack tightly into them. The header value is the reserved total, so it is higher than the sum, sometimes by a few MiB. FXServer goes by the header.
Does it read GTA V Enhanced .ytd files?
Yes. It reads the legacy format (resource version 13) and the Enhanced one (version 5). We ran it over 1584 .ytd files from two test servers and all of them were listed.
Can I drop a .yft or .ydr?
Yes, but you only get the two header numbers. The texture list is for .ytd files.
Are my files uploaded?
No. The page reads them in your browser with JavaScript and does not send them anywhere. You can load the page, go offline and it still works.

Related guides

Other tool