RAM overhead and streaming

VRchat uses LZMA as the compression method for assets, which prevents the possibility of using RAM on demand.

mipmap streaming can save both RAM and VRAM, with the exception that compressing packets with Crunch and LZMA will make it impossible to unload them from RAM.

The compression rates of LZ4 or LZ4HC are not good enough and waste hard disk space and network bandwidth for VRchat.

After a small amount of testing, zstd is about 10% larger than LZMA at 19 levels of compression, but the decompression speed will be dozens of times faster, if it can be integrated, will it be able to solve the problem?

This is currently the most efficient compression method.

But at the same time, you must disable the use of texture Crunch, otherwise the RAM overhead can not be unloaded.

It is possible to offload 10GB+ of RAM usage to a very low level, which I can’t test in VRchat, but it’s a huge percentage.

Even though RAM is very cheap nowadays and it’s easy to install more than 32GB, Steam’s mainstream is 16GB, and the system takes up about 8GB with everything else, leaving only 8GB to use.

It is possible to use virtual memory to avoid crashes, but it will cause a lot of writes to the SSD.

Do you guys think it’s better to gain RAM savings by modding a lot, or have every player have 32GB+ of RAM?

Crunch will cause loading textures onto the GPU to be a bit slower, but there’s no way to tell if that’s consistent from system to system. (Need to decompress and convert textures)

It will be slightly slower for textures without mipmap, and 4~5 times slower if it has mipmap generation. (Similar to LZ4 decompression, estimated decompression performance exceeds 1000MB per second)

And need to increase the asset size by about 10%+.

1 Like