Related
After many tests I think that we really suffer from a lack of RAM. But the internal memory (NAND) should be the same speed as RAM I think. So why we don't use another 128Mb of NAND as additional RAM? A sort of swap part, but used as RAM and not as normal swap....
If someone related to the kernel would answer is it possible or not, it would be good)
DiMiK said:
After many tests I think that we really suffer from a lack of RAM. But the internal memory (NAND) should be the same speed as RAM I think. So why we don't use another 128Mb of NAND as additional RAM? A sort of swap part, but used as RAM and not as normal swap....
If someone related to the kernel would answer is it possible or not, it would be good)
Click to expand...
Click to collapse
Using it as RAM would propably require major changes to the kernel if it is even possible which I doubt it is. Using it as swap would be the possible alternative and I pretty sure that is very possible and would help performance but at a cost.
1. You would either have very little left for system and data or you would have to put system and/or data on the SD-card and that alone may make you lose anything you gain from putting swap on NAND.
2. I actually asked the swap-on nand question myself and well, we can't replace our NAND, at least not easily and swap is I/O intensive and intesive I/O will sooner or later wear out the NAND. So basicly this is not a good alternative unless you want to turn your phone into a paperweight sooner than you had planned.
So what we can do is using compcache and/or swap on SD-card. The easiest thing is to just enable some compcache. It uses RAM as swap and uses compression on the contents so we can hold more things in RAM that we would usually be able to. This means Android can keep more apps in "sleep" allowing for faster switching between apps but it will also decrease the possible amount of available RAM for the active app. I usually turn on compcache with the default setting which is to use 25% of the RAM for compressed swap. It might be placebo but IMHO it feels a it "smoother" to use after that.
Another alternative is to use a swap partition in the sdcard. Just using swap means you do not need to load any compcache kernel modules and there is no compression taking place so it's a good alterantive. However you need know your way around partitioning SD-cards to get this running so it's not as easy as just enabling compcache (assuming the build supports compcache).
For the really advanced you can enable compcache with backing swap. It means it uses a certain amount of compressed swap i RAM and when it runs out of space there it starts putting stuff on the SD-card swap partition. Once again, a bit tricky to setup but may be the best alternative.
Read more about it here: http://wiki.cyanogenmod.com/index.php/Compcache
kallt_kaffe said:
I usually turn on compcache with the default setting which is to use 25% of the RAM for compressed swap. It might be placebo but IMHO it feels a it "smoother" to use after that.
Click to expand...
Click to collapse
It make good effect: more applications can run simultaneously.
Just curious, I've been flashing the latest nightlies and in the cyanogenmod settings I see 'use compcache'. I have it unchecked, any difference if I check it. I found a you tube video about 2 phones running with and without compcache. Compcache seemed to load pages better over time, but not initially. Any help would be much appreciated
Copied from this post on another thread..
Very roughly you have a finite amount of memory (RAM). When memory is accessed it is virtual addressing, so an application is given a piece of memory, but this isn't real RAM, the operating system manages this and maps it to where the data really is. Because of this system, the OS can give out more memory than is actually available. It can then store some of this memory on a storage medium and "swap" it with some other programmes memory when one is needed and the other isn't. This is how swap works.
With compcache, instead of storing the dormant memory on a hard disk it is compressed and stored in the RAM itself on a virtual disk. This takes up some RAM, but because it is compressed, more RAM is spare tha n if the data were left in memory as it is. Again this has the effect that more memory space can be handed out than the RAM that is really there.
Because Android manages applications so that when memory runs out it just closes applications running in the background, more applications can reside in the larger virtual memory space than before, making multi-tasking more pleasant and responsive.
I know that nfinitefx45 took compcache out of his latest builds in both the Stock and ZenHeroFX ROMs. I don't know all the technical reasons behind it, but I think it just didn't improve performance enough to be worth leaving it in. Granted those are Sense-based ROMs though which are generally a little slower and "bloatier" in nature than AOSP, so the performance difference maybe be greater in CM.
chromiumleaf said:
I know that nfinitefx45 took compcache out of his latest builds in both the Stock and ZenHeroFX ROMs. I don't know all the technical reasons behind it, but I think it just didn't improve performance enough to be worth leaving it in. Granted those are Sense-based ROMs though which are generally a little slower and "bloatier" in nature than AOSP, so the performance difference maybe be greater in CM.
Click to expand...
Click to collapse
Thank you for the response, just wasn't sure. Since Darch left it unchecked, I figured I would ask
Hi again guys...
In Linux we have a SWAP partition for some time if RAM (Random Access Memory) will full OR for speed up applications by buffering in swap partition.
(Recommend Linux SWAP partition size: half of RAM)
so Android is Linux based and have kernel like Linux. Is it work to make a SWAP partition for SGS with swap file system?
You don't want that...
Android doesn't wipe RAM immediately anyway, so apps which are open and shutdown can be restarted again quickly (unless the RAM has been reused).
Also, apps on Android are designed to be shut down whenever free RAM runs out (its in the development guidelines that all applications should expect to be shut down at any time). Since most Android phones use high-speed NAND memory, when properly configured, apps load quicker too
The problem with swap is that it can lead to thrashing and loss of battery life. It's good for computers (because generally, you would rather lose performance and ensure you don't lose work), but on Android, applications should be killable at any time, and should have mechanisms to protect their work anyway.
It's probably possible to create a swap partition/file if you wish (try to swapon), but I foresee some potential side-effects, especially if you don't want to spend a lot of time managing memory manually.
i didn't think about battery life.
Thank you so muchhhhhhhhhh
I was actually exploring this option last night and stumbled that the kernel does allows swapon commands. I remembered trying it earlier on a stock rom but it was not available then.
Why I need the swap was because of the frequent shutdown of my launcher pro due to apps contenting for memory. The live wallpaper and heavy Widgets like pure messenger pro aren't helping much either, after much usage the device just slows down, lags and silently kills the background apps. The "minfree" settings were also tweaked but with much less desirable results was seen...
So I downloaded an app called "swapper2" from market and tested via 2 methods; Swap file and swap partition.
The performance of a swap file that sits in the NAND is not really that great. In fact it kinda lags me when memory is being swapped in and out of it. I think its the same problem with the i/o lag problems with any other rom
Then I tried a swap partition on my class 6 SD card. Although the lifespan of the card would be shortened and the battery life would be impacted, the performance is better compared to the earlier method.
In either method, the amont of apps that can be left opened at the foreground and background had increased and doesn't lag as more apps is being launched. Not bad for me but well, I guess it's all up to the user of the device at the end. Just my 2 cents...
I'll try the swap file method again over at the ext2 partition created by the lagfix and see how it goes next. Not sure if anyone interested though...
Sent from my GT-I9000 using XDA App
It seems that using the swap partition doesn't have the lag compared to using the swap file method.
It may be due to the I/O of multiple storage (parallelism ?) is better than a single storage or writing into the raw partition is better in terms of performance than a swap file.
I'm done with my findings, the device still have 60mb free and never lags, I'm sold.
Sent from my GT-I9000 using XDA App
I have a Flash application that requires ~130Mb of RAM and I want to run it on my Galaxy S
I've installed Froyo JPK with latest flash 10.1, but just before the end of startup procedure I always get the "exclamation circle" icon which is apparently the "out-of-memory" message in flash.
I have tried to free up the memory with task killers and memory boster, but can't get it above 175 Mb, which is obviously still not enough, since probably browser and other applications/services use it back before the flash application starts completely. Or might be also some limitation my browser in Galaxy S ? -> see EDIT below
On HTC Desire this same application works like a charm.
So I wonder...
Is there any way to get more free memory ? [EDIT: Yes, with "Chuck Norris mode" app killers, but i does not always help and it's lame]
Is there any way to get more than 311-322Mb RAM used for Applications ? [EDIT: Yes, when developpers will found out the way how to get less memory used for video codecs or even found the misterious 32Mb which are yet nowhere to be found]
Can we expect to this memory issue to be solved in future Froyo releases ? [probably only Samsung knows that, but for now it seems very unlikely]
EDIT: Found out that I get out-of-memory with every single application when it reaches 128Mb of RAM usage.
This is again specific to SGS. Looks like this is some internal max memory allocation size per application/VM
So here is another question:
Is there any way to increase this limit (might be android internal or dalvik VM related)?
no
no
no
sorry to say that...
flypubec said:
I have a Flash application that requires ~130Mb of RAM and I want to run it on my Galaxy S
I've installed Froyo JPK with latest flash 10.1, but just before the end of startup procedure I always get the "exclamation circle" icon which is apparently the "out-of-memory" message in flash.
I have tried to free up the memory with task killers and memory boster, but can't get it above 175 Mb, which is obviously still not enough, since probably browser and other applications/services use it back before the flash application starts completely. Or might be also some limitation my browser in Galaxy S ?
On HTC Desire this same application works like a charm.
So I wonder...
Is there any way to get more free memory ?
Is there any way to get more than 309Mb RAM used for Applications ?
Can we expect to this memory issue to be solved in future Froyo releases ?
Click to expand...
Click to collapse
If you need that amount of memory you should use a computer.
Its not the phone thats the probem here. its what you try to run.
//Damian
I would personally put up money to get the RAM issue resolved.
People keep saying that 324~ MB is enough. That's not the point though. The point is that Samsung advertised 512MB. Any reasonable person would assume that, like other phones containing 512MB of RAM, that the phone would have 400+MB available for general usage. 324 MB for such a power phone is dismal. I consider Samsung's claim to be a form of false advertising. Yes, technically the phone has 512MB of RAM, but not according to the reasonable expectations of a consumer. Almost half of the stated RAM isn't usable to the end user for applications. This is a problem with the phone from the standpoint of delivering the expected value to the consumer.
Dear XDA Developer Legends,
Do you think it is possible that you will be able to free up ram that is allocated to the ram disk?
Yours,
Concerned Customers
Hm, maybe its applicable for a lawsuit?
andars05 said:
I would personally put up money to get the RAM issue resolved.
People keep saying that 324~ MB is enough. That's not the point though. The point is that Samsung advertised 512MB. Any reasonable person would assume that, like other phones containing 512MB of RAM, that the phone would have 400+MB available for general usage. 324 MB for such a power phone is dismal. I consider Samsung's claim to be a form of false advertising. Yes, technically the phone has 512MB of RAM, but not according to the reasonable expectations of a consumer. Almost half of the stated RAM isn't usable to the end user for applications. This is a problem with the phone from the standpoint of delivering the expected value to the consumer.
Click to expand...
Click to collapse
the phone has 512MB and you can use all. But the system use some of it.
Its only user that cant read and understand how it work hat keep asking about it.
And this phone has more ram that most have. So yes it is enough of ram.
'If you try to runt 50+ all time you will and up with low memory.
But its the same on a computer. none complain about that.
Only that you can only see 3.5GB on windows and use that on a 32.bit system. Well now you can see 4GB and all people are happy.. but they still cant use it, but its looks good.
That the same with this phone.
If samsung did show 512MB and did show how much that was free, all people that complain would be happy. but it dont change a bit what thay can use.
yaocheng said:
no
no
no
sorry to say that...
Click to expand...
Click to collapse
That make no sense
there is no reason to get less memory with the i9000 when comparable devices like the nexus one running the same OS version has 100mb+ more free ram
DamianGto said:
the phone has 512MB and you can use all. But the system use some of it.
Its only user that cant read and understand how it work hat keep asking about it.
And this phone has more ram that most have. So yes it is enough of ram.
'If you try to runt 50+ all time you will and up with low memory.
But its the same on a computer. none complain about that.
Only that you can only see 3.5GB on windows and use that on a 32.bit system. Well now you can see 4GB and all people are happy.. but they still cant use it, but its looks good.
That the same with this phone.
If samsung did show 512MB and did show how much that was free, all people that complain would be happy. but it dont change a bit what thay can use.
Click to expand...
Click to collapse
This misses the point of my original statement. The Nexus One is advertised (along with many other phones) as having 512MB of RAM. The N1 has 380-400+MB available of RAM available for applications, as do many other phones containing 512MB of RAM.
Yes, the system does reserve some for certain system functions. Even after those functions have been reserved on other 512MB models, the vast majority is still available to the end user. This is not the case on the Galaxy S series. This is evident by the original posters comment regarding his application.
To address your Windows example: Windows 32 bit actually states that only a portion of the 4GB is available for use. I don't see in the advertisements where Samsung states "Contains 512MB -- 324MB available for actual usage"
I think most consumers, like myself, would assume that the amount of RAM advertised is directly correlated to the amount usable for applications.
Otherwise, what's the difference between a phone advertised as having 384MB and the Galaxy S? They both could have the same amount of RAM available.
andars05 said:
Windows 32 bit actually states that only a portion of the 4GB is available for use.
Click to expand...
Click to collapse
But its not the case here.
+1 for the rest.
This is what i get if I run top command from adb from a freshly booted phone:
←[H←[JMem: 296300K used, 15048K free, 0K shrd, 6968K buff, 134720K cached
CPU: 1.3% usr 2.3% sys 0.0% nic 96.2% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 0.99 1.33 0.59 1/351 3109
Wonder what this "cached" means.
Can somebody pls run this on HTC desire ?
I don't think our phone has 512mb of RAM physically available to the system. I think the phone has 512mb of RAM in total but it looks like 128mb of it is graphics RAM or something. Meaning we only have 384mb available to the system. The maximum amount of RAM I can ever get free is about 175mb so I don't think that it's reasonable that the system is using about 337mb of RAM. My desktop linux system uses less RAM than that on boot.
Isn't the memory allocation for graphics dynamic?
how often does the graphics really need all that ram?
any why aren't other devices affected by this? (doesn't the GPU on nexus or milestone for example need memory allocated?)
sionyboy said:
Do you think it is possible that you will be able to free up ram that is allocated to the ram disk?
Click to expand...
Click to collapse
Please explain. Which ram disk do you mean?
Also, since it runs on linux, cant we assign some space from the internal sd (or external) to make a virtual ram disk that would be used as ram when needed? some king a paging file that we know on windows...
And if this is possible, can we assign it to video so graphism will be a little slower but app will become faster?
I think there is something we can do if we can change assignation of ram, apps, and video to make this phone way much powerful.
(just an idea...)
franklin01 said:
Also, since it runs on linux, cant we assign some space from the internal sd (or external) to make a virtual ram disk that would be used as ram when needed? some king a paging file that we know on windows...
And if this is possible, can we assign it to video so graphism will be a little slower but app will become faster?
I think there is something we can do if we can change assignation of ram, apps, and video to make this phone way much powerful.
(just an idea...)
Click to expand...
Click to collapse
There's always Compcache..that worked like a charm on the G1 and Magic.
http://forum.xda-developers.com/showthread.php?t=724960
As you can see, all other Android phones reserve some memory to the system... It's just the way it is.
the sgs kernel creates amemory blackhole, that is, it starts using memory after a certain memory address.
It does that because many things in the hardware are using fixed memory addresses to allocate their own memory which is not managed by the kernel itself and the kernel will never touch or see it.
what you call "system memory" is usually memory used and seen by the kernel, for the OS's functionality: various applications, services, daemons, kernel daemons, kernel memory itself (its not much) and some time some ramdisks.
Every phone also uses that of course, which amounts for like 80-130megs. They also often use small black holes of like a couple of megs, but that's so little that no one will notice.
The sgs makes a big blackhole. To me it's more of a design fault, but not much you can do about it I guess. It would need someone who's going to read the complete hardware sheets to bypass that, if at all possible, lol. Or samsung.
I bet they fixed the design issue in the galaxy tab and either the chip has separate dedicated memory either there's no blackhole.
Another theory why the blackhole is necessary is that there's a bug in the chip and it's messing up a portion of the memory, so this portion is left unused (blackhole'd - never seen by the kernel) for stability reasons.
i hope this gives some insight.
reference from the previously linked post:
- Galaxy S [2.1] RAM = 512 MiB | Linux = 325 MiB | Reserved = 187 MiB (with I9000XWJM2 firmware)
notice the huge black hole here (187 megs)
I used to have more than 300mb free after reboot with nexus one...
DamianGto said:
the phone has 512MB and you can use all. But the system use some of it.
Its only user that cant read and understand how it work hat keep asking about it.
Click to expand...
Click to collapse
No, *we* can't use it all , because we != system. The debate is not whether or not there is 512MB of physical memory; there could be , since Samsung advertises as having 512MB, but its not all user accessible memory. We don't know for what the system is utilizing that memory, I don't think its for loading some of the core system components; otherwise we should be left with more free RAM like other devices with 512MB of RAM (i.e Nexus One). Its more likely that 188MB is used by either the GPU and other hardware or as a Ram disk.
In contrast, other phones having 512MB of RAM don't use user allocated memory for system or hardware use (at least not the same way Samsung does). They are somehow handling it differently, maybe their GPU's and Other hardware software counterparts have dedicated memory. Whatever said, at the end of the day in the user's point of view, Galaxy S DOES NOT have 512MB of RAM as what we were all led to believe . That is pure deception !!
If they knew this was the case then they should have alerted this to the users. For-example a spec sheet for Samsung Fascinates says 512MB Flash/384MB RAM they should have advertised Galaxy S like that instead of lying through their teeth.
Just wondering cos this will influence my next decision, so should i get a phone with 256, or 512 or 1GB.
Lets just say - the more, the merrier, u get me?
More RAM means more tasks can be done simultaneously in less time. So go for the highest amount of RAM possible.
miodrage said:
Lets just say - the more, the merrier, u get me?
More RAM means more tasks can be done simultaneously in less time. So go for the highest amount of RAM possible.
Click to expand...
Click to collapse
true, but will i miss out on anythig if i get a phone with 512mb ram?
i am wondering between the lumia 720 vs the 820. but i am interested in the hd front camera of the 720, which the 820 lacks. i know it will work, but will i have to close apps and stuff? anyone ever run an emulator of windows phone 8 and seen how much ram it actually "needs"?
On 512 MB devices Apps can use up to 150 MB of Memory. If they exceed that treshhold the App will be killed by the OS. On 1 GB devices it's up to 350 MB. This does not mean that the OS is taking up all the rest but there is reserved space for Background Tasks like a Navigation App running in the Background or Skype waiting for incoming calls.
There are no WP8 256 MB devices. Those were only possible with WP7 and had severly limited background processing due to the low Memory.
Certain Apps can't run with only 150 MB of usable Memory - especially games, so developers set a flag in the App so it can't be installed on low Memory devices. Of course most will try to get their Software running on as many devices as possible but sometimes it's just not possible.
The 820 would still be the safe bet.
Apps can use 90 mb on 256 ram devices, 346 on 512 and around 700/800 on 1GB device.
If an does not have enough memory to run but does not exceed the above limit, system automatically tombstones older apps to free memory.
cool, thanks for the info guys, appreciate it
EDIT: just a sec, the vales by StevieBallz & mcosmin222 are quiet different...? am confused.
nstream said:
cool, thanks for the info guys, appreciate it
EDIT: just a sec, the vales by StevieBallz & mcosmin222 are quiet different...? am confused.
Click to expand...
Click to collapse
My info is based out of the DeviceStatus API from the SDK.
The system holds around 130 MB for background tasks.
Here is Microsoft's documentation on the Topic in MSDN: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681682(v=vs.105).aspx
It depends on wether you use WP7 or WP8. I was talking about WP8 only - WP7 is somehow different because there is no fixed Limit enforced by the OS until it actually runs out of Memory. In WP8 those are hard Limits. For WP7 there were 256 MB devices, for WP8 the Minimum requirement is 512 MB.
Well, that's kinda funny, that WP8 has more memory and can't use it.
The Memory is reserved. The reason is that the System should work predictably - both for users and for Apps. If I have a Navigation Software running in the Background it Needs a guarantee that it will have enough Memory available. I can't just stop Navigation because the Facebook App is loading a big Image. Or if I receive a Skype call I want to talk to someone but perhaps would not want my currently active App to just be closed down because it takes too much Memory. So: no, the Memory is not unused. If Apps don't use their alloted share it is also used to Keep several Apps available for fast switching (e.g. Twitter is still in Memory but asleep).
That actually is an improvement over WP7 were an App was regularly only allowed to use 90 MB of Memory. This was not enforced by the OS so you could go above it if there was enough space available. The Problem was that at some Point it would run out of Memory and then would be killed. That would sometimes happen at 90 MB, sometimes at 150 MB. So a developer could test his App on his device without background Music, etc. and see it crashing all the time on people's devices. This Situation can no longer occur.
The Basic Problem is that Smartphone OS's don't use virtual Memory like on a PC. There if you run out of physical Memory Little used data is swapped out to the hard drive (which slows the System considerably). This normally isn't done on Smartphones because it is taxing on the Flash Memory. 256 MB WP7 devices still implemented it to allow them to even run 90 MB big Apps and Background process were completely deativated on those devices. WP8 also Needs more Memory for the OS itself than WP7 did.
Yay, thanks again guys