Software 43969 Published by

A new version of the FEX emulator, FEX-2511, has been released for Arm64 Linux, featuring improvements and optimizations to enhance its performance on low-memory systems. The emulator's memory usage issues were addressed by introducing two new options: disabling the L2 cache entirely and implementing a dynamic L1 cache that grows or shrinks based on usage. 



FEX-2511 released

A new version of the FEX, a quick user-mode x86 and x86-64 emulator for Arm64 Linux, has been released, featuring numerous improvements and optimizations that aim to enhance its performance on low-memory systems. The emulator's Just-In-Time (JIT) compiler has been a significant contributor to its memory usage issues, with its lookup caches consuming large amounts of RAM.

Tackling Memory Overhead

FEX developers have known for some time that the emulator's memory usage has been a problem. With many games creating multiple threads and using large amounts of memory, systems with limited RAM (8GB or less) can quickly become overwhelmed. The JIT's lookup caches, which store information about where to find relevant x86 code, are particularly memory-hungry. In some cases, these caches have been known to consume over a gigabyte of memory in games like Death Stranding.

To mitigate this issue, FEX has introduced two new options: disabling the L2 cache entirely and implementing a dynamic L1 cache that grows or shrinks based on usage. While these options may introduce stuttering issues in some cases, they can significantly reduce memory consumption. Additionally, FEX has implemented its own low-latency writer-priority mutex to minimize lock contention and reduce stuttering.

Stuttering and Stability

While the new optimizations aim to improve performance, there is a risk of introducing stuttering issues in certain situations. To address this, FEX developers have introduced a heuristic to grow or shrink the L1 cache dynamically, which can help minimize stuttering.

In addition to memory-related improvements, FEX has also fixed several crashes due to out-of-bounds branch encoding. This issue has plagued the emulator for some time, causing games to crash when encountering problems with branch targets. With this fix in place, older games that rely heavily on x87 should now be more stable.

Another minor change is the enablement of AVX (Advanced Vector Extensions) by default for 32-bit Linux emulation. This can provide performance benefits for certain algorithms, although it may introduce stack overflow issues in some cases.

Performance and Bug Fixes

FEX has also made several performance-related improvements, including fixing an oversight with string instructions and optimizing x87 register exchange instructions. A few minor bug fixes have been implemented, including one that should improve stability when using both OpenGL and Vulkan thunks at the same time.

FEX-Emu/FEX Release FEX Release FEX-2511

Read the blog post at FEX-Emu's Site! You would think doing this month after month we would eventually run out of things to work on, but in true emulator fashion the work never ends. Let's jump in ...

Release FEX Release FEX-2511 · FEX-Emu/FEX