Virtual RAM
Spudnick2035
Member Posts: 9 β
Two days ago, after a mate told me about virtual ram on phones, I changed mine, I have a lot less input lag, a lot less freezes from the game!
If your phone has the ability for this, I would highly recommend it
Only down side to it, it doesn't make you suck any less π€·ββοΈ
If your phone has the ability for this, I would highly recommend it
Only down side to it, it doesn't make you suck any less π€·ββοΈ
13
Comments
So you can have for example:
4gb VRAM
8gb Regular RAM
8gb Virtual RAM
The Virtual RAM will always be slower than the dedicated RAM as it uses the storage memory and has to go through different lanes to reach the CPU, and those lanes are almost always slower than the direct RAM lanes.
What OP is referring to is Ram Plus in Samsung phones. It allows a user to dedicate more virtual ram from internal storage to increase performance. Article here- https://www.google.com/search?q=how+to+free+virtual+ram+s21&rlz=1C1GCEA_enUS985US985&sxsrf=ALiCzsZVFAUmGpVzNTLh_I_DP8MW45GaGw:1658420964558&ei=5H7ZYrvQIYOgqtsP1KKTuAQ&ved=0ahUKEwi70uvDs4r5AhUDkGoFHVTRBEcQ4dUDCA4&uact=5&oq=how+to+free+virtual+ram+s21&gs_lcp=Cgdnd3Mtd2l6EAM6BwgAEEcQsAM6BAgjECdKBAhBGABKBAhGGABQkQlYrSVg0iloBHABeACAAVuIAcgGkgECMTKYAQCgAQHIAQjAAQE&sclient=gws-wiz#kpvalbx=_737ZYoSDJ5qjqtsP37ONmAg26
The short version is that when apps run low on memory the OS typically asks running apps to release some for use by other apps. These apps in turn generally give back memory that is storing things it can fetch from disk again. This frees memory but slows those apps down, because fetching from disk is way slower than if it was just sitting in memory. Virtual memory does something similar, it uses disk as if it was memory and the OS swaps thing from disk to memory to try to keep the stuff apps need in memory, and stuff they donβt need right away on disk. The apps think that stuff is still in memory, and the OS tries to bring it back when the app asks for it. The difference between virtual memory and memory eviction is the OS has to guess what the apps needs and what it can give up. If the OS doesnβt guess as well as the app does, virtual memory can generate worse performance (on a mobile device) than just letting the OS run short of memory.
Iβve also heard that using virtual memory can degrade flash storage over time, because the flash storage runs out of write cycles faster when used this way. But I donβt know if thatβs just a theoretical problem or a real world problem observed in the wild.
RAM Doubler (and its ilk) added one more trick. Instead of swapping to disk - back then, there was often no disk to swap out to - RAM Doubler swapped out to other memory. However, it first compressed the contents of that memory before moving it to other memory, so the net effect was that all that stuff took up less space in memory. In effect, memory contents were compressed to be smaller, allowing more stuff to fit into main memory.
(You needed to play the memory swapping game because the app cannot be allowed to read the memory directly because it is compressed - it would look like gibberish to the original app).
When memory started to become dramatically cheaper, the performance penalty (and occasional weird incompatibilities) of products like RAM Doubler combined with the arrival of more advanced operating systems that had their own complex memory managers made them less attractive and the technology fell out of fashion. However, it has made a come back in the age of virtual server technology. VMware, for example, uses essentially an identical technology technique in its memory compression feature for virtual desktops.
The state of the art is memory deduplication. The idea here is that often, multiple applications are doing similar things and might be storing identical data in memory. The operating system can be programmed to detect this, and when this happens it tosses one set away, freeing that memory, and allows both apps to point to the same data stored in one place. If ever an app tries to write to that data, the system performs a "copy-on-write" and makes a copy, giving both apps their own separate copy of the memory. As far as I'm aware, no mobile OS does this at the moment though.