yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] yumeiki:
I've used for a long time the 2014/11/13 M1, not so lagghy to me. I switched back to DMX 1.6.5 because this drain my battery less and the radio works perfectly. I was using greenefy btw.

I've installed many of the CM11 roms by tony and derivated but the 2014/10/23 i can't really find, neither the "justarchi". I've a tonyP 2014/10/22 or 2014/10/12 JustArchi, all about M1 not 3.1.
[LG Optimus 2x] Gainer5:
[MENTION=5399879]echo_21[/MENTION]

With better performance I meant that opening apps was a lot faster as well as multitasking, since not so much data was swapped as before. But even with this improvements, multitasking worked a lot better for me. I was able to use more apps in the background than usual, while still having ~70mb of free (or partly cached) RAM, which I think is great.

I have really many apps on my o2x, so I had to tweak around for some time. I just thought I should share the information about cached apps, since I never read about system apps being cached unvisible in the background in the standard settings application and many others and I searched for a lot of stuff like that in the past 2,5 years.
[LG Optimus 2x] Frecciablu(2):
[MENTION=5154504]Gainer5[/MENTION]

Anyway, i could alway see cached apps... In app usage in right up corner there is button for "cache".

But cache is a part of ram thats even more fast and important.

And in my case there arent process there that i can freeze or stop.
[LG Optimus 2x] pijas82:
For me th best ROMs for our 2x is DMX cm 10.2 build 26, and first KitKat ROM by Tony p

Sent from my A0001

---------- Post added at 05:36 PM ---------- Previous post was at 04:42 PM ----------

Sent from my A0001
[LG Optimus 2x] echo_21:
CM11 performance boost for everybody?

I found out that the value for dalvik.vm.heaptargetutilization (set by /system/build.prop file) is 0.75 (75%) in CM10.1 and CM12. In CM10.2 and CM11 some dev set this to 0.25 (25%). His intention was to save about 5MB of RAM. But I believe that a target of 25% utilization wastes lot of our very limited RAM memory. If an app e.g. requests just 2MB of heap the runtime has to reserve 8MB to get a utilization of 25%. In case of 75% it is just 2.7MB. Am I wrong?

There are normally approx. 20 apps in memory. If each wasted let's say in average 3MB ( = (8-2)/2 ) the total wasted amout would be 60MB!!!

Anyway I tested dalvik.vm.heaptargetutilization=0.75 and for the first time I am able to task switch between 4-5 apps without any new start of that app. Apps are usable without lag. I use CM11 2014/10/12. I checked memory optimization in settings menu.

Testers needed! Who would like to give it a try? Please report results here. Do not forget to tell the build date of the ROM you use.

Reference: http://review.cyanogenmod.org/#/c/47285/1

Citation: "xiaoxi.meng	Aug 18 8:34 AM

Patch Set 1:

to my understanding heaptargetutilization = live objects / heap size 0.75 means 75% heap are used by java objects, 25% are ready to allocate new objects. here you set it to 0.25, this should be very inefficient. only 25% heap is used for allocated java objects. 75% are free memory for new allocation.. see also dvmHeapSourceUpdateMaxNativeFootprint() in HeapSource.cpp"
[LG Optimus 2x] mkchan:
Ill give it a try and well see if notice any changes..btw, what are those five apps you open w/o lag and reopening?

---

Edit..

Dont notice much it still reopen apps eg. Facebook messenger, xda app, file manager, and lastly when opening settings..
[LG Optimus 2x] mkchan:
Version im using i find this very slight lag..
[LG Optimus 2x] echo_21:
CM11 Performance Boost for everybody?

Link to first post with this topic: CM11 Performance Boost for everyone?

1. Apps I use to test if taskswitching works without app restart (typical RAM consumption values):

- GMail 27 MB RAM

- MapFactor Navigator 45 MB RAM (free offline navigator)

- Spiegel Online 30MB RAM (German online news magazine)

- Nova Launcher 18MB RAM (yes, it is an app running in its own Dalvik VM; it can be and has been killed by OOM killer at any time too! I replaced Trebuchet launcher as you can backup and restor desktop)

- Settings|Apps|Active 18MB RAM (pressing menu key when Nova home screen is shown)

- Memory Usage 22MB RAM (by TwistByte LLC from play store)

- Performance Control 10MB RAM (built in)

- XDA app 36MB RAM

I use any random sequence of an increasing number of these apps (e.g. first I only switch between GMail and Spiegel twice or three times, than I extend this sequence by e.g. Navigator, etc. ). Either by direct task-switch by long-pressing the home key or by short-pressing home key via Nova Launchers desktop or app drawer icons.

2. Oops, I forgot to tell that one has to make sure that KSM is enabled (Settings|Performance|Memory|KSM). Make your task switching tests not earlier than 20 minutes after reboot! Note that KSM default settings are very slow (to prevent battery drain!?). It needs this time to run through hole RAM just the first time. For best RAM saving effect KSM will need more than one hour since reboot! Even if possible please do not increase KSM speed at the moment! I will follow-up KSM speed topics in a post in one week. First we need to know whether dalvik.vm.heaptargetutilization=0.75 has no negative impact on performance but an performance improvement. Please never never never change 2 things the same time! Remember: dalvik.vm.heaptargetutilization=0.75 is in CM10.2 and CM11 since long time and nobody found it earlier as a potential issue. Why so late? Imho because we tested not systematically enough. Please let's be systematic now.

My suggestion is: set dalvik.vm.heaptargetutilization=0.75 in /system/build.prop, reboot, and use your phone over several days as your daily driver. Then report here if the change has negative/postive/no effect on taskswitching without restart. What about GUI lag inside an app once it is in foreground? Not only focus on one "monster" app like facebook. As I don't use facebook app would you like to tell me the amount of RAM used by it? Please do not tell the value shown by Memory Usage app mentioned above. Its values are too high as they include the Zygote RAM usage. This is not fair as the Zygote RAM is 100% shared to all other apps without any extra RAM cost. Report the values shown by Settings|Apps|Active|Cached.
[LG Optimus 2x] DeeKay773:
Too bad KSM is missing in settings/performance/memory in 10/13 gucky's build w/ optimisations 3.1 :/ is there a way to enable it manually? (No option in kernel control nor performance control)
[LG Optimus 2x] echo_21:
Oops, the built-in Performance Control app on my P990 with CM11 built by [MENTION=5021221]gucky01[/MENTION] on 2014/10/12 (based on 2.6 kernel M1) lets me dis-/enable KSM: on the "Memory Settings" tab I may un-check/check "enable KSM".

Check if there is a folder /sys/kernel/mm/ksm/ . The contents of /sys/kernel/mm/ksm/run should show you if KSM is running. 1= running 0 = not running. Try to set it to 1. At least after 1 hour /sys/kernel/mm/ksm/full_scans should show number greater 0. KSM is slow by default (I mean just the process of finding which RAM page will be saved by merging is slow. Using of the merged RAM pages by the apps should be fast).

To my best knowledge you'll need the RAM saving effect of KSM if you want to task switch without app restart.
[LG Optimus 2x] mkchan:
Well try it again later.. Yep thats what i notice at first it takes time for new value(0.25 to 0.75) to settle..its a bit laggy at first after reboot.. Yeah well see in the long run..anybody else have tried it also?

---------- Post added at 07:10 AM ---------- Previous post was at 07:00 AM ----------

And oh btw i check pac-man rom installed on legacy xperia 2011 devices and dalvik.vm.heaptargeutilization=0.25..

Its also base on kitkat 4.4.4.. Im just wondering if it is set intentionally..
[LG Optimus 2x] echo_21:
Hi community, any test results with dalvik.vm.heaptargeutilization=0.75 ?

Hi mkchan, thanks for the update. I keep staying tuned. It seems not to be an easy job to get Android running performant on 510MB RAM low memory devices. See e.g. this reference: https://source.android.com/devices/tech/low-ram.html . I still believe that dalvik.vm.heaptargeutilization=0.25 is incorrect. The wasted RAM by 0.25 seems to make the ouf of memory killer killing apps much more agressive than 0.75. The required trick is to prevent lag even if there are much more apps in memory as with 0.25. But "performance" for me is not only no occurance of lag but also well task switching without app restart.

Hi [MENTION=3605868]tonyp[/MENTION], in a PM you told me that someone for Lollipop reverted 0.25 back to the early CM10.1 value 0.75. Would you send a link of the corresponding commit (like http://review.cyanogenmod.org/#/c/47285/1 for the change from 0.75 to 0.25)?
[LG Optimus 2x] tonyp:
They use CMs sources as their base so that's no surprise.

Note that this change is NOT in the AOSP source: https://android.googlesource.com/pl...2-release/build/phone-hdpi-512-dalvik-heap.mk

They did not change it back - the change just never made it into the CM12 sources:

See here (and compare it to the CM11 source).

So yes, I tend to agree that 0.75 should be better.

Actually I tried it out on my device as well and can agree that it seems to lag a little more at first, but I think app switching is better and there are less of these huge lags where the phone won't respond at all for several seconds (but then I hardly ever use the 2x, it just sits around - that's why I'm waiting for judgement from peple who actually use the phone on an almost daily basis).
[LG Optimus 2x] tonyp:
As I got access to the xda buildbox again I decided to make a new build :fingers-crossed:

I followed some low memory guideluines, it should use a lot less RAM (but it might actually be a bit too strict now, so you need to post feedback)

Changelog:

Adjusted Dalvik properties

Lowemory killer values adjusted for devices with ultra low ram

(this actually might be a bit too harsh, test it, then change in Performance / Kernel Control to Aggressive and compare)

Memory ADJs optimized

KSM tweaked

Replaced Kowalski with latest Firtecy Kernel (exp5 32mb ramhack), compiled with GCC4.7 by DJNoXD

Merged CM11.0 stable upstream

I flashed it after a full wipe and all seems to be fine, but as I don't have the time to do some proper testing that's up to you guys :)

Edit: After some more testing I can confirm my first assumption that the lmk is indeed set too strict. My recommendation for now: go into Performance Control - Memory Settings - Minfree Taskkiller Presets and choose Middle (or Aggressive). Now it works incredibly fluid for me!

Download (3.1 kernel compatible only for now):

https://www.androidfilehost.com/?w=files&flid=25281

Enjoy and give feedback :cowboy:
[LG Optimus 2x] soulripper24:
Thank you Tonyp :) You are awesome :)
[LG Optimus 2x] salmanfarisy:
Thanks for new build. I'll try this when i get home.
[LG Optimus 2x] Genie's:
WOW, then you can build ROMs again, right?

That's aweeeeeesomeeeee
[LG Optimus 2x] 60nine:
salute [MENTION=3605868]tonyp[/MENTION] from my LG G2 :)

i won't quote the changelog, but i'll for sure try this on my o2x that is standing on the shelf waiting as a guinea pig to be experimented at :)
[LG Optimus 2x] janzak:
Dear tonyp,

I downloaded ROM, install, and returned applications from backup. Following your advice, I set the memory. ROM is really fast, fluid, so far without any problems and I am testing it since the morning.

Perfect job, thank you very much :o
[LG Optimus 2x] 60nine:
[MENTION=3605868]tonyp[/MENTION]

inital startup from wiped device was nice and ok (i even modified the zip file prior flashing with newer version of youtube and removed several apps like email & exchange that i don't use)

currently debloating even more with titaniumB...

one question

why are there both Kernel Control & Performance Control apps?

i see that the Kernel Control has several extra options so i assume that Performance Control can be removed...
[LG Optimus 2x] Wooby:
Im w8 for the m1 kernel version cause im using my camera a lot ;)
[LG Optimus 2x] lukino993:
for me it's so laggy that i will wait an m1 version (hoping that master [MENTION=3605868]tonyp[/MENTION] will make it)
[LG Optimus 2x] tonyp:
Well, I want to have a final CM11 ROM. Apart from that I'll step to the side, it's been a great time but all good things come to an end :)

Sounds great!

I guess you can remove one, yes - I'm just used to PerformanceControl and each app offers some unique options.

Did you try to change the memory settings as I wrote above? If you don't it will be quite laggy indeed.

Yes, I will make an m1 and 3.1 kernel version once it's final, but I doubt there'll be a difference speed-wise.
[LG Optimus 2x] lukino993:
[MENTION=3605868]tonyp[/MENTION] of course i changed settings in performance control(set it to aggressive),but with all my apps installed i have like 85 mb of ram free(in the m1 one i have like 120-100 mb free).a thing that i want to tell you is : do you know why 3.1 kernel is slower in performance then 2.6?(i see that with the aggressive setting the 3.1 kernel is slower than 2.6,it seems that middle setting in 2.6 is like the aggressive one in 3.1).
[LG Optimus 2x] 60nine:
seems to me like Kernel Control has all PControl options plus some extra ones... (or i missed something)

btw did you try Kernel Adiutor app?

https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
[LG Optimus 2x] vanko11595:
I don't thing so.
[LG Optimus 2x] lukino993:
don't know why but for me m1 is faster.i like 3.1 kernel because it doesn't have bluetooth speedup bug but m1 for me is more stable.
[LG Optimus 2x] vanko11595:
I don't have bluetooth speed up bug with m1 and 3.1 and my camera is working just fine with both kernels. :)

edit: I installed the latest Tony's Rom. Everything is just perfect but wifi tethering is not working. So the only working wifi tethering rom is from 24.10. 2014. :))))))))))
[LG Optimus 2x] tonyp:
I checked the log, there seems to be a netd crash while initiating the hotspot.

As the netd source hasn't been touched in a while the only explanation I can come up with is that it doesn't work properly when compiled with the GCC4.8 toolchain (which I enabled in my sources at 27/10).

I've attached a netd file to this post (extract it first, it's not a flashable zip, just zipped so I can attach it at xda).

Please try to replace the bundled netd file (in /system/bin/) with that one.

Make sure the permissions are set accordingly (rwxr-xr-r).

Then reboot the phone and try again.

In a quick test I can enable and disable the hotspot now without any crashes, but I'm not sure if the hotspot is discoverable.

I think I'll include this precompiled netd binary in the next (final?) ROM.
[LG Optimus 2x] salmanfarisy:
So far so good!

Thanks again.
[LG Optimus 2x] drakodga:
I have a problem with last rom (3.1 version). My 2x doesn´t want to enter deep sleep. How can i fix it? Thank you.

Update: After some minutes with screen off, it's impossible to wake up. Reboot is needed. Only with 3.1 kernel version, 2.6 always run good.
[LG Optimus 2x] vanko11595:
I tested and wifi tethering is working like 20141024 ROM, namely it is connecting and working just fine but without security option. I also sugest to reinclude Kowalski manager in final release, because it has couple of nice features like adjusting leds brithness. thanx :)
[LG Optimus 2x] salmanfarisy:
I want to adjust led brightness too.. :good:
[LG Optimus 2x] tonyp:
new build :)

All right so here's another (quite likely the last) test build on my way to a final ROM.

I noticed in the sources that CM started to prepare a CM11 M13 build, which I want to use as the codebase for the final ROM.

Then I'll provide a m1 version, too - but I have no idea when CM will be ready with M13.

Attention: This is your last chance to report any bugs or suggest other changes for the final version of this ROM (yes, you are allowed to repost previously mentioned requests).

The final build will be my goodbye and farewell ROM to the great time we spent together here :)

Within my low amount of free time I tried my best to make it the most stable and fluid Kitkat ROM that should be daily driver ready.

Changelog:

Using a GCC4.7 precompiled netd binary to (semi-)fix wifi tethering (encryption apparently not working)

Enabled/fixed the SDCard Unmount option (requested quite a while back)

Changed mount options for /data and /cache for possible speed/stability improvements

Reverted back to sane OOM values for the lowmemorykiller

Re-added Kowalski Manager (I'll keep PerformanceControl and KernelControl, too, disable the apps you don't want to use).

Removed Youtube, the new PlayStore version is Tegra2 compatible again

Updated BarcodeScanner (it's in there as I use it to scan a wifi barcode to connect to my network after a full wipe)

Small enhancements and fixes

Download: https://s.basketbuild.com/devs/tonyp/CM11

Personally I'm really happy with the ROM, I haven't been that happy with my previous CM11 builds (except some of them way at the beginnig).

I used the phone for an hour or so, everything was fast and snappy, no big lags, no slowdowns.

I'd like to send a huge thank you to [MENTION=5399879]echo_21[/MENTION] who found the dalvik malconfiguration - this motivated me to research a little more about android in low ram environments and possible optimizations.

My personal setup (just starting to draft something for the final release :fingers-crossed:)

CPU: Min: 120Mhz, Max: 1400Mhz

(your device might be unstable with these settings! Test it properly!)

Govenor: interactive (snappier) / dyninteractive (better battery)

Shed Power Savings: Max

ZRAM: keep default at 110MB

SDCard readaheads: 512KB (scheduler: row)

Settings - Wifi - Menu - Advanced:

Make sure the following options are disabled: Network Notification, Scanning always available, Avoid poor connections

Keep Wi-Fi on during sleep: only when plugged in

(m1 Kernel needs Wi-Fi optimization to be off)

Memory Killer (OOM) Settings: I'm using the default ones, but as I'm not using the 2x a lot you might want to try around with Middle / Aggressive, too

Settings - Lock Screen - Clock widget - Weather panel - Disable weather

Do NOT use Facebook or Chrome, they're both extremely memory hungry.

Last but not least: Dynamic Fsync gives the device a nice performance boost, but you're risking data corruption (aka: you might have to do a full wipe).

So make sure the ROM runs stable and you have a backup ready before activating it.

P.S.: Strong recommendation: Do a full wipe to make sure everything runs they way it's supposed to be.
[LG Optimus 2x] NoDze:
On a side note, who simply can't live without proper social network apps, here's a list I recommend for our devices:

- Facebook: Facebook Lite(Official app) or Friendcaster(not updated in ages, but works somewhat)

- Twitter: Falcon Pro, Twitter version 3.7.1(this was pre-neon only, and works fast, fluid and has everything; no pic upload bugs and such)

- Viber: version 3.1.1.15 or 2.3.6(my favourite)

- Browser: Stock or Lightning Browser(my current favourite)

- YouTube: version 4.3.9(not too heavy and still works flawlessly)

- Launcher: Nova Launcher is my definite recommendation

All this with some little help of Greenify (I hibernate all apps except for Viber/WhatsApp, because I need my notifications real-time for them)

Have fun flashers :)
[LG Optimus 2x] echo_21:
Million Dollar Bug!?

Hi tonyp, thank a lot for the flowers :D ! Once more it has been proven that a virtual online community can do a lot more than their indiviuals alone. It's a great pleasure for me to be part of it.

I'd like to thank you once more for your altruistic efforts spending time on the development of this phone even if not your daily driver anymore!

Regarding the dalvik.vm.heaptargetutilization=only 25% instead of 75% issue first reported here http://xdaforums.com/showthread.php?p=58284515#post58284515 : I would say it was a million dollar bug. As it affected late CM10.1, all CM10.2 and all previous CM11 ROMs it must have degraded the user experience of thousands of user. Remember all the XDA posts about tweaking the ROM by still further de-bloating of the even minimized app set. Remember the posts about greenifying and tweaking of OMM killer. Think of all the disappointed users who put it into their drawer or throwed it out of the window. Think of all the extra dollars Apple made by related sales of additional iPhones.

I now work with dalvik.vm.heaptargetutilization=0.75 since 2 weeks. It is my experience that further de-bloating, greenifying, etc. is not necessesary anymore to have a well performing (lag free and task switching without app restart) P990. If one installs apps that consume much memory (like fb, kindle, etc.) no lag appears. The only downside is that task switching may need to restart an app to be swicthed to.
[LG Optimus 2x] NoDze:
So wait a second. This, so called "bug", was present all this time in CM10.1 and 10.2, and all it needed was just a simple build.prop edit and reboot? Also, this does not affect pre-CM10.1 roms, like CM10 and 4.0.4? Besides that, I somewhat repeat my previous statement, does that mean that upon flashing CM10.1(or .2), all a standard user must do is simply edit the build.prop file, change the dalvik.vm.heaptargetutilization to 0.75 and the system will handle memory much better? Active task switching is hardly something users with a P990 need, having in mind that 512MB of RAM was actually something that was a strong point 3-4 years ago, when Gingerbread and less memory hungry apps were reigning. If all these statements are correct, then I congratulate you two. This was actually a million-dollar bug. :)

EDIT: Just checked several roms, just to make sure. With the roms I have downloaded so far, I found dalvik.vm.heaptargetutilization=0.25 in every single 4.3.1 ROM. This includes TheROM, CM10.2 and SlimBean by DjNoXD. On the other side, CM10.1 T-Build, by TonyP, had this setting already on 0.75, so I assume that some testing is still required. This is so exciting, even though I am contributing nothing.

EDIT2: Okay, I am going in. I currently use CM10 Look Ma, by pengus, so this doesn't apply to my current daily driver, so I am going to check CM10.2 and SlimBean, thinking echo_21 already tested everything for CM11. Btw, dalvik.vm.heaptargetutilization is set to 0.75 in every "better" rom I've found so far for other devices. There might be something huge here. Thanks once again :)

EDIT3: Oh my God, I am enormously sorry for hijacking this thread and taking it further than needed and ESPECIALLY for going off-topic(this is so not me). Once again, regarding the entry for the heap target utilization: echo_21, you are right in every aspect. I have just tried CM10.2 and yes, the performance improved. Cached apps that were removed from recents freed up a nice bit of memory, but even better, huge apps showed a much more positive response. Apps like the all-so-grim Facebook showed little to no lag, even though multitasking was degraded, but having in mind that I use my phone unbelievably lightly, multitasking shouldn't be a problem because all my apps are alternatives or older versions because of NEON incompatibility. Also, I found that 4.1.2 ROMS don't have that value (PA by Tony and CM10 by Pengus77), BUT I found that most other devices actually use dalvik.vm.heaputilization in the same sense in roms pre-4.2 JB. So, if I may ask, what IS the default value for the dalvik heap utilization? SORRY GUYS.