RAM Management - Samsung Galaxy Tab S4 Questions & Answers

How's the ram management both in normal mode and dex mode?
Samsung mentioned that upto 20 apps can be ran in Dex mode, but didn't mentioned if they cached or not.

Related

[TIP] Enable swap

After using A2SD to format a swap partition it is not active.
So to enable it, do the following:
Install ROM Manager trough market.
Start ROM Manager and select the first option "Flash ClockworkMod Recovery".
Turn off your device.
Turn on device with volume down pressed.
Press volume down, selection will switch to RECOVERY then press power button.
At the black screen with red triangle press volume up and power button.
Press volume down, selection will switch to Apply sdcard:update.zip and then press power button.
Open a console, navigate to the android SDK tools folder.
Type "adb mount /system", without the quotes doh!
Type "adb shell".
At the shell copy paste the following commands one by one and press enter after pasting them.
echo "#!/system/bin/sh" > /system/etc/init.d/05userinit
echo "swapon -a" >> /system/etc/init.d/05userinit
echo "/dev/block/mmcblk0p3 swap swap" >> /system/etc/fstab
chmod +x /system/etc/init.d/05userinit
chmod g-w /system/etc/init.d/05userinit
chmod o-w /system/etc/init.d/05userinit
chmod g-w /system/etc/fstab
chmod o-w /system/etc/fstab
exit
Now you are back at the normal command prompt, type "adb reboot".
Device will reboot, when its done open a terminal and type "free".
It should show swap space allocated.
And with some programs in memory you can see swap being used:
adb shell
free
total used free shared buffers
Mem: 407860 399940 7920 0 872
Swap: 249596 16596 233000
Total: 657456 416536 240920
Altho it was just using a small bit of swap, this obviously helps.
I was running two benchmarks, had maps open and a radio stream playing.
Quadrant showed my Desire rating at 559 while I was trying to get the phone to actually USE the swap space ...
Btw this is my first Android phone, but I have a rich linux background since 1998. Let's try Android 2.2 as this would boost the benchmark quite notably I recon!
For the most part, swap is not a good idea on Android, because is prevents Androids internal process management from operating efficiently. In some cases, swap can increase performance but in general use it doesn't.
Regards,
DAve
I have to disagree that enabling swap prevents memory management from being effective.
Altho enabling swap "might" degrade the lifetime of your SD card, it still holds memory which is not in use for some time.
You can confirm this by booting up the phone with swap enabled, check the free command and you will notice swap space not being used at all for a fairly long time and even using some applications.
After roughly a day usage, battery is still not empty (Im amazed by this HTC phone!) and swap space is being used by quite abit! Its using over 120mb right now and I still have roughly 10mb free normal memory. Programs still load near instantly and thus tells me swap management works like it should.
To perform a sanity check I started Maps again, free memory dropped to 3mb and some swap was freed. Which confirms that I had not used Maps for the whole day (was sleeping in bed lol) and when it started requested memory which was swapped away and obviously released when it was needed again.
Benchmarks tell me the same story, phone is scoring higher numbers than I tested earlier but this is due to me trying to fill swap during the benchmarks earlier this day. 571 compared to 559, it's not alot but it is "some".
To make a long story short, swap increased performance only when memory is being used too much. Will the performance be noticeable? Probably marginal, but you might notice the difference when your phone has been on for a few days straight. Because the longer you use it, more memory will be used and more unused parts of memory will be swapped.
You might also notice the swap increase when using lots of apps at the same time, mostly using multiple webpages and Maps at the same time.
Some arguments about SD cards being slow, this is only true for writes and not reads.
After further investigation and testing ...
The memory manager from Android could even be optimised for swap.
The current state makes absolutely no use of available swap space, except when memory get filled and then it will start swapping.
In fact it makes TERRIBLE use of swap space ...
You can test this yourself pretty easily yourself. Just open as many applications as you can to fill swap space and leave the phone running for a few hours. If you are like me you are playing with it, testing and/or whatnot you like todo.
After a few hours your swap space will be well filled, in my case around 120mb.
Now I run Advanced Task Killer to kill everything that was running, now swap space used dropped to around 30-40mb and I have almost 100mb free memory ... (free 96924).
Now I reboot the phone and check again after killing all tasks, result is .... rebooting to make an acurate post ... 61528.
So that is roughly 35mb of swapped memory which WAS inuse by Android, HTC Sence and whatnot that was not needed. Ofcourse if the memory would be needed again, it would simple be put back into memory and as this happens alot with lots of applications running.
I can safely conclude that memory management on the Android can be improved by the use of swap ... if it were actually used properly. The only way now is to use a task killer and see your memory increase over time, which is great as my Desire shows absolutely now slow downs or choppyness at all.
On the other hand, testing without swap enabled showed that the memory would increase after bootup too. But not close to 100mb, more like 70mb.
Another point to defeat the point against using swap, the swapped memory is placed on SD and SD write speeds are usualy slow. The slow write speed however does not matter if the memory is not filled already and the to be swapped memory was not inuse for a given time. The other way round when the memory is indeed needed again, SD reads are usualy much faster than writing and as it is such a small amount the read is faster than one would notice.
So when I get time for it, I'll dive into the kernel source. See if we can get a better memory/swap manager going for our already snappy fast phones and make them even faster!
double post :s
sfjuocekr said:
I have to disagree that enabling swap prevents memory management from being effective.
Click to expand...
Click to collapse
If you use swap, you are effectively telling Android you have more memory than you actually have. Therefore, it doesn't reach a memory low condition until you've used up swap, which means it doesn't start killing processes.
Use of swap practically mandates the use of a task killer to kill processes that
Android task management would have usually killed to keep the phone operating smoothly.
Regards,
Dave
You aren't telling Android that you have more memory, there is memory and there is swap.
If Android's process manager doesn't kill processes because it thinks you have more memory, it's clearly stupid as it doesn't know the difference between swap and memory. Besides that both memory and swap are reported independenty.
After 17 hours uptime my phone still holds around 35mb in swap and around 40-50mb free memory, so Androids process/memory manager can clearly be improved to facilitate swap space.
Hi sfjuocekr,
first of all thanks for your little tutorial.
I just wanted to know, that method is still working? I mean on CM7 etc.
And will stay after updating the ROM (e.g. nightlies) or has to be done again every time?
Then, in your case the swap partition was mmcblk0p3, but it's not always like that and should be checked right?

[Q] Lag when playing 3d games

Hi!
I had a problem with my DHD - when I was playing 3D games it started to stutter i.e. my phone will work slow if the game runs. I checked the debugging USB in settings and the problem has gone.
It returned a few days ago, although I have checked debugging USB the games are slowing down (there're lags). I have only google account (any facebook, htc sense etc.) and I use Advanced Kill Manager.
My resources consumption in "rest" are: CPU - 3-20%, RAM - 274 MB (by Elixir), also I have free space - on phone 702 MB, and SD (class 4) 6,35 GB.
What now is the problem and how to fix it? How can I reduce the consumption of resources and although a little improve performance?
Thx for reply.
Hi. Could it be that you enable auto-sync? cause this will definitely contribute to lags if the data in sync'ing while you're playing games.
By the way, I would advice you to uninstall any task killers. It will not only consume more resources(e.g. battery) and it will also lag your device.
Today I did hard-reset (like before) and the problem has gone again.
Strange... Thx for advice
Task killers set to auto kill might slow your phone down, but using them to auto kill on say 3 hours, or never, will (in my opinion) help your phone.
Some apps might start hogging up resources and 3d games will start to lag, so whenever that happens, just kill any non important apps. Android isn't perfect with memory manegment..
Hope this helps!

[Q] Huge Lag on my Samsung Galaxy Tab Pro 10.1

So out of no where my Galaxy Tab Pro 10.1 began lagging pretty bad. I closed all of my open apps and the lag persisted. My ram was at about 86-90% being used at one point, but even when I got it to drop the Lag continued.
Does anyone know why this was happening?? and how to fix it next time it happens?
Install a task manager to see which app or process is using CPU when lagging. Don't pay attention to high RAM usage, that's how Android works,
Reboot the device in Safe Mode and see if it persists.
If you don't know how, hold the power button and long press "Power Offf" and a prompt will appear asking if you want to reboot to Safe Mode.
All 3rd party apps will be disabled (including system app updates I think?)
You can also use WakeLock detector (https://play.google.com/store/apps/details?id=com.uzumapps.wakelockdetector&hl=cs, http://www.xda-developers.com/andro...one-awake-wakelock-detector-xda-developer-tv/), which monitors the processors and screens wakes by the apps, so you can analyze, if there are any apps, that can potentially cause the problem.

UK G3 memory

Well I've got my g3 and after 2 days use I've noticed that with its 2gb memory it constantly uses 80% of it even on standby with no apps open. I did a factory reset and didn't install anything and it was still using 72% of the memory. Anyone else noticed this or is my phone faulty.......?
chrisbrew said:
Well I've got my g3 and after 2 days use I've noticed that with its 2gb memory it constantly uses 80% of it even on standby with no apps open. I did a factory reset and didn't install anything and it was still using 72% of the memory. Anyone else noticed this or is my phone faulty.......?
Click to expand...
Click to collapse
I think this is how Android works, it fills the memory then kills things it doesn't need. There's also ZRAM active in the kernel which uses roughly 25% of the memory as swap space.Heres a snippet from an article on Android RAM....
The problem is that Android uses RAM differently than, say, Windows. On Android, having your RAM nearly full is a*good*thing. It means that when you relaunch an app you've previously opened, the app launches quickly and returns to its previous state. So while Android actually uses RAM efficiently, most users see that their RAM is full and assume that's what's slowing down their phone. In reality, your CPU—which is only used by apps that are actually active—is almost always the bottleneck.
Sent from my LG-D855 using Tapatalk
Its not so much Android as how Linux manages memory. The memory usage indicated includes memory used for cached apps and information, or swap etc. In saying that LG's version of android does use more memory than stock AOSP android on say a nexus 5 (1.2gb~ on G3 compared to around 700mb on N5)
But the rule still stands true, used ram is better than unused ram.
free ram is wasted ram.
chrisbrew said:
Well I've got my g3 and after 2 days use I've noticed that with its 2gb memory it constantly uses 80% of it even on standby with no apps open. I did a factory reset and didn't install anything and it was still using 72% of the memory. Anyone else noticed this or is my phone faulty.......?
Click to expand...
Click to collapse
So? What's the problem? Using RAM is good, it's what it's here for. Android will try to keep in memory as many apps as possible, and when it's full, it'll start killing old apps to free ram for new ones. Don't worry about that, it's how it's supposed to work, and Android is very good at that. You should never have to worry about killing apps yourself, and you won't see any bad performance impact because of high RAM utilization. These "task killer" apps out there (including the default one on your phone) have only one valid use case: killing an app that's not responsive, in a connection loop, or that you wish to manually reset for any other reason.
Well thanks guys for your replies. Had no idea that's how android worked. Just goes to show you learn something new everyday.

[XT1789-05] Memory consumption of system too much high

Hello, My Moto Z2 Force model is XT1789-05 and I don't know what happened. But after the security patch of november the system memory consumption is getting too much high. Anyone else with this problem? Here's a screenshot of the consumption
HugoP_ said:
Hello, My Moto Z2 Force model is XT1789-05 and I don't know what happened. But after the security patch of november the system memory consumption is getting too much high. Anyone else with this problem? Here's a screenshot of the consumption
Click to expand...
Click to collapse
You have the 6GB version so 1.9GB free is completely normal I have the 4GB version and I usually have 1.1-1.4GB free unless I open a game it'll drop to 800 MB free. Trust me your device is functioning normally don't use any of those ram cleaners it makes things worse.
Stop using the app you don't need (in the application management), then turn on the power saving optimization, and do not need the resident app, turn off the background operation (within the power saving management)
I think China's software permissions and ram are confusing, I didn't expect foreign countries to be the same.:d

Categories

Resources