compcache: some clarification please - myTouch 3G, Magic General

i've been reading up on compcache and the way that it works, but i'm pretty confused on how exactly this works on the android platform... i can't seem to pull the exact definition of compcache for android through all the chatter from threads, and it seems my answer gets lost in translation...
so to put it simply, i'm assuming from all my thread reading that compcache is actually based off the ext partition that you have on your SD card, and not on the RAM itself on the device? is this right? this is where i get confused, cause the compcache writers and developers say that it creates a ramzswap in the ram itself and stores compressed pages on the device RAM, effectively increasing the efficiency of your onboard RAM... in android's case and all the cooked ROMs, does it work off your SD card and your ext partition? or does it work off the RAM itself...
i'm currently running cyanogen's latest 32b release on my mytouch and its running extremely fast WITHOUT apps2sd, but i would like the benefits of compcache to prevent losing information from my browser and other applications like gtalk, which supposedly compcache helps with... would i have to create a ext partition and utilize apps2sd in order to utilize compcache? thanks in advance

bump... would like to be learned

I'm also a bit confused

i would like to know as well as i've installed Cyanogen v4.0.1
i went into the recovery console and formatted my SD choosing the option of "Format SD: fat32+ext2+swap"
was this the correct thing to do?

either way if you format cyanogen's rom with just a fat32, or fat32 + ext + swap, it doesn't matter as his rom is compatible with either apps2sd or without...
the question is, where does compache compress its file pages? in the RAM, or in the SD card

Compcache uses xMB of RAM as compressed swap space. No ext2 or swap files or swap partitions are needed (though the latter two can be used as "backing swap").

So on a 32B, with RAM limitations already, how is that a good thing?

PsychoI3oy said:
Compcache uses xMB of RAM as compressed swap space. No ext2 or swap files or swap partitions are needed (though the latter two can be used as "backing swap").
Click to expand...
Click to collapse
thanks thats the answer i was looking for...
MikLSP said:
So on a 32B, with RAM limitations already, how is that a good thing?
Click to expand...
Click to collapse
how is it NOT a good thing? compcache compresses page files, effectively increasing your RAM's efficiency and "technically" increasing its storage size in the allocated ramzswap... according to the developer's tests on different machines, it effectively makes it seem like it doubles the RAM amount on your computer...
this is nothing but good, especially for lower end machines like netbooks, and phones that have limited RAM allocation to begin with...
heres a small tidbit from the google source page
http://code.google.com/p/compcache/

i don't mean to threadjack, but compcache will be active regardless of whether or not i partition my sd card to fat32+ext2+swap...?
and i only have to partition my sd card to fat32+ext2+swap ONLY if i want apps2sd to work correctly using Cyanogenmod's rom...?
please correct me if i'm wrong.
i'm really wondering because even though i'm using Cyanogenmod's latest rom on my MyTouch, i still get considerable lag throughout such as typing on the virtual keyboard, screen orientation rotation, etc. i also use TasKiller.
maybe i'm expecting too much...

probably... lag from orientation, keyboard, and small things like this are still very common... i've tested a lot of roms on both the g1 and mytouch, and cyanogen's is by far the fastest...

As I have understood it sort of compresses things stored in the RAM (like background apps)

I've done a good amount of reading on compcache and have found that its been causing problems in my 4.0.1 build of cyanogen... the best thread i've found on the issue is:
http://forum.xda-developers.com/showthread.php?t=547752
hopefully users continue to share their findings, as the the thread mentioned is for the G1, and i'm sure optimal compcache settings will differ on the mytouch 3G... i will be doing some extensive testing on compcache only (due to me recently buying a 32gb micro card, and don't want to mess it up with linux swap) and will report my results... if anyone would like to join in, please post your findings as well...

Related

Always low on memory - Advice

Hi all,
I'm always low on memory on my phone, I run quite a few hungry apps so looking at suggestions now please. I'm a linux-person but this one baffles me on the right way to go ahead.
I'm on CM-4.2.3.1 pretty much as standard, no tweaks to note on it.
Advanced Task Killer shows me at generally around 17Mb available memory, but in my logs I often get:
Code:
11-12 13:33:43.102 I/ActivityManager( 322): Low Memory: No more background processes.
So I'm thinking I need to do something. I've not got swap enabled, nor have I got compcache as far as I'm aware, so what should I go for here and is there a simple guide on it? As I have done a few searches and its overwhelming the information that comes back.
Thanks in advance everyone
You could try the free app "automatic task killer" see if that helps. I've personally came to the conclusion that CM 4.2+ ROMs are RAM hogs themselves. Try flashing a ROM with the 10 meg RAM hack if it bugs you.
You're supposed to be low on memory.. That means your phone is using the it to the greatest efficiency.. Empty memory is wasted memory. Unless you're experiecing long load times and loads of caching, its normal.
goldenarmZ said:
You're supposed to be low on memory.. That means your phone is using the it to the greatest efficiency.. Empty memory is wasted memory. Unless you're experiecing long load times and loads of caching, its normal.
Click to expand...
Click to collapse
qft, this is typically how linux runs anyways.
Do you have an ext partition on your SD for apps2sd? How about a linux swap partition (enabled)?
mikedmeyer said:
Do you have an ext partition on your SD for apps2sd? How about a linux swap partition (enabled)?
Click to expand...
Click to collapse
I second the suggestion for using a linux swap partition!
Agreed, and yes I have a swap partition correctly formatted, however thats the problem there are too many "guides" of how to enable/use the swap on CM, so if anyone can point me to the right entry (couldn't find it on the CM wiki either), or how to enable any of the other memory enhancements (compcache or whatever)
Thanks!
You can dl user.conf app from the market. explanations are given in the help section

Android 1.6 vs 2.x memory footprint

Hello.
Right now I am on Cyanogen 4.2.15.1.
The biggest problem of G1 is imho lack of memory. I did every possible hack to make more memory available to my phone. I use compcache, 10mb hack etc..
I also tried swap, but it has been giving me some troubles and I find my phone working better without it.
I see everybody switching to 2.x roms and of course it makes me want to switch too although my phone runs pretty fine as it is now. But I would switch if I am convinced that things will improve. So here come the questions:
Did you experienced speed improvement by switching or it just runs the same/slower? (I am only interested in answers of G1 users as this is somehow a bit specific phone with the lack of memory)
My second question rose from my concerns of memory too. To use 2.x roms, one has to use DangerSPL, right? I am not sure about this, but I got the impression, that this one moves some of the memory from application runtime to rom space, so we can fit larger roms in. Does that mean, that in the end this rom has less operational memory for itself? Because that would be the exact opposite thing to what I want to do.
Thanks for the answers.
You as many others are confusing persistent storage with ram.
Ram is fast but will not store data over a reboot.. the amount of ram on the dream remains the same regardless of the spl/radio/rom (with maybe an exception of the 10mb hack that borrows 8mb from video ram for general use)
The persistent storage slow and is what danger spl changes.. this is the equivalent of your hard drive on a computer.
In the case of danger spl it significantly reduces the temporary space (cache) and increases both the core system storage (system) and the user space storage (data) this allows more on internal phone storage instead of the sdcard, having your core apps not using apps2sd is likely to increase perceived speed.
Since the memory (ram) is unchanged and the new kernels are better at memory management there is potential for newer versions to support more tasks at the same time than the older versions. (We are not there yet but cm-5.0.8-test4 and cm-4.2.15.1 seem similar in behavior in terms of what can be done with the ram avalible)
As for upgrading that's your choice.. in general on the dream anyway I don't recommend going to cm5.0.7 and related roms if you have not already done so.. and I never recommend a test version if you are not looking to be a tester. So I'd wait till cm5.0.8 final and related roms are pushed if you feel it's time to upgrade.
Otherwise if you are on a stable 1.6 rom that fills your needs and want to keep a very stable phone.. there is no need to rush the upgrade.. at some point you will find something that requires you to upgrade to 2.1 and will be glad it exists as it will improve the usefulness of the phone.. and I'm sure the stability of 2.1 will only improve over time.
Thank you for your answer.
I of course understand the difference between ram and persistent storage (rom?). The information I missed is that the additional memory is taken from the cache. Someone somwhere here posted something that implied that it reduces ram. Hackery!
Thank you for clearing that up. What are consequences of having less cache? Is this not a problem then?
You got my point with stable 1.6. I do not want to flash new rom every week and prefer stable working phone. The ONLY thing I was hoping for is the better memory management and maybe the whole rom footprint in ram, leaving more room for apps instead of system. I am running apps2sd but I think the main source of sluggishness of my phone is that apps are too often removed from ram by dalvik.
So I was hoping for something like " Yep, 2.1 is 50mb in ram instead of 80mb of 1.6 and you will have more free memory." That would make me switch. Having the same amount or even less makes no sense for me. I see no killer 2.x feature that I need to have so far.
Same amount of ram with both spls as I said. No 10mb hack on cm5 because the gpu is used for system operations
Cache is mounted as /cache and as I said contains temporary and cached data.. As designed its intended as a staging area, which will usually persist across reboots but may not under certain situations.
No performance impact ought to exist due to the resize. If too many things are attempted to be saved here you will get out of disk space errors.. but 30mb is plenty for the staging operations required by the system during normal operation.
As you may know: Linux never has "free" memory.. but reclaimable memory.. the reason for thus is anything read from persistent media is put into "disk cache" in case its needed again.. if the memory is needed for something else it will be freed at no/little cost, but if the cached files are needed they wont be reloaded thus saving the time reading disks/SD/flash.
(Thus why devs cringe when people show the output of free.. 'cat /proc/meminfo' will give full detailed breakdown of memory use if you qknow how to read it)
I am Linux guy myself, so I know how it manages the memory. Anyway, 10mb hack was a huge thing for me, can not live without it.
That pretty much means I am staying and 1.6, thank you for your time.

Lag issues with the SGS

It is by now well known the SGS has a lag issue (apps slow to launch, email slow to access, etc) that can be fixed by changing filesystems for parts of the device, to make it blazingly smooth.
There are several fixes available, some based on SD card, some used through PC, some based on kernel flashing, some based on on-device apps, etc.
At the time of this writing it is hard to say which is better. I would personally advise you to take a quick look around at which fixes are available.
Most of them are listed/referenced from the FAQ thread here: http://forum.xda-developers.com/showthread.php?t=723596
--
This is a placeholder post, the first method was stickied before but this seemed unfair to the other methods and may not be the method most suited to your device usage and situation. At this time, all of the fixes have their specific quirks and needs. Hopefully soon we will see a "much better than all the rest" fix soon from one of the devs here, or Samsung might even fix it themselves
If someone cares to write down a comparison between all the available methods at this time, feel free to post it in a reply here!
Great idea Chainfire.
When a user first decided to use a modified/custom/different firmware on their Samsung Galaxy S, they usually go through these steps:
1. Flash with Odin/Kies
2. Flash update.zip for root
3. Flash other update.zip (GPS fix, battery mod, etc) as necessary
4. Do a lag fix.
It took me a few hours and reading through countless posts to see the pro's and con's for each lag fix.
I will try to go through them as succintly as possible, and if anyone needs more explanation you can either click the link or do a search.
Feel free to correct me, this is how I see the lagfix as when I applied and tested it
Before starting, here is the internal structure of non volatile memory (where data persist after reboots) in Samsung Galaxy S:
- 128MB of very fast NAND (some people incorrectly called this ROM)
- 16/8GB of internal SD with 2GB set aside for application installs (this is why you see your internal SD as either 13+ or 5+ remaining, the 2GB shows up as Internal Phone storage)
- your micro SD card (external SD)
The lag is due to the inefficiency of the file system used in the 2GB (/data) partition for applications, stalling a lot of the read/write operation. You can search this for further reading if you want to.
Lag fixes
- MoDaCo's lagfix: Better than stock on old F/Ws but about the same as JM1/2/5 and JP1/2/3
This lagfix uses the 128MB very fast NAND to store your applications instead.
Pro: very very fast applications opening/switching performance
Cons: You are limited to 128MB of apps including built in apps .
- Mimocan's lagfix: Significant improvements in performance which can also be benchmarked. Requires an external SDcard formatted partly in fat and partly ext3 or ext4.
This moves the /data files into the ext3/ext4 partition on an external microSD card
Pros: very fast, lots of storage space for apps
Cons: You will be unable to unmount your external SD card when the phone is on, and you need an external SD card for this to work
- OneClick Lagfix by RyanZA: Based on mimocan but using the internal SD card. Results are better than with basic mimocan and it is a lot easier to install.
This creates a file inside the 2GB partition that is mounted as /data.
Pros: very fast, lots of storage space for apps, easy to install and undo, available in the market.
Cons: if you install too many apps you won't be able to roll back the lag fix unless you delete some apps. Superseded by RyanZA lag fix 2.3 beta
Erroneous free space on Internal Phone storage (/data)
There are still stalls when installing apps, and when accessing android applications database
- CFLagFix by Chainfire: Based on mimocan, approximately the same as RyanZA's fix.
pretty much the same as OneClick Lagfix.
look above for Pros
Cons: There are still stalls when installing apps, and when accessing android applications database
-Voodoo lag fix by supercurio: a new class of total lag fix
Instead of creating a file inside the rfs partition and mounting it as /data/data, the voodoo lag fix updates the kernel so that the the 2GB partition is using ext4 instead or rfs. This gives the best possible lag fix.
Pros: fast, smooth, across everything you do. The way galaxy s should have been in the first place. The best and most consistent lag fix with no remaining lag left that is caused by rfs.
Support with other kernel mods are starting to show: backlight mod, OC/UV kernel
Cons: Incompatible with clockworkmod recovery
I am now using voodoo lagfix beta 4 only
http://project-voodoo.org/
I hope this helps
So, I usually read a lot on the Android Dev side of the SGS since I am very keen on a fix that will eliminate the lagging issues on the phone. I was in Spain for a holiday at the end of August and have come home to find a new 'Project Voodoo' fix being touted around. What sort of method does this fix entail?
And does anyone out there in the developer community believe that there will be a fix that will reformat the entire 2gb data partition to YAFFS2/EXT4/NILFS2 etc, as opposed to mounting a virtual file system on top of RFS? Or is it possible that Samsung themselves could remedy this with the 2.2 update?
sionyboy said:
And does anyone out there in the developer community believe that there will be a fix that will reformat the entire 2gb data partition to YAFFS2/EXT4/NILFS2 etc, as opposed to mounting a virtual file system on top of RFS? Or is it possible that Samsung themselves could remedy this with the 2.2 update?
Click to expand...
Click to collapse
Voodoo does that - ie mount /data as ext4
een625 said:
- OneClick Lagfix by RyanZA: Based on mimocan but using the internal SD card. Results are better than with basic mimocan and it is a lot easier to install.
This creates a file inside the 2GB partition that is mounted as /data.
Pros: very fast, lots of storage space for apps, easy to install and undo, available in the market.
Cons: if you install too many apps you won't be able to roll back the lag fix unless you delete some apps. Superseded by RyanZA lag fix 2.3 beta
Erroneous free space on Internal Phone storage (/data)
- CFLagFix by Chainfire: Based on mimocan, approximately the same as RyanZA's fix.
pretty much the same as OneClick Lagfix.
look above for Pros
Cons: unable to rollback changes
Click to expand...
Click to collapse
RyanZA - good, but slower than minocans when you have a lot of apps/use phone for a few days.
CFLagFix by Chainfire - you can rollback without any problems.
ashwinds said:
Voodoo does that - ie mount /data as ext4
Click to expand...
Click to collapse
So Voodoo actually reformats the space as EXT4, as opposed to mounting a virtual filesystem.... Interesting! I did read that Cyanogen were going to be using the Voodoo fix in their upcoming SGS firmware, will be keeping an eye on that for sure.
(Unless of course the official 2.2 remedies this.... though I'll keep an eye on Cyanogen anyway )
Do you have any information regarding development process of cyanogen for the SGS?
Any reason the voodoo fix is not mentioned? (Except for the fact we have to wait for beta2 to become available).
dagrim1 said:
Any reason the voodoo fix is not mentioned? (Except for the fact we have to wait for beta2 to become available).
Click to expand...
Click to collapse
Probably because if you don't already have it, it's not really available. V1 was a "private" beta, or semi-private anyways, and the dev has pulled it while he works on beta2.
distortedloop said:
Probably because if you don't already have it, it's not really available. V1 was a "private" beta, or semi-private anyways, and the dev has pulled it while he works on beta2.
Click to expand...
Click to collapse
Yeah, makes sense and clear
Is a great (and my favorite so far) alternative though... Should become available this week though.
Voodoo is definitely the most promising method IF they can get the kinks worked out. We'll see it when it gets there
@een625 makes a pretty good short comparison of all the methods, but leaves out Supercurio's method. This should be added to the second post:
-Supercurio's lagfix (aka Voodoo beta 1): Significant improvements in performance which can also be benchmarked. Requires a custom kernel.
This reformats the /data mount point as ext4. The conversion is automatic on first boot and no data is lost.
Pros: very fast, does not affect the amount of storage for apps, doesn't impact free space reporting, uses ext4 for data integrity which some argue is unnecessary, easy to install, easy to uninstall.
Cons: Semi-private beta release only, must be specifically uninstalled to upgrade some firmwares, uses ext4 which some argue is significantly slower than ext2, no longer easily available while beta2 is finalized
I personally use this one right now, it is the only one that I have never experienced lag with at some point, even after almost five days of continuous uptime and heavy use. All the others have issues from time to time, especially with the Market and installing apps. This one does not, in my experience.
Also, I think that there should be some mention that mimocan's method requires a custom kernel, and also that mimocan is pretty much the same as apps2sd on other Android phones (uses ext3/4 in a partition on the external card). Additionally, a con to mimocan is that the user must manually partition and format the external card, all of the other methods can be done without user intervention other than flashing a PDA or running a script/apk.
Finally, dkcldark had an update.zip method posted very briefly that reformats the /data to nilfs or ext4. Looked promising, but was pulled for some reason.
And last but not least, please, please, please, let's not let this thread devolve into the ext2 vs ext4 debate that so many of the individual lag-fixe threads turn into. Perhaps a thread dedicated to that should be started (and stickied)?
distortedloop said:
And last but not least, please, please, please, let's not let this thread devolve into the ext2 vs ext4 debate that so many of the individual lag-fixe threads turn into. Perhaps a thread dedicated to that should be started (and stickied)?
Click to expand...
Click to collapse
I'll keep the suggestion in mind
RAID lagfix?
Speed is one concern, potential damage to the flash card is another. I would prefer to replace my external card than the internal one.
Btw, is it technically impossible to implement more advanced solutions such as using a combination of NAND (for heavy apps / data) and sd (for other apps / "bulk" storage)?
Moreover, I think that it would be possible to have some kind a RAID 1 arrangement that would increase read speed and reliability (esp. if combined with EXT2). Just think 2GB on internal and 2GB on external card. (Most importantly having - probably - the first mobile phone with a raid configuration. RAID is easy to implement under Linux so I don't see why this is not examined.
Evans_Prophet said:
Speed is one concern, potential damage to the flash card is another. I would prefer to replace my external card than the internal one.
Btw, is it technically impossible to implement more advanced solutions such as using a combination of NAND (for heavy apps / data) and sd (for other apps / "bulk" storage)?
Moreover, I think that it would be possible to have some kind a RAID 1 arrangement that would increase read speed and reliability (esp. if combined with EXT2). Just think 2GB on internal and 2GB on external card. (Most importantly having - probably - the first mobile phone with a raid configuration. RAID is easy to implement under Linux so I don't see why this is not examined.
Click to expand...
Click to collapse
i think I might have even suggested something like this before, but it was either overlooked or its too hard to do. But the idea (i did not think about RAID) is awesome.
I agree Voodoo lagfix is great but there is one problem/phenomena: CON: Big battery drains and we don't know where it's coming from :S
Wouldn't RAID put a big strain on the CPU?
I've tried MoDaCo, Mimocan and RyanZA lagfixes.. for a very brief review, I've to say that MoDaCo seems the fastest to me.. Followed by RyanZa 1-click lagfix and lastly the Mimocan lagfix. A pity that MoDaCo is limited to ~130mb of /dbdata space
Btw, just my personal opinion.. Some may disagree and feels that other lagfixes are faster.
lafaya said:
I agree Voodoo lagfix is great but there is one problem/phenomena: CON: Big battery drains and we don't know where it's coming from :S
Click to expand...
Click to collapse
That seems to be a YMMV kind of thing. I don't notice big battery drains with it, but there are those who say they do. Not sure if I am lucky, or others are unlucky.
Certainly couldn't hurt to do the whole wipe batterystats routine and see what's up after that.
Chainfire said:
It is by now well known the SGS has a lag issue (apps slow to launch, email slow to access, etc) that can be fixed by changing filesystems for parts of the device, to make it blazingly smooth.
There are several fixes available, some based on SD card, some used through PC, some based on kernel flashing, some based on on-device apps, etc.
Click to expand...
Click to collapse
Thanks for doing this. I had been pushing for the change for the last couple of weeks since RyanZA and Tayutama particularly bought out their fixes. We now have a great range with Voodoo being the best atm imo.

Partition SD

Anyone know good partition settings for the sd card? I've been troubled simply because clockwork doesn't really do it all well. I'm using linux, I love the disk management on linux Thanks for the info!
What do you mean 'good partition settings'? Sizes or more like types of partitions like Linux Swap, ext2,3,4...? With Android there's not much use for anything beyond basic Linux partitions (0x83) like ext2,3,4 and Linux Swap (0x82). Even at that, ext2 is all you really need - maybe ext3 for good measure. This whole deal with ext4 is crazy since our file systems are not even remotely close to being large enough to see a benefit from ext4, only a very tiny slight benefit, almost unnoticeable for the most part. The placebo effect works wonders IMO. Might as well use it though, since it doesn't take anymore time.
As far as swap, we don't need it on this phone really and even with a class 6 card it still slows you down. Use compcache. It should be faster assuming current ROMs retain the fix cyanogen put in back in the G1 days.
thanks
KCRic said:
What do you mean 'good partition settings'? Sizes or more like types of partitions like Linux Swap, ext2,3,4...? With Android there's not much use for anything beyond basic Linux partitions (0x83) like ext2,3,4 and Linux Swap (0x82). Even at that, ext2 is all you really need - maybe ext3 for good measure. This whole deal with ext4 is crazy since our file systems are not even remotely close to being large enough to see a benefit from ext4, only a very tiny slight benefit, almost unnoticeable for the most part. The placebo effect works wonders IMO. Might as well use it though, since it doesn't take anymore time.
As far as swap, we don't need it on this phone really and even with a class 6 card it still slows you down. Use compcache. It should be faster assuming current ROMs retain the fix cyanogen put in back in the G1 days.
Click to expand...
Click to collapse
Thanks. I ended up re flashing clockwork and the partition worked for some reason. On another note, I havent' been able to format my sd card directly from the android storage settings for some reason. This has happened on stock and any CM rom I use. Think I have a bad sd card?
llontop.m said:
Thanks. I ended up re flashing clockwork and the partition worked for some reason. On another note, I havent' been able to format my sd card directly from the android storage settings for some reason. This has happened on stock and any CM rom I use. Think I have a bad sd card?
Click to expand...
Click to collapse
Could be but I've never had that issue before, nor have I heard of it happening - that's not to say it doesn't. Try to search around on here and see what you come up with. Try the Nexus 1 or G1 forums since you're more likely to find an answer there.

[Q] New to Android

Ok i am new to Android i just traded my iPhone 3G for a HD2. I spent around 3 or 4 hours trying to get it running the way i like. After many errors i am on NexusHD2-Gingerbread_V2.9_NAND_(Android-2.3.5) and i am very happy. So now i need some help and yes i did look around before i am asking this. I read on a forum that i could install my apps onto my memory card and not into the phone is this true for the OS i am running now. And also i wanted to know if there is any apps i may need to make my phone run better even some cool apps i make need just to be happy/
hi razielleonhart, I believe you're referring the to the ext-sd function. To do that you'll have to repartition your SD card. You can do that in CMR (I believe you are booting form NAND?). Normally just choose a ext partition size and set the SWAP memory to 0 (I'm not sure what the SWAP is for, but I think it's to compensate your RAM if your RAM runs out of space, but that's unlikely on the HD2). When you boot back into Android you will notice that your "internal" memory has increased. Not all ROMs support this, and you'll have to check the thread on the particular ROM to see if the developer has cooked his ROM for that.
And you might want to check out some cool (but sometimes slightly hazardous apps) like SD booster (sets a new cache size on your SD card to make it run faster, just search the market) or SetCPU (allows you to overclock/underclock your phone's CPU, see link at http://forum.xda-developers.com/showthread.php?t=505419).

Categories

Resources