if compcache compresses ram to fit more things in it will also have to de compress things to use them. So there is more stored in the ram but it takes longer to reach them.
what i wanna know is how long it takes to compress and decompress to see if itt is worth it. Any ideas?
That was my way of thinking too. I played with comp, swap, comp+swap, and comp backing swap. My user.conf file is attached to my signature. Swap only is what worked best for me.
It more than anything depends on how the phone is used. If your using apps that take a lot of RAM but don't take too much CPU power (namely something that has huge images, or something like co-pilot which pushes ram to its limits, and background processes), then compcache is good. However, using CPU intensive stuff and applications, swap only is much better. Compcache is good for things that run in the back that don't have to be accessed all the time, such as the launcher.
feel free to correct me/wreck me
thanks for the replies guys the things i doo need swap more than anything so ill stick with swap
B-man nailed it, like I said I'm running swap w/o compcache because as I said it works best for me. CoPilot is laggy and causes background programs to FC on this config, but i rarely use it in favor of google maps which is why it doesn't bother me.
Related
I have the CyanogenMod and It comes with 5 screens but I cant use advantange of it because my phone gets so slow.. I use like 5 widgets and everytime I go to my home its frozen for like 10 seconds untill eveything is loaded again. I have apps2sd so im wondering is their a way to make the G1 lightning fast because its acting so slow it was like this in the stock rom also
What 5 widgets? Have you experimented with disabling them? What other apps do you have installed? Some wait in the background and use up memory / CPU. CM is pretty much the fastest ROM, so you need to look at the apps if things are slow.
You can also try the links in my sig for info on using compcache or swap to reduce the delays when you switch back home or in and out of the browser.
Well I have the free weather widget, retro time, retro date, and a battery widget and a few other application shortcuts on the home screen and it still lags when I go to home and its always like this and what does a swaper do?
blackfire1 said:
Well I have the free weather widget, retro time, retro date, and a battery widget and a few other application shortcuts on the home screen and it still lags when I go to home and its always like this and what does a swaper do?
Click to expand...
Click to collapse
I would activate your linux-swap partition or use the compcache userinit.sh. I wouldn't use swapper, its out-dated.
Basically what swapper (and linux-swap) is, is like creating extra memory for your phone to use, but places it on the sdcard. The increased memory allows for you phone to do more at once without having to constantly close programs left and right, speeding it up. But, the constant read/write of the sdcard wears it down quicker (don't worry, you'll still get about 2yrs of life out of that sdcard) and can become slow if it is writing/reading to the memory at the same time is it reading an app or file from the sdcard. Not noticeably slower, but slower nonetheless.
Compcache is a better solution IMO (its the new thing haha). What happens is that whatever RAM stores is compressed instead. Because its compressed, you can store more stuff on it. so like 24MB of RAM would be extended to 72MB of RAM and then you wouldn't have to read/write to the sdcard so often, saving its life and allowing for a small speed boost compared to a swap file.
There are threads on how to do both of these things in the development thread. The compcache is pretty easy, all you have to do is copy userinit.sh to your /system/sd/ and your pretty much done. Linux-swap requires you to create a 3rd partition in addition to the FAT32 and ext2/3. A little extra work, but well worth it. Most ROMs will automatically activate the linux-swap partition if you have it.
Note: Compcache can also use linux-swap as a backup, allowing for an even faster phone. I'm using jacHEROskiv1.4C_a2sd and it works pretty fast IMO. Certainly not as fast as Cyanogen's but fast enough for day-to-day use.
If you really really really really, don't want to mess with any of that, I would just use swapper. Its like linux-swap (follows the same principle), but its not as fast. If you do choose to use this solution, make sure you place the swapfile on /system/sd/ so that when you mount your SD you won't mess up your phone.
Can you please show me a link of how to do the Compcache because ive searched and only found nothing yet.
blackfire1 said:
Can you please show me a link of how to do the Compcache because ive searched and only found nothing yet.
Click to expand...
Click to collapse
Link: http://forum.xda-developers.com/showthread.php?t=537236
Also, the command to include linux-swap as a backup (if you choose to) is on page 14, last post on the page. Good luck
Does having 5 home screens use more memory than the original 3?
slightly, but not enough to make the kind of differences that the OP is describing. I know cyanogen and dude's builds both have 5 home screens, not sure about the rest, but this is the first slowdown complaint I've really heard.
The two questions I would ask to the OP is this: 1. how many applications do you have installed? 2. What size and class SD card are you using?
Hey everyone,
Just interested to see what everyone is using for their swap settings.
Compcache, Compcache w/ backing, or linux swap?
Swappiness?
Thanks!
It depends for me. I don't use the regular scripts people use, instead, I load it all from a file at boot. I pretty much use slightly-modified solid stock builds with a few unnecessary things removed (updater apps or htc log apps for example) and a few performance options tossed in (kernel changed, cpu pegged at 528 mHz, and compcache).
If I'm running a rom made for the Dream, for example, an AOSP rom, or an ADP or T-Mobile G1 rom, I use 24 MB compcache with 60 swappiness.
If I'm running a Hero rom or any other demanding port that was not made for the Dream, I usually make up for the lack of memory by compressing it all, so I use 96+ MB compcache, and I have it swap pages like crazy to keep compache from storing stale pages, so I set swappiness to 100. It has a slight hit in performance, but it's very, very reliable and, for example on Hero ports, I get no loading screens even with all 7 screens full of widgets and shortcuts coming back from Browser on pages with flash while listening to music.
I don't use linux-swap at all. I like being able to remove my sdcard and using it as it was intended, I don't use a2sd for the same reason.
Thanks for the response. I am using several differnt build, all AOSP thoigh. Ive been experimenting for a while now, Ill give the 24mb compcache 60 swappiness a shot
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.
Hi, I was wondering if I can use the 10 mb ram hack with my g1 with CM 6.0 RC2. I noticed most of the tutoriials are using 4.xx.xx so I wanted to ask before I do it. My phone is kind of slow even though it is overclocked at 576mhz and 64 mb class 6 memory swap. Thanks.
Ties0 said:
Hi, I was wondering if I can use the 10 mb ram hack with my g1 with CM 6.0 RC2. I noticed most of the tutoriials are using 4.xx.xx so I wanted to ask before I do it. My phone is kind of slow even though it is overclocked at 576mhz and 64 mb class 6 memory swap. Thanks.
Click to expand...
Click to collapse
There is no 10 mb hack and won't be. It is not possible with Froyo.
As indicated above there is no 10mb hack and there never will be.
I am currently using the latest nightly and it is super fast and stable. As fast as donut (no ****).
3D Gallery works perfectly and there have been a bunch of small cool features added to the nightly.
I highly recommend it.
Awesome work has been done by Cyanogen and Crew.
ok thanks for the reply guys. Is there any other way to make my rom faster? Thanks.
Ties0 said:
ok thanks for the reply guys. Is there any other way to make my rom faster? Thanks.
Click to expand...
Click to collapse
Of course reduce or remove swap,
android has it's own swap mechanism that causes little ram to actually be least recently used, thus if swap is enabled the phone will be constantly swapping it in/out!
In addition to reducing the life of the SD card its slow. I understand a very little bit of swap *may* allow some edge cases where a *little* more ram is needed or to offload something like launcher that may be configured to stay in ram to work faster.. however you can't forget the speed issue.
Try this enter console on your phone and run:
dd if=/dev/zero of=/sdcard/swapspeedtest bs=1048576 of=64
Note the time it takes, that is the time to write 64mb on a swap out operation.. if it seems too long to wait for a task its too much swap. 12mb is almost acceptable. I just stick to comp cache only. . Upped it from the default 12 to 15 MB since I had one or two tasks that just needed a tad more memory to play nice.
Also what is slow, returning to home? A particular app? I doubt its everything, usually its launcher and there are ways of locking it in home, upgrades to awd, and alternative launchers. These may help.
ezterry said:
Of course reduce or remove swap,
android has it's own swap mechanism that causes little ram to actually be least used, thus if swap is enabled the phone will be constantly swapping it in/out
In addition to reducing the life of the SD card its slow. I understand a very little bit of swap to allow some edge cases where a little more ram is needed or to offload something like launcher that may be configured to stay in ram.. however you can't forget the speed issue.
Try this enter console on your phone and run:
dd if=/dev/zero of=/sdcard/swapspeedtest bs=1048576 of=64
Note the time it takes, that is the time to write 64mb on a swap out operation.. if it seems too long to wait for a task its too much swap. 12mb is almost acceptable. I just stick to comp cache only. . Upped it from the default 12 to 15 MB since I had one or two tasks that just needed a tad more memory yo play nice.
Also what is slow, returning to home? A particular app? I doubt its everything, usually its launcher and there are ways of locking it in home, upgrades to awd, and alternative launchers. These may help.
Click to expand...
Click to collapse
Thanks for the detailed response! I will try lowering the swap partition, I always thought it would be fast because of the class 6 speeds. Does putting all my apps on SD make it slow as well? Also, returning to home is the main lag I'm talking about as it takes quite a while to see my apps. Thank you!
ezterry said:
Of course reduce or remove swap,
android has it's own swap mechanism that causes little ram to actually be least used, thus if swap is enabled the phone will be constantly swapping it in/out
In addition to reducing the life of the SD card its slow. I understand a very little bit of swap to allow some edge cases where a little more ram is needed or to offload something like launcher that may be configured to stay in ram.. however you can't forget the speed issue.
Try this enter console on your phone and run:
dd if=/dev/zero of=/sdcard/swapspeedtest bs=1048576 of=64
Note the time it takes, that is the time to write 64mb on a swap out operation.. if it seems too long to wait for a task its too much swap. 12mb is almost acceptable. I just stick to comp cache only. . Upped it from the default 12 to 15 MB since I had one or two tasks that just needed a tad more memory yo play nice.
Also what is slow, returning to home? A particular app? I doubt its everything, usually its launcher and there are ways of locking it in home, upgrades to awd, and alternative launchers. These may help.
Click to expand...
Click to collapse
I have about 3-5 apps that I would like to be running at one time? Should I be using CompCache or Swap? Currently I am on SuperD 1.9.3 WGK. I have been reluctant to run Froyo roms because they are so much more memory hungry in my experiences. My current rom runs pretty fast with a 96mb swap. If I were to fun a Froyo rom, what can I do to be able to run the 3-5 apps and retain speed?
Ties0 said:
Thanks for the detailed response! I will try lowering the swap partition, I always thought it would be fast because of the class 6 speeds. Does putting all my apps on SD make it slow as well? Also, returning to home is the main lag I'm talking about as it takes quite a while to see my apps. Thank you!
Click to expand...
Click to collapse
If you are using BOTH SWAP & have applications installed to the sdcard, then it will ****REALLY**** be slow.
With just applications on the sdcard, your speed should be fine.
Ties0 said:
Also, returning to home is the main lag I'm talking about as it takes quite a while to see my apps. Thank you!
Click to expand...
Click to collapse
This is a symptom of launcher being evicted from ram, try the stay in ram option in settings->adw launcher->system settings->system persistent in the more recent versions of adequate (I think included with rc2 if my memory serves me)
It may not be perfect as it will still get killed if a very large application is loaded.
Either you need a launcher that behaves as a good android application, and can quickly reload it's last state, even if it was not in ram when you requested it.. or launcher needs to be considered outside the usual android memory management and to be kept in ram.
These persistent processes are where you may depending on your usage of the phone find comp cache or swap in low amounts (32mb combined is probably the absolute max) may help as they will have allocated ram that is rarely used and not automatically freed as they are persistent..
ezterry said:
This is a symptom of launcher being evicted from ram, try the stay in ram option in settings->adw launcher->system settings->system persistent in the more recent versions of adequate (I think included with rc2 if my memory serves me)
It may not be perfect as it will still get killed if a very large application is loaded.
Either you need a launcher that behaves as a good android application, and can quickly reload it's last state, even if it was not in ram when you requested it.. or launcher needs to be considered outside the usual android memory management and to be kept in ram.
These persistent processes are where you may depending on your usage of the phone find comp cache or swap in low amounts (32mb combined is probably the absolute max) may help as they will have allocated ram that is rarely used and not automatically freed as they are persistent..
Click to expand...
Click to collapse
Thanks for the detailed response! I just changed the adw launcher and deleted my swap partition... It seems to be much slower when pressing home (icons are taking a while to load) so I might just use 32 mb for swap.
EDIT: question, what exactly does ext4 do? I know swap is like external ram, but what does ext4/ext3/etc exactly do? and how much should I put in? I tried googling but could not find the answer. Thanks!
Ties0 said:
EDIT: question, what exactly does ext4 do? I know swap is like external ram, but what does ext4/ext3/etc exactly do? and how much should I put in? I tried googling but could not find the answer. Thanks!
Click to expand...
Click to collapse
On CM6, nothing. On CM 4 & 5, it was used for Apps2Ext (formerly known as Apps2SD - before Google came out with their own flavor). However, CM6 does not have Apps2Ext. It has been indicated that it will be targeted for 6.1.
Hi all,
For my dream Yoshi is asking during install:
Code:
install 41% CC hack, or install 60mb swap.
I selected the 41% option,
Now I am wondering if that was the right one.
Heeter
Heeter said:
Hi all,
For my dream Yoshi is asking during install:
Code:
install 41% CC hack, or install 60mb swap.
I selected the 41% option,
Now I am wondering if that was the right one.
Heeter
Click to expand...
Click to collapse
probably not
that is a huge chunk of memory to be wasting
compcache takes a proportion of physical memory, compresses it and uses it as a swap device. The benefit of this is that it is faster than normal swap.. your device thinks its got more memory than it has so apps will stay alive longer
but the price you pay is the memory is slower apps don't get killed and clutter up memory and eventually you slow to a crawl because every pointless little app is sitting in swap
the 41% value means 41% of your ram is being compressed and used as the swap space
which is very high.
you should be able to just change the compcache in the cyanogen settings
but don't take my word for cc being a bad idea
I just have the point of view that I would prefer my phone have a few key processes running well than having lots processes running badly
but what is worse is you can tell the rom is just a ripoff because it is very easy to add the higher options prior to compiling , it is just a case of adding a few strings to some xml files, no need for hacks.
Very nice thanks
Effdee said:
probably not
that is a huge chunk of memory to be wasting
compcache takes a proportion of physical memory, compresses it and uses it as a swap device. The benefit of this is that it is faster than normal swap.. your device thinks its got more memory than it has so apps will stay alive longer
but the price you pay is the memory is slower apps don't get killed and clutter up memory and eventually you slow to a crawl because every pointless little app is sitting in swap
the 41% value means 41% of your ram is being compressed and used as the swap space
which is very high.
you should be able to just change the compcache in the cyanogen settings
but don't take my word for cc being a bad idea
I just have the point of view that I would prefer my phone have a few key processes running well than having lots processes running badly
but what is worse is you can tell the rom is just a ripoff because it is very easy to add the higher options prior to compiling , it is just a case of adding a few strings to some xml files, no need for hacks.
Click to expand...
Click to collapse
thanx for clearin on cc!
goin back from mt4gslide ==>mt3g dam ))