Swapper [0.1.3] - tool for creating and using swap - G1 Apps and Games

Simple application for "extending memory". Helps when you need some memory for non active applications (like music player + browser + maps + etc...).
Idea taken from http://forum.xda-developers.com/showthread.php?t=482228
Requires root and SD/SDHC card.
Warning: SD card will be used as swap space. It can (and will) shorten SD card lifespan.
Application creates/rewrites swapfile.swp file on sdcard and mounts it as swap. It can use swap partition too. It can change swappiness behaviour ( http://forum.xda-developers.com/showpost.php?p=3331080&postcount=33 )
Phone switches between tasks slower, but can run more programs in parallel.
Changes remains until reboot. Disable swap to eject/mount card.
It's my first application for Android. It goes as is, without any warranty. Use at your own risk.
Sorry for my English.
If You have any problems, please check http://code.google.com/p/a-swapper/wiki/Settings , it could contain some answers. If not, please feel free to fill bug.
Requested features
Configurable swap size
Configurable location of swap file (fixed location reset bug)
Autostart (some reports says it doesn't work)
Threaded swap creation
Widget
Memory buffer flusher (from pagubg)
Swap partition support
Permission fix
= finished = finished, needs testing = not finished
History
0.1.3: Swap partition support. Debug logging on problems.
0.1.2: a-c Test builds
0.1.1: 1.5 build. Autostart, interface changed.
0.0.6: Stable build. Works with version 1.5
0.0.5: Added some features (path to swap file, progress indicator). Tweaked visual apperance.
0.0.3: Added swappiness settings (Thank you for pointing it out, MoridinBG), some information output.
0.0.2: First release
Moved to code.google.com.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
http://code.google.com/p/a-swapper/

Consider changing the default swappiness behaviour, as described in my post at page 3 of the thread. With the default value, 60, the phone uses the impossibly slow swap too much and after some use the entire system becames unusable.
Lowering it to a lower value, like 20 or 10 makes it swap rarely, while still using the swap to not force applications to unload and the system is usable, even after long time use.

Does this really work? I tried it and set the swappiness to 10 and 20 and then went to the browser and loaded a bunch of "heavy" websites. After that I switched to the home screen and there was still a significant lag.

its working yes, program is probably good but swaping in embedded devices with so few memory like this is a terrible idea, keep testing anyway.
what maybe is worth the effort is looking at the kernel code and and recompile it removing first netfilter and some other unused things (or compile it as modules) to gain 1Mb or two, and gain significant speed removing the debug features that normal users doesnt want/need. there isnt much which can be done until someone figure out how to recover the other missing 128 mb who is said are eaten by graphic framebuffers.. i dont believe that.

Yes, there are some lags, but it's the best "user friendly" way now available not to close nessesary background applications as far as I know (correct me, if I'm wrong).
Working for me (I wrote application for easy turning it on and off - using swap only when nessesary, not all the time).

ex87 said:
Simple application for "extending memory". Helps when you need some memory for non active applications (like music player + browser + maps + etc...).
Idea taken from http://forum.xda-developers.com/showthread.php?t=482228
Requires root and SD/SDHC card.
Click to expand...
Click to collapse
First off, nice work with my initial idea
Questions however: Can you make the swap space size configurable? Also, I see that you went with my original hunch of /sdcard/ . This poses some challanges: it is required that swap is turned off before you can mount the card as a flash drive in your PC. There are also other issues I will probably be able to think of when I'm not so tired.
A configurable option of either /system/sd/ (for LucidREM's JFvMod build) or /sdcard (for those who havent moved the Apps/Data/Caches to SD) would be ideal!
Thanks for making a great quick gui! I have no idea where to start with java.

If any of Swapper users use LucidREM's JFvMod build - please test swapspace placing to /system/sd/ . Thank you!

Question
Yep, I'll be that first guy to ask the question. I will accept the consequences. Where can yo direct me to better understand the settings/configuration options available? I would like to understand this before I make changes. Also as a starter if you could recommend an appropriate config for an 8gb class 6 sd card, I would appreciate it.
Thanks to all!

Just to remind you. Set the Swappiness to 10 before or immediately after creating swap or you would experience incredible slowness in a couple of minutes.

Settings:
Swap size = size of file for swapping.Here info for reading http://en.wikipedia.org/wiki/Swap_space
Location = path where to place swap file (Locations button contains predefined paths, one is /sdcard/swapfile.swp, other is /system/sd/swapfile.swp - for those, who divided their sd cards for application sorage).
In program you have swappiness option - range 0-100 - how much you would like to swap. My tests showed that best performance/usability (for my sd+phone) is 32 MB swap and swappiness = 10. Your preferences can differ.
Changes are saved till system restart. After restart you should reenable swap and reset swappiness. Configuration about swap size and location is saved in program. Before configuring swap path please disable swap.
In default place swap is blocking mounting procedure of phone to pc. If you want to mount it, you should disable swap.
About sd configuration - here is one link with instructions. I haven't done it myself yet because of slow sdhc ("quick" sd card is only 1 GB) http://forum.xda-developers.com/showthread.php?t=480582

thanks
Thanks for the info. I apreciate not only the answers but a source to learn from. Rock on.

It makes the camera usable! Thanks!

I've been trying every convievable combination of swap size, location and swap levels.
I started with 32Mb and 15 which proved to be unstable then 10. So then 16Mb w/ swap @ 15 and 16Mb/10 which still provided to be unstable.
All the above combination tested on both /sdcard and /system/sd.
Is a class 4 just to slow for this to work? I'd imagine it wouldn't be but I cannot get this to run stable period.

joshtheitguy said:
I've been trying every convievable combination of swap size, location and swap levels.
I started with 32Mb and 15 which proved to be unstable then 10. So then 16Mb w/ swap @ 15 and 16Mb/10 which still provided to be unstable.
All the above combination tested on both /sdcard and /system/sd.
Is a class 4 just to slow for this to work? I'd imagine it wouldn't be but I cannot get this to run stable period.
Click to expand...
Click to collapse
I think it was discussed somewhere else. You need at least class 6 if you want to get any speed out of anything, especially "apps/caches on sd". Not sure about this swap deal. Sdhcs are considerably cheaper now days, I got my class 6 (8gb) for $18 from MicroCenter.
Good luck

So how do I revert to factory swap settings? I know I can set the swappiness back to 60, but what tells the system where the swapfile is?

when i run the lucidrems location save button, it doesnt start teh program. My cache is moved to the sdcard so i thought i should use this one. When i do it doesnt work.. if i switch back to the defualt it works fine again.. is it ok?

Hello! Sorry for delaying with answers, haven't much time, too much other things to do...
mlevin said:
So how do I revert to factory swap settings? I know I can set the swappiness back to 60, but what tells the system where the swapfile is?
Click to expand...
Click to collapse
After restart all system settings are back to default.
There is no default swap file.
no6969el said:
when i run the lucidrems location save button, it doesnt start teh program. My cache is moved to the sdcard so i thought i should use this one. When i do it doesnt work.. if i switch back to the defualt it works fine again.. is it ok?
Click to expand...
Click to collapse
I haven't tested this, it's theoretically working, but I haven't made mod myself. I'm now waiting for new SDHC class 6 card from ebay, will mod and test it. At the moment I have slow SDHC card. Swapper + mod will be too much for it
If you can, please check (after launching swapper swap on), do you have file named swapfile.swp in /system/sd.

This works great, I'm using 16mb/10swappiness on a class 2 and it works great with no crashes thus far!

is this bad for your SD card? Because it says " * SD card will be used as swap space. It can (and will) shorten SD card lifespan. "

G1-evolve said:
is this bad for your SD card? Because it says " * SD card will be used as swap space. It can (and will) shorten SD card lifespan. "
Click to expand...
Click to collapse
Yes, it is bad for your SD card, you "quoted" that sentence from the OP.
SD cards have a limited write cycle (10.000 or 100.000 times per "sector"), using it for swap in a specific region will shorten your card life.

Related

[Tool/App] user.conf Creator v0.4 for CM and OfficialDonut [8/12/2010]

Update: v0.4 has been released. See changelog in the next post.
You can download the app using the link below or from the Android Market. Click or scan the barcode below.
This is essentially a visual representation of the user.conf file. I created this app because a few people I know have a hard time pushing files in terminal or ADB. This app allows you to push user.conf and userinit.sh files via an app. For people who have trouble editing their user.conf file or find terminal or ADB too complicated, here's your answer. There is no need to edit the user.conf file or even download one for that matter. You simply enter the values into the various boxes and click a button. That's it.
Complete help documentation is included within the app itself so I will not include it here, at least not now.
Important Note: This app does NOT validate your input. Please use the threads below to find out what values are necessary for your particular ROM.
This app is based off the user.conf and userinit.sh files found in the following posts:
For Cyan 3.6.8+
http://forum.xda-developers.com/showthread.php?t=542899
For Cyan 4.1.99+
http://forum.xda-developers.com/showpost.php?p=4823045&postcount=536
For Official Donut 2.1.1+
http://forum.xda-developers.com/showthread.php?t=538456
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For the changelog, see the next post. Please keep this thread on topic. Do not post user.conf issues here. Post your user.conf issues to the proper thread using the links above. This app simply represents those user.conf/userinit.sh files. I will not change the structure of the files nor do I really know much about them. I am more than willing to answer questions regarding this app and hope to update it as needed.
********************************
Note: This may very well work on other devices. If someone can point me in the direction of user.conf and userinit.sh files for other devices I will add them to future versions of this app, time permitting.
********************************
This app is also in the Android Market.
After downloading, change the extension from .zip to .apk and install as you would any other non-Market app.
Changelog and TODO
Changelog
v0.4
• Added a bunch of different CPU frequencies, pretty much everything I found in SetCPU. I haven't tested this but since it just prints it to a user.conf file, it should work fine as long as the device supports the frequencies you set.
v0.3
• user.conf file actually gets pushed now. Big thanks to XDA forum member andrew richardson for pointing it out. Update above, in the Market and on SlideMe.org.
v0.2.1
• Name change to user.conf Creator (not user.conf Editor since you are only really creating the files, not editing them)
v0.2
• Added support for Cyan 3.6.8x+
• Added support for Official Donut
• Added option to backup you current file(s)
v0.1
• Initial release
TODO
• Add some seriously awesome validation.
• Add support for Hero ROMs (although untested,the Cyan 3.6.8x+ option should work)
• Add some presets
• Possibly look into making this an actual "editor" in that it will read your current user.conf file.
Looks like an extremely helpful app. Gonna check it out. I really only use linux swap so looks like i can focus on that and leave the default configurations for the other options, am i right?
This is a really good idea, and if you get the validation sorted, which you probably will, it will stop masses of people, including me stopping their whining. There will be little to no excuse of not being able to make your own user.conf, and I can see this being introduced to the big roms soon.
2leaponover1 said:
Looks like an extremely helpful app. Gonna check it out. I really only use linux swap so looks like i can focus on that and leave the default configurations for the other options, am i right?
Click to expand...
Click to collapse
Yes with a swappiness of 50.
AndroidAppCritic said:
Yes with a swappiness of 50.
Click to expand...
Click to collapse
Ok so I also only want to enable the linux-swap partition I have. I would just check the linux_swap_en correct? Then push file and reboot?
strikerz911 said:
Ok so I also only want to enable the linux-swap partition I have. I would just check the linux_swap_en correct? Then push file and reboot?
Click to expand...
Click to collapse
If you wanted to enable your linux-swap ONLY (with no other settings), simply open the app, select your ROM, push and reboot. By default, if you do nothing, the app will push a user.conf with linux-swap enable with a swappiness of 50 for Cyan 4.1.99+. Everything else is disabled (or rather, not enabled).
But like I said in the OP, any configuration issues should really be addressed in the proper thread since this is literally an exact copy of those files only with a GUI attached. While I have a pretty good understanding of the various settings, the people who write userinit.sh files know far more than I do.
Well, no issues here. =) Thanks for your immediate help. I appreciate it.
Would be nice if it could read our current settings.
bubonik said:
Would be nice if it could read our current settings.
Click to expand...
Click to collapse
Yeah, that was my original plan. But it's too much for me to do now. When my workload eases up at the end of December, perhaps I'll tackle that. I know how to do it but I just don't have the time now to write the code.
May I use it on any ROM or just on those three?
no user.conf
When I run the app it says it pushed the user.conf and the userinit.sh, but only the userinit shows up in the folder.
andrew richardson said:
When I run the app it says it pushed the user.conf and the userinit.sh, but only the userinit shows up in the folder.
Click to expand...
Click to collapse
I'll check it out.
EDIT: OMG. Hundreds of downloads and you're the first to notice that. WOW! I've been running an older version of the app so it's been working for me. I had commented out the lines in the code while testing something and never un-commented them. I am re-signed the package and will upload it here, in the Market and on SlideMe.org. Thanks for pointing out what should have been ridiculously obvious.
michal_banszel said:
May I use it on any ROM or just on those three?
Click to expand...
Click to collapse
It should work for other ROMs if they use the user.conf/userinit.sh files from the links provided in the OP. You can test for me if you wish and if there is a specific ROM for which you need support, let me know the ROM and where the user.conf/userinit.sh files are located and I will add it when I have time (not that I have much lately).
user.conf
yes i have a question.. i used your app and i pushed the files on the linux swap to 32 mb... so now when i type free in the terminal it reads
total used free
shared buffers
mem: 107100 104264 2836
0 652
swap: 31424 24944 6480
total: 138524 129208 9316
well the question that im asking is how can i turn the swap off back to 0..cuz before my swap read 31424 it read 0 across .. i really appreciate if i can get an answer .. thanks
AnGeL_WiT_SiNs said:
yes i have a question.. i used your app and i pushed the files on the linux swap to 32 mb... so now when i type free in the terminal it reads
total used free
shared buffers
mem: 107100 104264 2836
0 652
swap: 31424 24944 6480
total: 138524 129208 9316
well the question that im asking is how can i turn the swap off back to 0..cuz before my swap read 31424 it read 0 across .. i really appreciate if i can get an answer .. thanks
Click to expand...
Click to collapse
Are you asking how you can turn your linux-swap off? I'm having trouble understanding your question. If you want to turn the linux-swap off, uncheck all the linux-swap, compcache and swap file checkboxes and re-push the files.
Holy crap! I just got a new SD card (8GB Class 4) and set this up with the settings from the rist post and it SCREAMS!! Hopefully it will be stable with thtese settings. I am running Cyan 4.2.7.1 on G1.
Time for New release?
I am trying to use this with CM 4.2.13 to enable 32mb compcache + the backingswap feature (32mb swap partition). When I set the checkmarks for these items & pushed the file & rebooted my phone lagged really bad so I 'pulled' the files over to SD with the backup option & renamed to .txt so I could view in a notepad app rather then in terminal... low & behold the default app settings had been pushed, not my selected settings. I am wondering if something drastic has changed within CM that would mess with your file creation or what else could have caused this? (I am not leaving out human error on my part) I went into terminal & rm /system/sd/ user.conf & userinit.sh so i can try again clean. Please tell me you are still actively supporting this app! I love its potential for ease of use in manipulating these files.
Also I'm not sure what settings I should put in on compcache+backingswap, here is whats running on my phone...
I have (on my sig phone/SDcard/ROM) blackicedroid theme with stericson lockscreen & advanced launcher built in, 4 home screens,
Widgets : last.fm, myspace friend status, facebook status, Google Calandar, android power control bar, F*ck my life 1x4, three weather bug small (1x1)...
17 app shortcuts
Active background Apps : Twidroid, eBuddy (logged into 2 chat accnts), Craigsnotifica (15 regions being scanned).
~psguardian
i need a little help
Hey guys, I think your app is amazing dude. I'm fairly new the rooting my phone, I have done a lot of similar things in the past, but never involving a phone. I have a T-Mobile myTouch 3g, i love this phone, but i wanted to see what it could do. i work with other T-Mobile coworkers and many of them rooted using the CyogenMod. Today there was a bad snowstorm so i stayed in and rooted my myTouch. everything went great! i love this phone so much more, i cant believe it!
Anyway, i know i can over clock it. and i saw that the creator uses a myTouch so i figured I followed his photo settings in the first post. I want to over clock my phone to the best of its abilities but I don't really wanna push it TO its limits. I'm just wondering if basically those two settings scaling_min_freq and scaling_max_freq are what is going to control the processing speeds, and what is best in my case? I initially followed AndroidAppCritic's same values, but I lowered my max value to the 300K limit. Is that a ok? I mean, I'm guessing it lets my phone only really reach that max value when it needs to, but what does the minimum speed have much to do with it? I set mine to the same 245760, but should I lower this since I'm running a lower maximum frequency than 528000?
Thank you.
I can't update or install any apps, it says there isn't sufficient memory.
I have a G1 with cyanogenmod 4.2.14.1 with
apps2sd checked
compcache_en checked with 32 cc_disksize
cc_backingswap checked with 60 swappiness
I don't know what I'm doing wrong but help would be greatly apreciated. And also my swap partition is 128MB since I tried a rom that required that much and I decided to keep it like that but I'm pretty sure that's not the problem, is it?

[Q] making the external SD primary SD

I just got the OpX2 and 16 GB SD to use with it. I found out the hard way the phone can only uses the internal SD (5.5 GB). This makes the phone practically unusable! There is a setting to unmount the internal SD, but that also unmounts the external SD >:-(
I'm thinking: Root the device and mount the external SD as primary.
Has anybody tried this?
Update:
I started this thread because I was angry about my Spotify cache did not fit on the 5.5 GB internal SD. But Instead of mounting the cards differently, I figured well maintained Apps will gain support for this kind of internal/eternal storage so changing the mount points might disturb other apps, I hacked the Spotify apk to put the chache on the external SD card. The path to the eternal storage is hard-coded not a setting, anyways I changed it from /sdcard[/spoify2] to /sdcard/_ExternalSD[/spotify2].
Here is a link to the modified Spotify apk.
Yeah, I would like to know this too.
What exactly are the problem you think you have which makes it unusable ?
If you add a 32 gb SD card then it is seen as external SD card and you cannot use it to install applications on because the internal storage is mounted as "internal memory" and "SD card". That's the problem.
Well, it would need a kernel change first but it can be done:
First:
mount /dev/block/mmcblk0p9 to something other than /sdcard at boot
Then:
mount /<your mount point>/_ExternalSD at /sdcard
I think your SD card would have to have an EXT partition which is what would be used. And because of this there's little point.
ULJ said:
If you add a 32 gb SD card then it is seen as external SD card and you cannot use it to install applications on because the internal storage is mounted as "internal memory" and "SD card". That's the problem.
Click to expand...
Click to collapse
No that is not really a problem. You can never install applications on the SD card - no matter if its internal or external (unless you hack the phone)
On android phones, theres a dedicated apps partition where apps get installed, on most phones this partition is only a few hundred mb big (the Desire for instance only has 145mb), on the LG it is 1.45gb - besides this internal apps partition Android 2.2 has a function called "move to sd" which you can select for individual applications. This function only moves some part of the application to the SD card but still leaves some part of the application in the apps partition. Hov much you can move and if you can move anything at all depends on every individual application - some apps dont support this function, others only move little to the SD card, and then others again move a larger part to the SD card.
Its true that when using this function you are limited to the internal SD card which is an extra 5.5 gb - but the point is that this is plenty space for apps, because Android apps dont take up GB's of space. They are mostly very small (few kb or mb) and hundreds of these will easily fit inside the 1.45gb apps partition, except for a few 3d games which make take up an additional 1-300mb of gametextures being stored on the SD card.
But overall you have easily around 6gb for apps storage which is plenty of space for this particular purpose for almost anyone, no matter what use they have. It would normally mean allowing for hundreds of varied apps to be installed. Just dont fill up the internal SD card with other things like mediafiles (music, video etc.) - instead place these kind of files on the external SD card.
Talking about the phone being unusable because it "only" has around 6gb of apps space is a little silly. Sure if the only apps you want to install are 3d games and we imagine each of them taking up 200mb for textures - then you are limited to 30 games, or 60 games if each take up 100mb (unless some of them would allow the textures to be installed on the external SD card) - but how likely is that scenario ? And even if, it doesnt really make the phone "unusable" - then you would just prioritize and install the 20-40 most important ones. Noone "needs" to have 30-60 3d games installed at the same time on a phone. You cant even get 30 3d games of that size currently.
I don't have any interest in storing apps on the SD, I want apps that store things on SD to have enough space.
I might want to use Spotify (a music player streaming music from a remote server). This app has the possibility to cache music so you do not have to wast your battery on constantly streaming over 3G/wifi and also have it available where connection speeds are low or no connection is available, or if you are abroad.
All in all the standard music cache I had on my Desire HD (before it was stolen in Cambodia) will nott fit on the 5.5GB of internal SD and if I cut it down to fit, I will still have problems with other apps like map applications that also need a lot of storage. The phone camera also stores it's pictures on the internal SD.
There are just so many reasons why what LG has done is stupid. It's a top of the line phone, why on earth limit the external SD used by applications to 5.5GB when you otherwise could put in 32GB SD-card??
sorech said:
I don't have any interest in storing apps on the SD, I want apps that store things on SD to have enough space.
I might want to use Spotify (a music player streaming music from a remote server). This app has the possibility to cache music so you do not have to wast your battery on constantly streaming over 3G/wifi and also have it available where connection speeds are low or no connection is available, or if you are abroad.
All in all the standard music cache I had on my Desire HD (before it was stolen in Cambodia) will nott fit on the 5.5GB of internal SD and if I cut it down to fit, I will still have problems with other apps like map applications that also need a lot of storage. The phone camera also stores it's pictures on the internal SD.
There are just so many reasons why what LG has done is stupid. It's a top of the line phone, why on earth limit the external SD used by applications to 5.5GB when you otherwise could put in 32GB SD-card??
Click to expand...
Click to collapse
+1 I do agree. This phone is useless if you can't use its external SD like it works on HTC Desire etc.
It doesn't make sense that the phone support SD cards up to 32GB, but you can only use it as a backup space. Practically.
I also use Spotify with Offline function enabled. Then I have aprox 3000 songs stored, and my internal storage isn't big enough. Doh!
Sent from my talk i tapeten
spawndk said:
No that is not really a problem. You can never install applications on the SD card - no matter if its internal or external (unless you hack the phone)
On android phones, theres a dedicated apps partition where apps get installed, on most phones this partition is only a few hundred mb big (the Desire for instance only has 145mb), on the LG it is 1.45gb - besides this internal apps partition Android 2.2 has a function called "move to sd" which you can select for individual applications. This function only moves some part of the application to the SD card but still leaves some part of the application in the apps partition. Hov much you can move and if you can move anything at all depends on every individual application - some apps dont support this function, others only move little to the SD card, and then others again move a larger part to the SD card.
Its true that when using this function you are limited to the internal SD card which is an extra 5.5 gb - but the point is that this is plenty space for apps, because Android apps dont take up GB's of space. They are mostly very small (few kb or mb) and hundreds of these will easily fit inside the 1.45gb apps partition, except for a few 3d games which make take up an additional 1-300mb of gametextures being stored on the SD card.
But overall you have easily around 6gb for apps storage which is plenty of space for this particular purpose for almost anyone, no matter what use they have. It would normally mean allowing for hundreds of varied apps to be installed. Just dont fill up the internal SD card with other things like mediafiles (music, video etc.) - instead place these kind of files on the external SD card.
Talking about the phone being unusable because it "only" has around 6gb of apps space is a little silly. Sure if the only apps you want to install are 3d games and we imagine each of them taking up 200mb for textures - then you are limited to 30 games, or 60 games if each take up 100mb (unless some of them would allow the textures to be installed on the external SD card) - but how likely is that scenario ? And even if, it doesnt really make the phone "unusable" - then you would just prioritize and install the 20-40 most important ones. Noone "needs" to have 30-60 3d games installed at the same time on a phone. You cant even get 30 3d games of that size currently.
Click to expand...
Click to collapse
You are correct in most of what you are saying. However, if one uses a GPS navigation application like the one from Sygic, then you cannot place the maps on the external sd card as they will not be viewable for the application. Only from the sd card (on 5.5 GB which is part of the internal built-on memory) is the maps viewable. Now, thats a problem!
Its not LG that is doing something wrong .
Its actually all the people that are making apps that are on the wrong end. When they made their apps they werent accounting for the fact that phones would have 2 SD cards and as such wrote their software rather "limited".
All you need to do is basically to get the app developers the notice that phones like the LG, and various other phones with both Internal and External SD are having storage issues with their app. And then hope your app will get adapted in such a way that it supports the option that you can select where to save your files .
Look at Titanium Backup for one, it fully supports the external SD. Astro does as well. Its all a matter of "proper" coding from the app developers. The second they adapt their code to support external SD the problem is solved.
SO as such this is not an LG related issue but more a app related issue
ah ok I understand
- the spotify and GPS navigation examples are certainly valid points, I agree in situations like that it is an issue.
But its an issue that wont be limited to the LG, several new models will be coming with some amount of limited internal SD storage.
Shouldent it be an issue that is delt with on application level by the app developers rather than on hardware level ? Like, isnt it just poor application development that the source placement of this cache, maps, textures or whatever isnt selectable by the user ?
A sollution might be to contact the developers of the apps in question and ask them to
make a selectable option in the App for where to store this - an option where the user can select either internal or external SD.
Edit: I see MeX_DK had the same thoughts as I did
I actually had that thought when I got my LG and looked up the issue at first, thinking I was supposed to have a choice and then found out it was an app issue and not a phone issue .
So just like you I thought it might be worthwhile to spread the word so that many people can open their mouths and let the world know of the problems to come
TB won't find my External..
MeX_DK said:
Its not LG that is doing something wrong .
Its actually all the people that are making apps that are on the wrong end. When they made their apps they werent accounting for the fact that phones would have 2 SD cards and as such wrote their software rather "limited".
All you need to do is basically to get the app developers the notice that phones like the LG, and various other phones with both Internal and External SD are having storage issues with their app. And then hope your app will get adapted in such a way that it supports the option that you can select where to save your files .
Look at Titanium Backup for one, it fully supports the external SD. Astro does as well. Its all a matter of "proper" coding from the app developers. The second they adapt their code to support external SD the problem is solved.
SO as such this is not an LG related issue but more a app related issue
Click to expand...
Click to collapse
You wrote that Titanium Backup finds the external SD-card...does it ? It won't find my external....if you know why, please help
//K
See the following Image and you will see what I have done in order to get Titanium Backup to do to use my External.
Just a shame dropbox doesnt do the same >_<
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
any usefull script plz? i have 1gb free.....TERRIBLE!
Go blame your app developers. ITS THEIR FAULT....
If you have an app that uses or is supposed to use a lot of space go bang on that developers door and ask him/her to please support external SD usage.
devel? it is way on long time....>D
adfaf
could any one tell me and write me a sript for boot?
mount -t vfat -r -w /dev/block/vold/179:17 /mnt/sdcard/
mount -t vfat -r -w /dev/block/vold/179:9 /mnt/sdcard/_ExternalSD
rulezzzor said:
could any one tell me and write me a sript for boot?
mount -t vfat -r -w /dev/block/vold/179:17 /mnt/sdcard/
mount -t vfat -r -w /dev/block/vold/179:9 /mnt/sdcard/_ExternalSD
Click to expand...
Click to collapse
You'd have to do it in the kernel really. Swapping them after they've been mounted would be a bad idea.
yeah, any idea could anyone create a zip with update? it will be nice

[MODULE] Swap Torpedo - run faster and more reliably

Using compressed RAM for swap on a phone with enough RAM in the first place sucks.
Let's take a look using RAM Truth from the Play Store -
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It makes no sense to use 500 MB of swap with 3 GB RAM free!
If yours already looks like the second picture, 0 swap, you're done, you don't need this module.
(Note - we're going to update RAM Truth - the swap type used on the honor is zram.)
But if you need to get rid of swap, here you go -
Swap Torpedo - A Magisk Module
Universal compressed-memory swap (zram, etc etc) destroyer - run faster and more reliably!
By EarlyMon - version 1.1
Swap is a way to expand your RAM using clever software and some unused storage space. You see it a lot in Android as zram or vmswap, that is, compressed-memory swap. Storage-based swap is fine, compressed-memory swap - not so much.
Swap is a fine thing for desktops with sufficient resources and for Android devices really hampered with too little ram.
On Android it was originally intended for devices with less than 1 GB RAM.
If you have an Android One or another small-memory device, this is NOT the module for you.
But if you have 2 GB of RAM or more, you want this.
Do you suffer from lag, random UI pauses, apps not running correctly and consistently, and background apps failing even when you have them marked for protection? Do you have to reboot every day or so to restore speed?
All of that is almost always caused by having swap implemented and the Swap Torpedo fixes it.
Manufacturers, including Google, have fallen in love with compressed-memory swap because it allows your Android to synthetically appear better at multitasking. In reality, it ruins multitasking.
Why? For large memory devices you want the swap space to be at minimum the square root of your RAM size and ideally the same size as, or up to double the size of, your RAM.
The problem is that they don't use enough space because they can't - they're basically using a compressed RAM disk as a swap partition.
If you think about that, it will raise the right questions.
Does it make sense to use RAM for something other than apps and the operating system? Does it make sense to constantly have the operating system pause while it shuffles and reorganizes your RAM? Does it make sense for you to wait on everything while various pieces of RAM are getting zipped and unzipped to support this scheme? Does it make sense to do all of that incorrectly in the first place because you can't get enough swap space to properly support multitasking, by design?
No. No it does not.
Swap Torpedo is the answer.
I designed it to be universal for any Android that Magisk version 15 and above supports. If you're not using swap, or if you installed your own swap solution that writes to a special file in storage, Swap Torpedo harmlessly does nothing.
Verify your swap situation with RAM Truth available on the Play Store. It's free and it will never spy on you or ask for special permissions.
Donations are humbly and gratefully received at [email protected] but not expected. My personal reward is knowing that I helped and you are having a better day now.
This module was developed entirely on an honor View 10.
Notes -
Some phones may need a few minutes after boot to clean up swap/zram - not all, just some - and that's completely normal
May not work on all devices but will probably work for you - ask here for help
Changelog -
(early change) 2018 April 27
Increased initial maximum wait time to 60 seconds. Your additional boot time will be about 3 seconds or so, usually less.
v1.1 - 2018 April 1 - functional improvement
Detached background processing, added Pixel and similar support.
Expanded zram command sequence for devices requiring stricter adherence to the rtfm.
Waits up to 45 seconds for swap to activate, expands support for non-flagship phones.
v1.0 - 2018 March 17 - initial release
Download -
Beta versions are exactly that so you may have trouble with Magisk 16.4 for example (or you may be ok) - please let me know, thanks!
Check out the v1.1 release at bottom of the first post above
Open Source -
https://github.com/Magisk-Modules-Repo/swap-torpedo
Just because it's open source does not mean that you ought to avoid giving me a few million dollars if you happen to be a billionaire. Let's face it, Swap Torpedo just made your life a lot better than the last guy you gave serious money to, and plus you'll have me in your corner verifying that regular billionaires such as yourself do too root and use Magisk. Trust me, the other billionaires will be so jealous they won't know whether to die or go bowling.
I hope that this clarifies the importance of open source software once and for all.
Thanks and Credits -
Nitin Gupta because real information comes in Courier, plain text or it didn't happen
@topjohnwu because in my mind I was totally going to invent Magisk first... OK don't be insane, I'm just kidding - Doctor Wu by Steely Dan is a great song and I'm not sure but I don't think it has anything to do with Magisk, no one really knows for sure - Magisk is great, mmmkay, thanks John
Special thanks to all of the heroes named by @topjohnwu and the unnamed ones as well. My people have an ancient saying that applies here - Without you, we'd be screwed!
Thanks to everyone in the thread who worked with me to help make Swap Torpedo better
Thanks to every one of you using the Swap Torpedo - I get that you get it
Finally, I thank my wife - she had nothing to do with Swap Torpedo but probably someday she'll say that I'm not grateful and I'm going to show her this special credit - I'm sure that will go really well for me, how about you?
Other Stuff -
Official module, 2018-3-26.
There's a shortcoming in RAM Truth that throws off the illustration in the first post - it misidentifies the swap type on Oreo and when vmswap is used. We're looking into that. If it says that your Android is using swap and you didn't put it there, Swap Torpedo is for you.
Secrets About Swap Torpedo -
Runs swapoff on every /dev entry in /proc/swap(s) during late boot. Making it universal may be harder than you think. Or not, I couldn't say.
That's it. Nothing else is left running from Swap Torpedo once the payload is delivered, nothing else is changed.
Your Android runs fewer processes and is slimmer and trimmer if you needed it (and you probably do) thanks to Swap Torpedo.
Uninstall the module and it will be as if it was never there. Swap Torpedo targets each boot session.
No more, no less.
A Quote -
EarlyMon said:
Use whatever works!
Swap Torpedo has no pixie dust nor do I expect it to ever get any.
I've had to redevelop this solution for years, every time I or a friend got a new phone saddled with swap.
I made this module so I could stop reinventing the wheel and so that it would be easier for others to enjoy the benefits.
If you have something already that gets rid of swap, or if the Swap Torpedo doesn't work for you, definitely use the other instead.
Check out "EX Kernel Manager"
https://play.google.com/store/apps/details?id=flar2.exkernelmanager
Check out "Kernel Adiutor (ROOT)"
https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
Click to expand...
Click to collapse
Thanks! Will check it out and report back after using it a bit.
Do I need this if I have Adaptive LMK and ZRAM disabled?
Sent from my HTC 10 using XDA Labs
Megan said:
Do I need this if I have Adaptive LMK and ZRAM disabled?
Click to expand...
Click to collapse
Nope.
The Swap Torpedo will check and discover that zram is disabled and exit without doing anything else in your case.
I'll wait until stable release
hoping this project grows. will watch this till end
---------- Post added at 03:29 PM ---------- Previous post was at 03:23 PM ----------
i got another phone with 500mb ram. This module will work as it says originally intended for 1gb ram below.
It runing ??
How to check this module is works.
lanserffnt said:
It runing ??
How to check this module is works.
Click to expand...
Click to collapse
That's how to check.
Did it reboot after installation?
Please show me what it says when you type in a terminal, as root -
Code:
cat /proc/swap*
Yes reboot after installed
lanserffnt said:
Yes reboot after installed
Click to expand...
Click to collapse
Please uninstall and try this test version, thanks.
(removed asus test module)
Which version of Magisk are you using?
Magisk 16.2
lanserffnt said:
Magisk 16.2
Click to expand...
Click to collapse
I haven't tested with the beta Magisk, highest I've gone is 16.
Did you try the new test version (linked above) yet?
If that doesn't work, have you installed the busybox-ndk?
I try it test3
Have install busyboxndk
Magisk 16.2
https://forum.xda-developers.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589
lanserffnt said:
I try it test3
Have install busyboxndk
Magisk 16.2
Click to expand...
Click to collapse
I've had another user report that it works correctly with 16.2 so it must be something with the ASUS.
I use zenfone3
If It's work should show??
Pixel 2 P DP1 freezes on boot at the Google logo
Any pixel 2 xl?
Enviado desde mi Pixel 2 XL mediante Tapatalk
lanserffnt said:
I use zenfone3
If It's work should show??
Click to expand...
Click to collapse
0 swap, like the second picture in the first post.
Telperion said:
Pixel 2 P DP1 freezes on boot at the Google logo
Click to expand...
Click to collapse
That's unusual. May I ask what other modules you are using and what other modifications, if any?
And you used the one in the first post?
What should it show in terminal?
I am using it on LG G4 v29 (Nougat beta) and it doesn't show anything when I write "cat /proc/swap*". :/

mFSTRIM: A REAL, FOSS fstrim utility for Android, no root necessary

Hey XDA!
I actually just posted about another app called Buoy, but over my spring break I went ham and made four apps and I wanted to show off two of them to get some feedback. So here's mFSTRIM!
What is fstrim?
So you know how hard drives get fragmented over time right? Data is placed far apart from other data, increasing latency as the disk needs to physically seek to a certain partition of the disk to read/write data. Well, flash storage doesn't really get fragmented. Instead, when parts of the flash are deleted, the system doesn't actually have a way of knowing which sectors it doesn't care about anymore, and which ones it does. So we go through periodically and TRIM (hence fstrim, the command line utility that does this) all the unused blocks so the system can use them again.
Doesn't Android ALREADY fstrim regularly?
Well, sorta. Newer versions of Android will check at midnight if the device is alive at midnight and is currently charging. If so, it will run fstrim during the next time the device is idle and charging. But what about if that can't happen? I, for one, don't plug my phone in overnight because I care about my battery health. Android also imposes an upper limit! If the device has not run fstrim within the past 3 days, it will force one during the next bootup. And here's where mFSTRIM comes in...
How does mFSTRIM work?
mFSTRIM uses Secure Settings to change how long Android can go without an fstrim before forcing one during bootup. With that logic, we can set that interval to 1 millisecond (aka, one is ALWAYS needed), so that during every reboot, an fstrim is done.
Links
Play Store: https://play.google.com/store/apps/details?id=com.draco.mfstrim
GitHub: https://github.com/tytydraco/mFSTRIM
Feedback is appreciated!
Is there a free version?
orb3000 said:
Is there a free version?
Click to expand...
Click to collapse
Hi,
Sorry, I didn't release a free version since the app is really simple. But just a tip: once you change the setting, it persists even after you uninstall. So do what you want with that information
This is awesome! Any chance to add the ability to run fstrim whilst in the app on demand?
fobtob387 said:
This is awesome! Any chance to add the ability to run fstrim whilst in the app on demand?
Click to expand...
Click to collapse
Hey! Sadly this isn't possible due to the way the app works. Internally in Android there's a setting that tells the system the longest we can go without doing an fstrim on bootup. My app simply changes this setting. The fstrim is actually done by Android still, not my app. Since the only time Android checks our newly changed setting is on a reboot, we have to reboot to make it happen. With root I can do what you suggested, but sadly without root it's not possible.
tytydraco said:
Hey! Sadly this isn't possible due to the way the app works. Internally in Android there's a setting that tells the system the longest we can go without doing an fstrim on bootup. My app simply changes this setting. The fstrim is actually done by Android still, not my app. Since the only time Android checks our newly changed setting is on a reboot, we have to reboot to make it happen. With root I can do what you suggested, but sadly without root it's not possible.
Click to expand...
Click to collapse
Would it be possible to make a root variant?
fobtob387 said:
Would it be possible to make a root variant?
Click to expand...
Click to collapse
It's possible! Also, you can run this via the command line with ADB (no root): adb shell sm fstrim
That forces an fstrim
Nice app! I set it to fstrim on reboot, and sure enough the "last-fstrim" file was modified at boot to confirm fstrim took place. The app is free in the Play Store now (reading the previous comments and it seems this may not have been always the case). I also like that the app doesn't use the network for anything at all (no analytics). I'm rooted, so it did ask me to grant root when starting it up for the first time.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey! Can we please be able to create a custom interval for fstrim?
My phone becomes slow after like 5 mins of fstrim so I'd need this to run every like 1-2 seconds. I don't want to root my phone xd
Auditormadness9 said:
Hey! Can we please be able to create a custom interval for fstrim?
My phone becomes slow after like 5 mins of fstrim so I'd need this to run every like 1-2 seconds. I don't want to root my phone xd
Click to expand...
Click to collapse
No
No
No
No, you definitely do not want to fstrim every 1-2 seconds
No.....
Your "slowness" probably comes from the discard option on the mount point, if its EXT4, takes longer to do its job
Running fstrim multiple times wont fix that
73sydney said:
No
No
No
No, you definitely do not want to fstrim every 1-2 seconds
No.....
Your "slowness" probably comes from the discard option on the mount point, if its EXT4, takes longer to do its job
Running fstrim multiple times wont fix that
Click to expand...
Click to collapse
Oh bummer. And what would fix that slowness then?
Auditormadness9 said:
Oh bummer. And what would fix that slowness then?
Click to expand...
Click to collapse
Without root nothing you do will change a thing
fstrim other than the stock ROM scheduled one will not work without root
73sydney said:
Without root nothing you do will change a thing
fstrim other than the stock ROM scheduled one will not work without root
Click to expand...
Click to collapse
Got it. And one more thing. Do you think this would work if I had root?
SSD Boost - Apps on Google Play
Minimizes writings on the your phone's SSD, increasing speed and extending life
play.google.com
Auditormadness9 said:
Got it. And one more thing. Do you think this would work if I had root?
SSD Boost - Apps on Google Play
Minimizes writings on the your phone's SSD, increasing speed and extending life
play.google.com
Click to expand...
Click to collapse
For starters its not my app, and theres no real detail on what it does beyond change a few mount point options - which you can probably find already (depending on android level and ROM) exists (noatime already on my ROM) by the following in a terminal:
mount | grep noatime
and/or
mount | grep nodiratime
As for its other listed function, running TRIM on demand, theres this app which has been around forever and is ad free
Trimmer (fstrim) - Apps on Google Play
Trim your device NAND chip manually and fix lags.
play.google.com
As for the app you quoted generally, realise its *possible* to brick your device doing some of the things it claims, so check the warnings
Also the author even points out it doesnt actually boost an SSD, it just changes some kernel and mount options that *may* improve filesystem performance
Note: I just tried running SSD Boost on my Pixel 2XL...toggled it on, and it sat there forever saying "Boosting your SSD", and sat there a long time (to the point i thought id have to kill it), and then showed it had made some changes (factoring in i already had noatime set)
Heres some tests before
and after....
Androbench:
Seq Read: +15MB/s
Seq Write: +12MB/s
Ran Read: -3MB/s
Ran Write: +0.4MB/s
SQLite Insert: -57 QPS
SQLite Update: -101 QPS
SQL Delete: -74 QPS
SD Card Test Pro:
Write: +95MB/s Read: +20MB/s
Would i bother installing it (if its safe for your device)...as always , up to the individual. As always these are benchmarks, and just a snapshot in time, real world result in real world usage, dunno if you’d notice
73sydney said:
Without root nothing you do will change a thing
fstrim other than the stock ROM scheduled one will not work without root
Click to expand...
Click to collapse
Why are you posting misleading info? The other user (quote below) actually verified the operation, and it works!
ninjæon said:
Nice app! I set it to fstrim on reboot, and sure enough the "last-fstrim" file was modified at boot to confirm fstrim took place. The app is free in the Play Store now (reading the previous comments and it seems this may not have been always the case). I also like that the app doesn't use the network for anything at all (no analytics). I'm rooted, so it did ask me to grant root when starting it up for the first time.
View attachment 5382223
Click to expand...
Click to collapse
I observed the same change in last-fstrim date! The utility works, it's great!!! Surprising so few people noticed it ...
Thanks for this!
Somewhat related question: will TRIM prevent data recovery?
From my understanding, when you delete data from an SSD it will just remove it from being viewed and allow it to be overwritten but the data is still there and can be recovered through recovery apps or forensics.
Does TRIM prevent this?
DonDizzurp said:
Thanks for this!
Somewhat related question: will TRIM prevent data recovery?
From my understanding, when you delete data from an SSD it will just remove it from being viewed and allow it to be overwritten but the data is still there and can be recovered through recovery apps or forensics.
Does TRIM prevent this?
Click to expand...
Click to collapse
It's a complicated question, each implementation is different. TRIM will tell controller the blocks are unused, not sure if anything else happens to them. Read some of this to get an idea:
Perform a SSD Secure Erase - Thomas-Krenn-Wiki-en
In this article, we will show you how to perform a secure erase on a SSD under Linux. By doing this, you can increase the performance of frequently used SSDs for future use. But, all of the data will be lost. For Fusion-io’s ioDrives, see Low-level Formatting a Fusion-io ioDrive.
www.thomas-krenn.com
I am going to post the actual command to activate this as there is nowhere I can find that has in even the repository. Even though the command is stated on the display, you still have to manually type it so here it is:
adb shell pm grant com.draco.mfstrim android.permission.WRITE_SECURE_SETTINGS
Enjoy
This app only adds a Global Table parameter called "fstrim_mandatory_interval", set to 1 if you choose every reboot. This is possible with SetEdit and ADB very easily (in 10 seconds) and it is permanent. I am a bit surprised that a whole app has been made only to set this one parameter. Also, the parameter is not effective on a lot of ROMs. If OP's app is paid, that is ridiculous; I sure hope it is not!
With magisk root, you can make a script that runs on every boot running fstrim through busybox. That's what I do, because this parameter used in the app is useless; automatic fstrim is not run on any MIUI ROM I have tried so far.
I have no idea why OP states it adds a Secure Table parameter; I have not seen such being added.
Note that these are my observations and could be wrong.
nosak said:
This app only adds a Global Table parameter called "fstrim_mandatory_interval", set to 1 if you choose every reboot. This is possible with SetEdit and ADB very easily (in 10 seconds) and it is permanent. I am a bit surprised that a whole app has been made only to set this one parameter. Also, the parameter is not effective on a lot of ROMs. If OP's app is paid, that is ridiculous; I sure hope it is not!
With magisk root, you can make a script that runs on every boot running fstrim through busybox. That's what I do, because this parameter used in the app is useless; automatic fstrim is not run on any MIUI ROM I have tried so far.
I have no idea why OP states it adds a Secure Table parameter; I have not seen such being added.
Note that these are my observations and could be wrong.
Click to expand...
Click to collapse
It's a free app. It's conveinient for those who don't want to remember the parameter or how to use SetEdit. Also nice to just be able to toggle on/off. It has worked for me on every Lineage-based ROM I've tried it.
Good to know that it doesn't work on MIUI ROMs however, and that there's a permanent method that doesn't require installation of an app!

Question RAM Plus Feature in S21Ultra

I have updated to latest ONeUI 4 Beta 2 and RAM Plus feature is active. However, I can see only 12 GB memory which is inbuilt RAM. Has anyone checked this feature and getting !2+4GB ie 16 GB memory
It's zRAM, it doesn't magically add RAM. You still have 12GB.
For starters, RAM Plus is a new feature that gives your smartphone a virtual RAM expansion with an extra 4GB of memory by utilizing some of its storage space. It was initially unveiled alongside the Galaxy A52s, so the feature was thought to be designed for mid-range phones that could benefit the most from this capability.
Click to expand...
Click to collapse
Uses storage space to create virtual ram like the old page file in Windows.
The feature may be more useful in mid-range and low-end phones, such as Samsung's Galaxy M and A series. However, it may not offer much value for smartphones with 16GB of RAM, such as the Galaxy S21 Ultra.
Click to expand...
Click to collapse
Since it is hard to push the S21 Ultra to use its full 12GB/16GB of RAM I cannot see it making much of a difference.
Source: https://www.androidcentral.com/samsung-galaxy-s21-ram-plus-update
lywyn said:
Uses storage space to create virtual ram like the old page file in Windows.
Click to expand...
Click to collapse
This is not accurate, it is not using storage.
skymera said:
This is not accurate, it is not using storage.
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It uses storage memory to create a 4GB of virtual RAM. You cannot create more RAM than you have to you page it out to storage memory. Windows NT had a page file for the exact same thing. It addres memory addresses that are mapped to the storage of teh device.
Where else can it get 4GB from?
lywyn said:
View attachment 5427591
View attachment 5427595
View attachment 5427607
View attachment 5427609
View attachment 5427611
It uses storage memory to create a 4GB of virtual RAM. You cannot create more RAM than you have to you page it out to storage memory. Windows NT had a page file for the exact same thing. It addres memory addresses that are mapped to the storage of teh device.
Where else can it get 4GB from?
Click to expand...
Click to collapse
Where? zRAM has existed for years.
If Samsung really are using a swap file of sorts then that is a dumbass decision.
zRAM would add more power consumption by doing all the compression on the fly and drain the battery faster.
Ram plus disable method
I stumbled upon this thread since I was wondering what RAM plus should be. After rooting my S21 Ultra I could use Franco kernel manager to check zRAM and big surprise: zRAM is enabled and exactly 4 GB.
I also checked the available swap with
Code:
free -m
but it only shows zRAM. If I disable zRAM the command it shows 0 meaning there is no swap of any kind. Either Samsung uses special non-standard Linux stuff or more likely: it is zRAM.
That means 4 GB out of my 12 GB RAM are being compressed and to be honest: I don't see any point in doing that with 12 GB of RAM. Apparently Android uses only 10,3 GB (1,7 GB is reserved. I think the reserved memory could be a Samsung thing or allocated to the VRAM of the graphic processor as Android itself only sees 10,3 GB).
The information about "using the internal storage" to expand the RAM (= swap) seems to be misleading. There is only zRAM which expands the RAM by compressing a part of it. Adding more CPU usage but definitely not affecting the internal storage.
By using
Code:
swapoff /dev/zram0
I've now disabled zRAM upon booting and I'll see how it goes. The 4 GB Samsung shows seem to be hard-coded. Even with zRAM disabled it still says that RAM plus exists. Of course all of this requires rooting.
If you want to enable zRAM again either reboot or use
Code:
swapon /dev/zram0
I've spent about an hour of research about this. Maybe it helps someone
RAM Plus should be able to be disabled on OneUI 4.1
On 16Gb/512Gb versions, it makes even less sense...
Guys wake up, your phones have 12Gb or even 16GB RAM... YOU DO NOT NEED MORE... I know it is tempting to make your phone have 4gb more but it is not necessary for 1, and for 2, it will eventually backfire at you.
What do I mean by backfire?
A long time ago, an app was invented by some Russians that would utilize the phones SD card as extra ram. It worked and was a superb addition to a phone with 1GB ram or less. However after using it for a few short months, it would fry the SD card either entirely, or make it READ ONLY. The latter being better as you could at least transfer your data out of the SD card. Then manufacturers started making phones with better ram management and also MORE ram... So eventually this type of software was obsolete because of the damage it would cause to your internal memory.
This RAM PLUS function is a knife with a blade on both sides. It is FREE ram for YOU, and a faster purchase of a new phone for Samsung. If the function does not fry your internal memory, it will surely decrease its speed over time. How much time, is a mystery. The question is, do you want to find out?
RedWave31 said:
RAM Plus should be able to be disabled on OneUI 4.1
On 16Gb/512Gb versions, it makes even less sense...
Click to expand...
Click to collapse
I agree. Its use is for low memory devices that would have multitasking issues otherwise. But with 12 or 16 GB of RAM it does not make sense except you have serious issues with apps getting killed due to low RAM
babyboy3265 said:
Guys wake up, your phones have 12Gb or even 16GB RAM... YOU DO NOT NEED MORE... I know it is tempting to make your phone have 4gb more but it is not necessary for 1, and for 2, it will eventually backfire at you.
What do I mean by backfire?
A long time ago, an app was invented by some Russians that would utilize the phones SD card as extra ram. It worked and was a superb addition to a phone with 1GB ram or less. However after using it for a few short months, it would fry the SD card either entirely, or make it READ ONLY. The latter being better as you could at least transfer your data out of the SD card. Then manufacturers started making phones with better ram management and also MORE ram... So eventually this type of software was obsolete because of the damage it would cause to your internal memory.
This RAM PLUS function is a knife with a blade on both sides. It is FREE ram for YOU, and a faster purchase of a new phone for Samsung. If the function does not fry your internal memory, it will surely decrease its speed over time. How much time, is a mystery. The question is, do you want to find out?
Click to expand...
Click to collapse
I totally agree, but I have to add two things: 4 GB of zRAM ≠ 4 GB "more RAM". It means that 4 GB are being compressed which could result in something like 5.2 GB of RAM instead of 4. Just like if you had 4 GB of RAM and compress it, you would have something like 2.8 GB instead. So zRAM is not adding something but compressing a small portion.
The second thing is that Samsung utilises zRAM but not (z)swap. Meaning that while the RAM is being compressed, there is no swap file on the internal storage despite Samsung listing that in its FAQ. zRAM will not hurt your internal storage, it will have no direct negative effects on longevity of any component. The processor will only compress data that is already in RAM and compress it there. There is no offloading to the internal storage. The only disadvantage is more CPU usage and time to load/store something due to the compression.
The only things that would see negative impacts with zRAM is the CPU temperature (but it's so low, it's negligible) and battery consumption, therefore battery longevity in the longterm. But both are very minor
Macusercom said:
I agree. Its use is for low memory devices that would have multitasking issues otherwise. But with 12 or 16 GB of RAM it does not make sense except you have serious issues with apps getting killed due to low RAM
I totally agree, but I have to add two things: 4 GB of zRAM ≠ 4 GB "more RAM". It means that 4 GB are being compressed which could result in something like 5.2 GB of RAM instead of 4. Just like if you had 4 GB of RAM and compress it, you would have something like 2.8 GB instead. So zRAM is not adding something but compressing a small portion.
The second thing is that Samsung utilises zRAM but not (z)swap. Meaning that while the RAM is being compressed, there is no swap file on the internal storage despite Samsung listing that in its FAQ. zRAM will not hurt your internal storage, it will have no direct negative effects on longevity of any component. The processor will only compress data that is already in RAM and compress it there. There is no offloading to the internal storage. The only disadvantage is more CPU usage and time to load/store something due to the compression.
The only things that would see negative impacts with zRAM is the CPU temperature (but it's so low, it's negligible) and battery consumption, therefore battery longevity in the longterm. But both are very minor
Click to expand...
Click to collapse
That was a nice in depth explanation. Thank you!

Categories

Resources