yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] eccezarathustra:
Free Memory

My experience has been, rather counter-intuitively, that the less memory i keep free the smoother the device operates.

I use autokiller memory optimizer which just changes the thresholds at which android garbage collection kicks in, as opposed to a wide sweeping shut down of all all processes.

Leaving it so that less free memory is available means more memory is being used by foreground and background apps (including my GoLauncher), which means background apps aren't being killed by the system as quickly, which finally means that swapping between foreground and background apps happens much more smoothly because background apps do not need to be completely restarted.

I rarely see 50mb free on my system and swapping between xda and pulse is a second affair.

YMMV
[Captivate Android Development] gangpe:
Memory issue workaround?

Hey guys,

I've been reading a lot of comments about the memory/lag issue. I've been there too, to the point that I would restart my phone every few hours as well. I started looking into memory management software just to see if that would help. There's a free app out there called Auto Memory Manager (stop reading if you've heard of it/already use it) that has definitely helped with my hairpulling. I've set it to aggressive, and I've been rolling ever since (and I'm using SBP Shell 3D as my launcher!). Yeah, 50MB free seems to be what I top out at as well, but now my phone is running a helluvalot smoother with fewer restarts. Just a lazy workaround until the dev guys can figure out what the real problem is.

Thanks,

G
[Captivate Android Development] Peaster111:
Seeing the issue too... I went and flashed Darky2.9 and xcal2.0. Each for about a week. I didn't see the issue with either.
[Captivate Android Development] zerkai:
I found it, /bin/ram.conf.default
[Captivate Android Development] H3llstorm:
I also use AutoKiller Memory Optimizer - with the "Optimum" preset - and haven't had the lag issues other people have described.
[Captivate Android Development] Pf.ozer:
if i use the jvq kernel on a jvp based rom,what may happen to my device?
[Captivate Android Development] topiratiko:
Dude NICE find. Does this app demolish battery?

Sent from my Apex Blue 2.3.4 Ext4 equipped Samsung Captivate.
[Captivate Android Development] zacharias.maladroit:
could you please post those values so that we can try it, too with those values entered as LMK values

virtually this then should show the same results

thanks !
[Captivate Android Development] bryman27:
Here's what the optimum preset looks like on mine.
[Captivate Android Development] zacharias.maladroit:
thanks for posting !
[Captivate Android Development] chiballer20:
I read quite a few pages and haven't seen anything on cm7. Will this kernel work with cm7?
[Captivate Android Development] topiratiko:
Sent from my Apex Blue 2.3.4 Ext4 equipped Samsung Captivate.
[Captivate Android Development] existz:
Nope, samsung gingerbread only

Sent from my SGH-I897
[Captivate Android Development] aalh:
/system wont convert to ext4

I have rebooted in every combination of enabling and disabling system conversion in CWM

/system remains rfs according to mount in a term-emu

the other fs are ext4, but /system will not change

this started in 0.3.1 I think, I figured it was a bad flash and just upgraded to 0.4.1

but that did not fix it

what is keeping me from changing the fs type of /system?
[Captivate Android Development] topiratiko:
Ive had this happen three times. Only cure is odin back to stock jf6 secure

Sent from my Apex Blue 2.3.4 Ext4 equipped Samsung Captivate.
[Captivate Android Development] aalh:
if that is the case then I will wait for MVI before I fix it
[Captivate Android Development] kodos96:
That app is just a gui frontend for configuring LMK settings, which means that:

1) It won't fix this problem, since, as we've established, it's not an LMK problem, and

2) It should not be used on Talon, since Talon manages its own LMK settings via ram.conf, and messing with them via init scripts or apps like this one will interfere with that.
[Captivate Android Development] kodos96:
Same deal as with the previously mentioned app - do not use this on talon. It tweaks your LMK settings, and just like with "ram hack" scripts, it only changes the kernel settings, resulting in your kernel and userspace LMK values getting out of synch with each other.

The issue we're talking about here, BTW, is not a "lag" issue, its just a memory consumption issue, and it doesn't have anything to do with LMK, so tweaking your LMK settings with apps like these 1) will not fix the problem, and 2) will cause new problems.
[Captivate Android Development] kodos96:
can you pull the most recent log from /sdcard/voodoo/logs (after attempting to do a conversion) and PM it to me?
[Captivate Android Development] RonH54:
I never had used Talon until Dlev incorporated the NON OCed 0.4.1 into his ROM. I am think about trying the 1200 Big Mem of Talon on Dlev 3.81 have you guys been having good luck overall with the 1200 Version?

Thanks
[Captivate Android Development] Nucleartx:
I had to go back to darkys kernel due to extreme lag. Reboots didn't help either, or clearing dalvik cache.
[Captivate Android Development] RonH54:
Are you responding to my post above yours? If so which Talon version were you using?
[Captivate Android Development] Nucleartx:
In general, 0.4.1 was what I was using, with control freak.
[Captivate Android Development] mrhaley30705:
I have had very good luck with the 1200mhz bigmem version of 0.4.1. It is smooth, even when testing it on Apex, which seems to not like the Talon kernel (no offense to existz or watsa). Very responsive, good battery life.
[Captivate Android Development] RonH54:
0.4.1 Non OC Big Mem is doing Super for me on Dlev 3.81 and no real reason to even need to try an OCed Version I just like to Tinker...;)
[Captivate Android Development] H3llstorm:
1) Perhaps... 2) ... but not in my experience.
[Captivate Android Development] tehsam:
I flashed the i9000 bootloaders and the music is still skipping every now and then. I think i'm going to try flashing the existz JVP kernel to see if it is talon causing the issue.
[Captivate Android Development] mrhaley30705:
That was my 100th "Thanks". I appreciate it:). Just glad I could help
[Captivate Android Development] aalh:
pm sent

10char
[Captivate Android Development] tehsam:
for anyone else experiencing poor battery life once you hit around 75%, I switched to the existz JVP voodoo kernel a few days ago and things seem much better. too soon to tell for certain, but i'm definitely seeing improvements.

however, my music skipping issue is still there.
[Captivate Android Development] geokilla:
What do you mean by music skipping issue? Cus I got a problem with playing music via BT where the music will sometimes stop by itself, or when changing the volume it'll pause the music. Changing the volume again will resume it. :confused:
[Captivate Android Development] tehsam:
I was asking questions about it a few posts back. when playing music through the app "player pro", I experience skipping/stuttering. my issue isn't related to bluetooth. it was thought that it was due to the screen being off limiting the max CPU speed, but i have also had it occur with the screen on. I also tried switching to i9000 bootloaders but the issue persists.

I am now wondering if it is related to an issue I had right after switching to gingerbread. I had all my music on the external SD and one time while listening, the music skipped (in much the same way it skips now on the internal SD) and the phone shut down. since then, it will not boot up with the external SD card in and the card cannot be formatted from the recovery menu. I assumed the sd card just crapped out, but maybe it is connected to my current playback issue?
[Captivate Android Development] kodos96:
Well unlike suckerpunch, talon uses zram (compressed memory swap), so there's actually a good reason for kswapd to be running. It shouldn't be going up to 30% though for more than a few seconds here and there though... what are you using to measure cpu usage?
[Captivate Android Development] kodos96:
That's just the default file, which gets copied into /etc at boot time if there isn't already one in there. Editing /bin/ram.conf.default won't do anything (and will get overwritten on reboot). Is it not getting copied into /etc/ when you reboot? What rom are you running? As a temporary fix you can just copy it to /etc yourself (removing the ".default" from the end of course)
[Captivate Android Development] kodos96:
OK. I'm not trying to be a ****, but just in case you didn't realize, I'll point out that I'm the developer who designed Talon's LMK management system, so I know what I'm talking about when I tell you that setting your LMK using that app is going to give you sub-optimal results - you're only changing them in one of the two places that they need to be changed for them to fully take effect. If you want, you can use an app like that to experiment with different settings, then once you've found some values that you like, you can then plug them into /etc/ram.conf , so that they'll actually get applied properly.

Edit: to give an example of how to do this, here are the lines you would need to change in ram.conf to apply the settings that topiratiko posted a screenshot of a few pages back:

HEAVY_WEIGHT_APP_MEM=15360

SECONDARY_SERVER_MEM=15360

BACKUP_APP_MEM=15360

HOME_APP_MEM=15360

HIDDEN_APP_MEM=17920

EMPTY_APP_MEM=20480

LMK_ADJ="0,1,2,3,7,15"

LMK_MINFREE="2048,3072,4096,15360,17920,20480"

Note that I am not recommending these settings, just showing you how to edit the file if these are the settings you really want. These settings will result in your launcher getting killed EXTREMELY easily (as well as all your other apps, but the launcher is the biggest deal).

If you want to experiment with tweaking your LMK settings, you can mess with the last two values (for EMPTY_APP and HIDDEN_APP) without too much of a problem, but once you start getting into HOME_APP and the other app classes at oom_adj level 3, you're really going to start screwing yourself over, especially if you're setting them to ridiculously high values like in the above settings.
[Captivate Android Development] topiratiko:
Quick question kodos...if i apply these settings...then use a nandroid backup to restore BEFORE me changing lmk settings, would my custom settings still apply??? I wanna be safe before i screw something up..as far as the launcher im using tw4.5 which has a setting to keep in ram so it never gets killed...i dont like having apps open when im not using them anyway. Any help is appreciated
[Captivate Android Development] zerkai:
that's right. I'm on apex 8.2, it does not get copied. Though when I went to the latest continuum it copied over fine. The ram.conf file from the flash to continuum with latest talon looks completely different than what's seen in the ram.conf.default in apex...

I'm also having trouble disabling lagfix, I made a thread about it only a few responses so far.

EDIT: My mistake, I thought the latest continuum came with the latest 0.4.1 talon but it comes with a 0.3.something test version and that copies fine. I guess it's a problem with the later versions of talon not properly copying over the ram.conf?
[Captivate Android Development] kodos96:
Yes, ram.conf is included in a nandroid backup, so restoring a previous backup will restore your old settings.

The method that launchers used to use to force themselves to stay in memory doesn't work anymore on gingerbread... I'm not sure, MAYBE that doesn't apply to TW, cause its a samsung app, so maybe they're doing something custom to stay in memory, but for other launchers that option definitely doesn't do anything anymore.

Really you're shooting yourself in the foot with this... having more ram free doesn't make your phone any faster.... "free" ram is wasted ram... linux needs 20mb or so free for kernel buffers and pagecache, but beyond that you're just wasting ram that you paid good money for. Forcing your apps to always have to reload from sd every time you launch them makes them slower to launch, and uses more battery.

Of course it's you're phone though, so you can do what you want with it, I'm just giving you my advice.
[Captivate Android Development] kodos96:
I suspect that both of your problems will be fixed in the next Talon release, which should hopefully be pretty soon now. If you still have these problems after the next release, let me know.
[Captivate Android Development] Vivified:
Try turning the built-in EQ off in Player Pro. I'm willing to bet that removes the stutter/skipping. I had the same issue, ended up switching to PowerAMP. No more stuttering here.
[Captivate Android Development] mrhaley30705:
Got a problem. I'm not sure if its kernel or rom or what. If the person I'm taking to end the call before I do, call settings hang in memory. This is a screen shot of Taskiller by AxDroid.

The only way to clear it out is to reboot the phone. Killing all doesn't do it. It seems to be more prominent when using Bluetooth. Any ideas?

EDIT Yellow is an app that is working and consuming system resources.

I know that when it happens battery life goes straight down hill.
[Captivate Android Development] kodos96:
zerkai, I sent you a PM btw in case you didn't see it.
[Captivate Android Development] leoriver42:
Interesting I get that too, both in Talon and Darkcore....

Sent from my Samsung Captivate running Apex 8.2
[Captivate Android Development] mrhaley30705:
Well that must be a Samsung thing. I've saw it on 3 different roms, but all the same kernels.
[Captivate Android Development] leoriver42:
Yup, not a kernel problem :P

Still a horrible thing ¬¬ nice app though :)

Sent from my Samsung Captivate running Apex 8.2
[Captivate Android Development] rlorange:
I'm having the same issue with ram.config not being copied into etc. On simply honey 3.9 (i9000)

**Simply Honey3.9, Talon 0.4.2.5 kernel1.3ghz**
[Captivate Android Development] existz:
if anyone out there has any experience with creating kernel modules, please PM me.. Im looking to do something similar to Tegraks overclock, but I would like to make OC a module.. for example one for 1200, 1300 and 1400...etc.. so if someone wants to OC, they can simply load the module of choice.. which of course I would probably put it in an app for easy switching.. but I have no experience in this..I've sent Tegrak a PM, hopefully he responds, but if anyone out there wants to take on the project or give me some pointers on how to do it, it would be greatly appreciated....would save me from having to compile and upload so many different versions.

Sent from my SGH-I897
[Captivate Android Development] topiratiko:
This is my thing....with stock settings my ram usage will creep to 305+ and introduce major LAG. I applied changes to ram.conf @2ish today and just checked ram and im at 263 and SMOOTH. Im just tryin to have phone run as smooth as it can and this seems to help...for now lol

Sent from my Apex Blue 2.3.4 Ext4 equipped Samsung Captivate.
[Captivate Android Development] zerkai:
In that case, shouldn't we use a lower value for LMK settings before it starts killing apps? Such as 32MB or something
[Captivate Android Development] johan8:
I think you guys don't have to struggle on this problem.

In fact, SGS has just only 330~340MB ram for operation, it is nearly insufficient for 2.3.3 or newer.

Think about this, SGS2 or HTC with 2.3.x, it consume over 300MB after bootup,

compare with SGS only have 340MB in total.

Perhaps you may said those are different model have something different load up after startup. That's ture.

But SGS doesn't have enough memory is true too.

Killing those task won't help,

you wanna kick the whole android from ram to free more memory!?
[Captivate Android Development] cantIntoCode:
Hi, could someone post the best voodoo color settings that someone posted and zach confirmed it? Can't seem to find them after searching etc :(
[Captivate Android Development] Chaz1337:
Sorry if this has been covered elsewhere in the thread but search function didn't yield very helpful results... Just switched to Talon kernel from the Serendipity Custom kernel #4 and now BLN has stopped working and I have played around in recovery mode with no success. Anyone know how it could have stopped working and a possible fix?

Thanks in advance!
[Captivate Android Development] harpo1:
You need to use the BLN app from the market.
[Captivate Android Development] ngochuy:
hi

Sometimes my phone reboots due to turning wifi on in notification, especially in flight mode. I think the kernel based on JVP/JVQ got this issue. Can you fix this and improve the battery life when the phone is in standby mode. With stock KF1, phones only lose 1-2 % in 8 hours (at night) in standby mode.

I'm using talon 0.4.1 no OC with rom Continuum 6.1

Thank you very much
[Captivate Android Development] johan8:
I think there is no best setting.

Every device may have similar but different value.

My screen is very warm in color temperature,

so I use this value to make white look like white.

Try the value to turn your screen.
[Captivate Android Development] mrhaley30705:
This is not an issue of memory, but battery life. Please reread what I posted, especially the edit.
[Captivate Android Development] johan8:
Mine use 1% per hour in wifi,3G data,background data,gps all Off.

In flight-mode use 0.5~0.9% per hour (by calculation)

Meanwhile 280MB total ram used; bg service Settings used 12MB, Whatsapp used 11MB, Pingchat used 5MB etc.

Of coz I've read your post.

So I don't think it is a problem but SGS has too few of memory.

Battery drain could be something else.
[Captivate Android Development] sremick:
There is much truth here and for users without many apps (or lots of small ones) it could certainly always be the case. But there is a flipside here too. That is for people who have lots of apps, or some really big ones. You can't have all the apps you ever might be used in RAM at all times... in which case, if the app you're wanting to run isn't one of the ones already preloaded into RAM, then Android needs to make some decisions about what to unload, then apps need to be cleared out to make room before the requested app can be launched. This extra memory management takes more time... and a noticeable amount, compared to if that RAM was already free.

There are definitely tangible benefits to having an app already loaded before you go into it... and it's true that "unused RAM is wasted RAM" and there are benefits to having it put to use. But there are also tangible benefits to having it free if you can't accurately predict what app you're going to launch next.

Which way is better is up to each user. I know for me personally I benefit more from having the RAM free, and my apps launching almost immediately in about 1 second, versus having my device preload at all times a dozen or more apps I don't even use every day, resulting in the app I do want to launch taking 5 or more seconds to load.

Anyhow, on another note... I'm really glad the memory leak/decrease over time is being reported by more people so I don't seem like a nutcase anymore. :) I'm watching this closely and hoping for a resolution as it'd be nice to continue using Talon (it seems to get the most development).
[Captivate Android Development] geokilla:
The memory leak has been around for a long time and while it has been improved, I have yet to see a real fix for it. Maybe it's a Samsung thing, or developers aren't testing their kernels enough but either way, it's there. Luckily I usually turn off my phone when I sleep so it's not a big issue for me.

Sent from my Samsung i896
[Captivate Android Development] Vivified:
seriously? get out
[Captivate Android Development] mrhaley30705:
J

Considering I've heard about it on Talon, Darkcore, and Xcals reoriented do you really think its not enough kernel testing? Also, it happens on multiple Android releases (2.2, 2.2.1,2.3.3 & 2.3.4), so I really don't think its the kernels. Its most likely a Samsung flaw that even they haven't figured out yet.
[Captivate Android Development] XsceneXhippieX:
i experienced memory leakage of the same sort on the HD2 running cm7.1, and the inspire 4g on cm7.0.0, the memory leak may be universal to android, linux, or mobile SoC's for all i know lol just trying to add productive info to the conversation by sharing that i have experienced the same ram leak on htc phones as i do on samsung ones, yet my asus transformer NEVER leaks ram like such, which i find odd in itself.

and about the having apps running in ram vs having free ram, why not do both? lol what i mean is before you open a huge app (like lets say galaxy on fire 2, dungeon defenders, or NOVA) just go into android's native task manager and "stop" a few unnecessary apps, at least thats what ive always done because it takes 15 seconds and gives you all the good from both options :p
[Captivate Android Development] kodos96:
Memory Leak

OK everyone, let's talk about the memory leak issue.

I've been doing lots of testing, and working with several of you privately via PM, and it's becoming increasingly clear that we're all talking about different things when we say "memory leak". I know it's gotten confusing because at the same time we've also been discussing LMK related issues, i.e. the wisdom of keeping lots of apps in memory vs killing apps quickly, and I know there are lots of different opinions about that, but that's a completely separate issue from a memory leak

A memory leak would be if your amount of free ram, with no apps running, decreases over time. In other words, if you did this:

1) Reboot your phone and wait for it to settle down after booting.

2) Kill all of your apps

3) Check how much free ram you have

4) Use your phone for several hours/a day

5) Repeat steps 2 and 3

.... if you did that, and your amount of free ram got lower between the two measurements, then that's what I would refer to as a "memory leak" (and even that probably wouldn't be a 100% technically correct use of the term, but close enough that it would make sense).

But if you're just looking at the amount of free ram you have under normal usage, with a bunch of apps running, then that's not telling you anything about a memory leak, that's just a matter of how you have your LMK values set. Your amount of ram usage will naturally cycle up and down as you use your phone, increasing until the point that it hits one of its LMK thresholds - then some apps get killed, lowering your ram usage, and the cycle starts over again. That's normal. Some of you might think that I have the default LMK thresholds set too high, and that's a perfectly valid opinion, but that's not a memory leak.

OK, so now that we're all on the same page about what we mean by "memory leak", my question for everyone is: is anyone seeing an actual memory leak, as defined above? At one point, I THOUGHT that there actually was a real leak, but the more I've looked into it, the more convinced I've become that there is no memory leak - my measurements were just getting thrown off by system processes (like android.process.acore) whose memory usage varies over time, but don't show up in most task managers.

But of course I could always be wrong. If there actually is a memory leak, then I want to know about it so I can fix it, but I need to know what it is you're actually seeing. Those of you who are saying that there's been a memory leak ever since froyo, and its a samsung issue, not a kernel issue... what exactly are the symptoms that you're seeing?
[Captivate Android Development] mrhaley30705:
Yes, that is what I am seeing. Immediately after a reboot I see about 200mb of free ram when I kill all apps. After about 12 hrs I have saw it go as low as 150mb. At that point I reboot the phone. As I posted earlier, I have saw this behavior on multiple roms and multiple kernels. I am not certain if I saw this on froyo, but I am inclined to say I did. I have become accustomed to this and it is not that big a deal to me. I personally place more importance on why my call settings are getting "hung up." (see my previous post in this thread)