Android 4.4 "KitKat" offers hope for low-memory devices - Hero, G2 Touch General

With Project Svelte, the immediate successor of Project Butter that came with Jelly Bean with a similar aim, though far less concerned with the performance of truly low-end devices.
But exactly what is Project Svelte? Well, for starters, Google has decoupled the Android core from the so-called Google Experience, and it's made both of these lighter. Android's memory footprint has been slimmed down by removing unessential background services and, simultaneously, the memory consumption of features that you can't really live without has been reduced. Moreover, the wide array of Google services, such as YouTube and Chrome, have also undergone a similar treatment, and should now prove just as powerful, but more slender. Further still, core system processes will now protect system memory from apps far more jealously, especially if those consume large amounts of RAM. And last, but not least, Android will now launch multiple services sequentially, instead of at once, with the aim of trimming peak memory demands, thus improving stability.
Still on the topic of optimizations, it's worth pointing out that Google won't be approaching this rather complex issue on its own, isntead, it's enlisting the help of manufacturers and developers both. To do so, Google has introduced a number of tools that will help the next gen of devices take advantage of optimizations such as zRAM swapping, kernel samepage merging and the ability to tune the cache of the Dalvik JIT code. Other tools include a new API that will allow developers to make their apps really flexible, by letting them tweak or completely disable high memory features, depending on the specific device, and it's relative memory. Additionally, devs will be able to take advantage of the new procstats and meminfo tools, along with a more widely supported RenderScript Compute (GPU accelaration), which has also seen some performance gains with Android 4.4 KitKat.
Click to expand...
Click to collapse
http://www.phonearena.com/news/Andr...rtably-on-512MB-RAM-devices-heres-how_id49099
To summarize:
1-Android uses less memory because developers reduced its core memory footprint
2-Android uses less memory because services have been decoupled from the Core thus allowing for lighter "Android"
3-Services are no longer launched in parallel but sequentially thus allowing for less PEAK memory usage
4-Low level tools for developers allowing better handling of cache, RAM memory pages, etc.
Click to expand...
Click to collapse

Related

MIPS Technology fot 5X Greater Speed

has anyone heard of this: Myriad’s Dalvik Turbo VM replaces the standard Android Dalvik engine, accelerating performance up to 5x on real-world Android™ applications running on MIPS-Based™ devices. It goes on to say, "With Dalvik Turbo VM, MIPS licensees can create SoCs with faster, more complex applications and richer game graphics optimized for Android smartphones and other high-performance consumer devices without requiring significant increases in device memory. The VM also provides substantial battery life improvements when running resource intensive tasks, all while retaining full compatibility with existing software. Myriad’s Dalvik Turbo VM is operational on all current versions of Android up to and including versions 2.1 (Éclair) and soon to be available for 2.2 (Froyo). Here's a link to an article. http://www.mobilegadgetnews.com/index.php?showtopic=33922 they further say, An evaluation version of the optimized VM will be available free-of-charge through the Android on MIPS community at www.mipsandroid.org as of August 1, 2010. For information on commercial distribution, contact Myriad Group at [email protected]. Sure sounds too amazing to be true. What's the catch? Can anyone comment please

Can someone please explain to me why Android phones always have memory issues please?

I'm new to alot of this stuff but one thing that caught my attention with the original galaxy s phone initially was its specs and the fact that it has 512mb. Now one thing I've noticed that has greatly hindered an android phones performance is memory. It's the achillies heal for droid users. Now my phone is rooted and I have auto memory manager and all is good for the most part. But my question is, if this phone has 512mb of ram, then why is 100-130 shown whenever I go into aam?
Also with the Galaxy s 2 and it's beautiful specs, do you think that it'll operate w/o the need for a task killer? I don't understand how iphone and android phone have similar specs hardware wise but the iphone runs smoother and rarely if ever lags w/o the need for a task killer. I'm just really curious because as much as I love droid and prefer it over the iphone, i do give it to apples iphone for stability and smooth operating.
TheAggression said:
.... I don't understand how iphone and android phone have similar specs hardware wise but the iphone runs smoother and rarely if ever lags w/o the need for a task killer. I'm just really curious because as much as I love droid and prefer it over the iphone, i do give it to apples iphone for stability and smooth operating.
Click to expand...
Click to collapse
iPhone is much tighter controlled and until recently it did not have multitasking. With Android you can have badly written apps running in the background that slow down the device.
iPhone is a single platform, so iOS supports hardware GPU acceleration of the UI. All those neat visuals in the user interface are handled by the dedicated GPU on iPhone, and by CPU on Android devices (because of so many GPUs they can have, core android does not do YET hardware GPU acceleration of the UI)
You neither need a memory manager nor any other task killer. If an application freezes the default android task manager (in Settings, Applications) will take care of it (which happens on the iPhone as well, it has an integrated task killer - press the home button twice, press and hold an app icon).
All a task killer will do is use precious mobile resources of its own.
Regarding the question of free memory - you want the system to use up as much memory as possible, that doesn't mean the system won't be able to free up space if needed. Unused memory doesn't do anything, if Android can utilize it as a cache the free space will be put to work, that doesn't mean you are almost "out of memory". Just that the system is using its resources as efficiently as possible.
@ kreoXDA.....do you know if any upcoming phones will have a dedicated GPU acceleration for the UI?
@ Partymango...... I hear you but my phone doesn't do to well without the auto memory manager app i have. Memory is always an issue, even with froyo. Any tips?
Sent from my SGH-T959 using XDA App
kreoXDA said:
iPhone is much tighter controlled and until recently it did not have multitasking. With Android you can have badly written apps running in the background that slow down the device.
iPhone is a single platform, so iOS supports hardware GPU acceleration of the UI. All those neat visuals in the user interface are handled by the dedicated GPU on iPhone, and by CPU on Android devices (because of so many GPUs they can have, core android does not do YET hardware GPU acceleration of the UI)
Click to expand...
Click to collapse
I like the nice, subtle, little info. Thanks.
i have atm a sony ericsson xperia mini pro and its issueless when it comes to memory problems
What? Never had any memory issue on my old HTC Desire. I think only mid-range(and low-range) smartphones have memory issues, not high-range.
You should search before you post. A portion of the ram on android phones is dedicated to the radio (so you can always recieve and make calls no matter what apps are running) its down to the manufacturer to decide how much.
To my mind this borders on false advertising, as the avaliable ram is way less than the advertised amount.
Fyi iPhone still does not multitask. In that only 1 app (task) can run at any given time. Ios did recently introduce fast app switching. Which saves the state of an app to memory, stops it running and switches to another app. To enable you to skip the reloading into memory of the app if you want to switch back. Although you do still need to wait for network connections to be restablished etc when you switch back to a saved app.
Sent from my GT-P1000 using XDA Premium App
I think it should not be an issue if all the memory is used .. why not use all the memory aviable .. if an app or the system needs more memory it should be automatically cleared by android! just because some task manager displays that the whole memory is in use you dont have too less memory ..
MouFou said:
I think it should not be an issue if all the memory is used .. why not use all the memory aviable .. if an app or the system needs more memory it should be automatically cleared by android! just because some task manager displays that the whole memory is in use you dont have too less memory ..
Click to expand...
Click to collapse
Just one of those common misconceptions people have. They need to see free memory to feel good. Just like when Windows started using it's extra memory as a cache and everyone started flipping out because they had no free memory. Android is the same way because it's the intelligent way to do memory management. Use all the memory available, and if something needs memory, less important or background tasks are removed from memory. This is why a task killer is NOT necessary for Android, and will only hinder performance. Android phones have no memory issues at all. They work as they should, but you have to understand that some of the memory is dedicated to parts of the system outside the Android OS user space.
+1 above.... being a student and having taken a course on OS design in practice and in theory this is the best practice.... look at your desktop os... it may tell you in a memory manager that there is "free" memory but in reality it is already paged and being treated as cache until such time that a new application needs it.
It's simple memory theory, it's pointless to have it unless it's used.... great to see that mobile operating systems are starting to do it.... my BBerry storm doesn't that's part of the reason why it's a P.O.S. and I'm going to be dumping it for a SGS II

Dualcore processor processing

Hi,
I was wondering if the 2 CPU's are working simultaneously together? or I'st just 1?., I'm using FLEXREAPER X10 ICS 4.0.3 . Sometimes I get screen glitches .... when My tab is trying to sleep and I touched the screen. Also...when I try the benchmark it only say's the CPU1 processing speed... & etc. Also when I'm browsing in the Playstore the screen animation is a bit lag... Can some1 enlighten me...or is there an app for this? than can force 2 cpu to work all the time together.?
Yes, both cores are enabled at all times. But no, you cannot make an application use both cores unless the application was designed to do so.
FLEXREAPER X10 ICS 4.0.3 base a leak rom ICS, not a stable rom, so it has some problems.
Your benchmark is correct.
There are NOT 2 CPU's. There is only one CPU, with 2 cores. It doesn't process two applications at once, it CAN process two threads of the same application at the same time. Think of it as this: two CPUs would be two people writing on different pieces of paper.A single CPU with two cores would be one person writing with both hands at the same time. He can only write on the same piece of paper, but it's faster then it would be if he was writing with only one hand.
Note: this is not related to multi-task. Multi-tasking works based on processing a little bit of each app at a time, so altough it may seen that both are running at the same time, it is not.
Most apps are not designed to work with threads though, so there's your (actually, our) problem. But this is not an A500 problem, it applies to any multi-core processor based devices ou there (including desktops).
danc135 said:
There are NOT 2 CPU's. There is only one CPU, with 2 cores
Click to expand...
Click to collapse
Essentially true, but...
It doesn't process two applications at once
Click to expand...
Click to collapse
False. Two cores is just two CPUs on the same die.
Thanks for the response guys... I'm getting bit confused with this "multi-core processor".... I was expecting that it is fast to no lag, during browsing apps in my lib,switching application, even browsing in The PlAYSTORE". So It's correct to say that multi-core processor is a bit of a waste if an app can't use it's full/all cores potential? Also if the UI of an OS can't use all cores at the same time?
Dual Core, Dual CPU....
Not entirely, because if the kernel is capable of multi-threading, then it can use one core to run services while another is running the main application. The UI is only another application running on top of the kernel...
The only difference between a dual core Intel cpu and a dual core tegra 2 is the instruction set and basic capabilities, otherwise they can be thought of as essentially the same animal. The kernel, which is the core of the OS, handles the multi-tasking, but android has limited multi-tasking capabilities for Applications. Even so, services that run in the background are less of a hindrance on a dual core cpu than a single core one, and more and more applications are being written to take advantage of multiple cores.
Just have a bunch of widgets running on your UI, and you are looking at multi-tasking and multi-threading. Which are both better on multi-core processors.
A multiple core cpu are not more then one processor stacked on one die. They thread and load balance thru software.Applications MUST BE AWARE Of multi core cpus to take advantage of the dual cores.
A multiple Processor computer has a 3rd processor chip on the main board. this chip balances the load on hardware. this does not add over head on the processors. as on a Dual multi CORE CHIP. has a much higher load overhead.
SO Many people confuse the two. This is due to how the companies market the muticore cpu devices .
So a application that can not thread itself on a multi core chip will run in one of the cpu cores. a threaded app can well guess?
a dual Processor computer can run non multi thread aware app or program on two cores..
Its quite simply complicated..
You can throw all the hardware you want at a system. In the end, if the software sucks (not multi-threaded, poorly optimized, bad at resource management, etc...), it's still going to perform bad.
Dual core doesn't mean it can run one applicaton at twice speed, it means that it can run two applications at full speed, given that they're not threaded. Android's largely meant to run one application foregrounded, and since they can't magically make every application multi-threaded, you won't be seeing the benefits of multiple cores as much as you will on a more traditional platform.
Also, a dual-core tegra 2 is good, but only in comparison to other ARM processors (and even then, it's starting to show its age.) It's going to perform poorly compared to a full x86 computer, even one that's older.
netham45 said:
You can throw all the hardware you want at a system. In the end, if the software sucks (not multi-threaded, poorly optimized, bad at resource management, etc...), it's still going to perform bad.
Dual core doesn't mean it can run one applicaton at twice speed, it means that it can run two applications at full speed, given that they're not threaded. Android's largely meant to run one application foregrounded, and since they can't magically make every application multi-threaded, you won't be seeing the benefits of multiple cores as much as you will on a more traditional platform.
Also, a dual-core tegra 2 is good, but only in comparison to other ARM processors (and even then, it's starting to show its age.) It's going to perform poorly compared to a full x86 computer, even one that's older.
Click to expand...
Click to collapse
This is so true . With the exception of a TRUE Server dual OR Quad processor computer.. There is a special on board chip that will thread application calls to balance the load for non threaded programs and games..My first dual processor computer was a amd MP3000 back when dual cpu computers started to be within user price ranges. Most applications/programs did not multi thread .
And yes as far as computer speed and performance you will not gain any from this. but only will feel less lag when running several programs at once.a 2.8 ghz dual processor computer still runs at 2.8 not double that.
erica_renee said:
With the exception of a TRUE Server dual OR Quad processor computer.. There is a special on board chip that will thread application calls to balance the load for non threaded programs and games..
Click to expand...
Click to collapse
Actually this is incorrect. All such decisions are left to the OS's own scheduler, for multiple reasons: the CPU cannot know what kind of tasks it is to run, what should be given priority under which conditions and so on, like e.g. on a desktop PC interactive, user-oriented and in-focus applications and tasks are usually given more priority than background-tasks, whereas on a server one either gives all tasks similar priority or handles tasks priorities based on task-grouping. Not to mention realtime operating system which have entirely different requirements altogether.
If it was left to the CPU the performance gains would be terribly limited and could not be adjusted for different kinds of tasks and even operating systems.
(Not that anyone cares, I just thought to pop in and rant a little...)
Self correction
I said a multi-core processor only runs threads from the same process. That is wrong (thanks to my Computer Architecture professor for misleading me). It can run multiple threads from different processes, which would constitute true parallel processing. It's just better to stick with same process threads because of shared memory within the processor. Every core has its own cache memory (level 1 caches), and shared, on-die level 2 caches.
It all depends on the OS scheduler, really.
With ICS (and future Android versions), I hope the scheduler will improve to get the best of multi-core.
In the end though, it won't matter if applications aren't multi-thread (much harder to code). What I mean is, performance will be better, but not as better as it could be if developers used a lot of multi-threading.
To answer hatyrei's question, yes, it is a waste, in the sense that it has too much untapped potential.

Does linaro make a difference?

I notice some ROMs and kernels use linaro. I have tried them and others. I don't notice a difference in speed or battery. What is the advantage?
Sent from my Nexus 7 using XDA Premium HD app
The kernel sources compile faster. LOL
Hard to imagine that would be important to an end user.
There are probably some corner cases where code that is specifically crafted to take advantage of compiler features will execute more efficiently, but that's not the case when comparing compilation of identical sources by two different compilers.
It does on older phones like when I built Roms for the galaxy exhibit 1ghz one core 512mb ram phone, linaro literally doubled the speed but on the n7 Google has it pretty much fully optimised
Sent from my Nexus 4 @1.72 GHz on Stock 4.2.2
bftb0 said:
The kernel sources compile faster. LOL
Click to expand...
Click to collapse
For many codebases, moving to a newer version of gcc actually slows down the compilation process: http://gcc.gnu.org/ml/gcc/2012-02/msg00134.html
But switching to clang (where possible) sometimes helps.
Most compiler developers are focused heavily on producing optimal (and correct) output; compile time is a secondary consideration. It's relatively easy to write a compiler that runs fast but generates slow/bloated code. Good optimization requires a great deal of computation (and often RAM too).
There are probably some corner cases where code that is specifically crafted to take advantage of compiler features will execute more efficiently, but that's not the case when comparing compilation of identical sources by two different compilers.
Click to expand...
Click to collapse
Each new generation of gcc adds more techniques for optimizing existing code. You can see the effects when a standard benchmark is built by different compilers and run on the same system: http://www.phoronix.com/scan.php?page=article&item=gcc_42_47snapshot&num=3
As you can see, the changes are fairly subtle.
With respect to rebuilding Android using another compiler: you're more likely to notice a difference if your workload is heavily CPU-bound and if your current ROM was built by a much older compiler.
SW686 said:
Each new generation of gcc adds more techniques for optimizing existing code. You can see the effects when a standard benchmark is built by different compilers and run on the same system: http://www.phoronix.com/scan.php?page=article&item=gcc_42_47snapshot&num=3
As you can see, the changes are fairly subtle.
Click to expand...
Click to collapse
Yup. That was precisely my point - subtle to the point that they are only observable via careful benchmarking - but (despite claims to the contrary by enthusiastic folks on the internet) probably not discernible by users in a blind trial comparison without the aid of a stopwatch. Our raw perception of "how long something takes" simply is not accurate at the few-percentage-points level... and that's what the OP stated "I don't notice a difference".
Put another way, if a short one-second task becomes a 950 ms task I won't be able to notice the difference, or if a 60 second task becomes a 57-second task, I won't be able to notice that either (without a stopwatch). Both are 5% improvements.
Which is not to say that folks can't be interested in knowing they have a kernel or tweak that is 2% "better" than everybody else's - but they shouldn't over-sell the perceptibility of the actual gains involved.
I would like to see benchmark measurements of IRX120's claim; I have a hard time believing Samsung left a 100% performance gain "on the table" for a phone which was just released one month ago...
cheers
bftb0 said:
I would like to see benchmark measurements of IRX120's claim; I have a hard time believing Samsung left a 100% performance gain "on the table" for a phone which was just released one month ago...
Click to expand...
Click to collapse
To take a 50% performance hit due to the compiler, they would have to screw up something big, e.g. using a softfp toolchain on hardware that supports hard float[1]. Or accidentally building everything with -O0.
Even then, only the part of the workload using floating point would suffer, and that's nowhere near 100% for most operations. Maybe certain benchmarks.
So, as you said, most users probably wouldn't notice. These devices aren't exactly used for Bitcoin mining or computing Mersenne primes.
Also, ever since Froyo, Dalvik has implemented JIT to optimize hotspots. JIT code is typically generated by the VM, not by the native C compiler. This means that a large percentage of the cycles consumed by an application could be spent on instructions emitted by Dalvik directly, and not from anything originating in gcc.
And of course, applications that perform heavy computation often ship with their own native (binary) libraries. So switching to the Linaro toolchain is unlikely to have much of an impact on games or non-WebView browsers.
[1] http://www.memetic.org/raspbian-benchmarking-armel-vs-armhf/

[Q] Make Android use more RAM

So, a lot of people want their device to have as much free RAM as possible, I am wondering if the opposite is possible.
There used to be a Cydia iPhone app called Backgrounder a while ago. It allowed you to change the way your device handled multitasking. I always set it to keep the current state of the app as if it were in the foreground. It used up more RAM but multitasking was so much better, apps didn't just close themselves, keeping only a bit of themselves in RAM for faster startup, they actually stayed in RAM fully. My Nexus 4 always has at least 600-800 MB free RAM (including cached processes) so why not put it to good use?
Is this possible on Android?
Android has always functioned like that since the beginning. It has always had true multitasking, with apps running open in the background/cached, and only get killed if there is insufficient memory available. Backgrounder was a Cydia tweak created so that iOS devices could get similar functionality in terms of how multitasking works on Android.
You can try playing around with the minfree settings, here's a guide on how to do so.

Categories

Resources