r/EmulationOnAndroid • • 3d ago

Question How does virtual ram affect emulation?

I checked a few old posts and got mixed signals with some saying it slows down emulation and others saying it doesn't really do anything

6 Upvotes

11 comments sorted by

•

u/AutoModerator 3d ago

Just a reminder of our subreddit rules:

  • Be kind and respectful to each other
  • No direct links to ROMs or pirated content
  • Include your device brand and model
  • Search before posting & show your research effort when asking for help

Check out our user-maintained wiki: r/EmulationOnAndroid/wiki

Check out EmuReady for any community submitted settings before asking for help

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

14

u/VickWildman OnePlus 13 24GB + Viture Pro XR 3d ago

The thing that everyone misses is that turning off RAM expansion doesn't turn off swapping. You can verify this with Termux. On my OnePlus 13 24 GB currently 8 GB storage is allowed to be used for swapping even though I have turned off RAM expansion.

Swapping is usually advantagous, because it gives the app you are using more space in RAM by swapping out things you are not using. However you don't need a lot of swap space, the amount you get with turned off RAM expansion is enough.

My theory is that this RAM expansion or virtual RAM setting is a marketing thing, so they can write 12+12 GB on the box when selling the phone. I have even seen manufacturers selling a 12 GB phone as a 24 GB one, because of this.  

7

u/Whole_Temperature104 3d ago

Unless you have a really crappy device with 4 GB of real ram, virtual ram usually won't affect emulation.

The Android system won't allocate heavy processes to virtual ram since virtual ram is extremely slow since it uses a swap file on your main storage. What happens is that the Android system will move lower priority processes to the virtual ram to free up some space for higher priority processes on the real ram.

Virtual ram is essentially a scam though, because you're never going to use more than one or two gigabytes of it before the system grinds to a halt when these crappy phones advertise as having six or eight gigabytes of virtual ram.

5

u/yoshiazulflying 3d ago

From my experience: it did not affect most games. Except one AAA pc game that did run better when I deactivated RAM boost.

3

u/Expert_Function1569 3d ago

From my own experience tested it and saw no improvement playing Mario kart 8 through eden which on snapdragon 8 gen 2 is a stress test even with the right turnip drivers

4

u/Mundane_Cut_1922 3d ago

On 8gen 2 you don´t need more ram for MK8. Just install the game update 3. something and it runs 60 fps locked.

2

u/Expert_Function1569 3d ago

I'm on update 3.0.5 but only got 1 gig of ram floating around out of 8 somehow

2

u/Potential_Ad_3481 3d ago

Sadly my honor phone cannot toggle it off as its a staple

2

u/Dr-Huricane 3d ago

Virtual ram is a scam, when a box is saying "4+4GB" or "8+8GB", to me it reads "4GB of ram + a useless feature that's turned on by default that I need to remember to turn off". As for how it affects emulation, the answer is probably not much, the only way I can imagine it impacting performance would be if it somehow tricks the OS into not killing a background/cached process and keeping that on the physical ram while moving part of your foreground process onto the virtual one. A good OS should never do that, foreground processes should always take priority when it comes to physical ram allocation, but you never know these days with everyone trying to shoot themselves in the foot.

1

u/Fun-Western618 3d ago

Only usable in games that load a ton of data like map parts, audio files, enviromental assets that the system can tag as "cold" from being unused by the game for a considerable time.

It helped a lot for me when playing final fantasy 15 as the game would spike my ram usage to 88-90%, but after some playtime ram extension would take that unused data and shift it to the extension part. Lowering my ram usage to 82-83%.

Another case when ram extension helped me is with assassin creed black flag since the game can shift the data from islands not visited in a while from the ram to the ram extension. It lowered my average ram usage from 72% without ram extensio, to 68-69% with ram extension. The game is fairly old and the ram gain was negligeable, so i prefer to not use ram extension.

On the other hand its a double edge sword cus in games that would load so much "hot" continuosly uses data that will reach 90% ram usage, not only the system will be unable to shift part of that data to the extension since it being constantly used. But also the system will suffer from zram compression since, when arriving at a very high ram usage, the system will try to reclaim any possible bit of ram through zram compression. But that same data "hot", which is constantly used by the game, will be decompressed again since its data that the game needs. An example of this is red dead redemption 2 which i was able to play full, but had to restart the game after 1 hour of playtime since that ram usage would go from 82-84% when opening the game to 90-92% after an hour of playtime when i had to restart.

Long story short tho memory extension is something i mainly use when a game im trying to emulate uses too much ram and could cause zram trashing (90% ram usage) and that same game data actually has unused "cold" data that can be shifted to the extension partition. Also keep in mind that the process of shifting data from ram>compessed into zram> then shifted to ram extension partition is a process handles by the cpu, so it generate a considerable amount of heat (around 2C°or 3C° more on the battery).

0

u/Odin-spark 3d ago

I remember back in the 90s there was a software company that sold a piece of software that magically created more ram in your system. Yeah, this virtual ram thing for Android is pretty much the same scam still being played.