CompCache\Linux Swap for CFS\BFS - G1 Q&A, Help & Troubleshooting

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

Related

Is their a way to make the G1 fast?

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?

Compcache or linux-swap partition

Ok so i am running Cyan's 3.6.8.1 currently. I was running the newest 7 up untill this morning. And i woke up and booted my phone and had extreme lag. Restarted, had some bad lag still. I checked my swap and it said 0 across the board. I cant remember checking it with a fresh install. So my question is:
Does swap partition work with the most recent cyanogens? Also i keep seeing stuff pop up about compcache, ive read the tutorial but it looks like there isnt a recent userinit.sh for the newest cyan rom. How much faster is compcache if any over the swap partition?
I may be wrong but ithink the difference is one is dumped on sdcard (swap) and the other internally (compcache). Thaty means a slower sd card would result in slower read/write times. Also giving more wear on the sd. The userinit posted should be fine with cyanogens newest, however swappiness seems to be set a little high (60) that is a endless debate for the perfect setting. Mine is set to 10 though.
I have been reading some conflicting posts over which is better (linux swap vs compcache). Having used compcache for a week now, I am not happy with it--my swappiness was originally set at 60 and is now at 20. Some are saying that the linux swap allows their phones to operate very quickly and smoothly, which is unfortunately not the case with my phone. Add the confusion that there is a solution involving compcache with a backing swap file, and things look really complicated.
Also, I actually saw a poster claiming that NO SWAP worked better than having a swap at all. If anyone has some real data, please tell us: 1) whether swap increases phone performance (and how), and 2) which swap (linux, compcache, or compcache with backing swap) is better.
Thanks!
derfolo said:
I have been reading some conflicting posts over which is better (linux swap vs compcache). Having used compcache for a week now, I am not happy with it--my swappiness was originally set at 60 and is now at 20. Some are saying that the linux swap allows their phones to operate very quickly and smoothly, which is unfortunately not the case with my phone. Add the confusion that there is a solution involving compcache with a backing swap file, and things look really complicated.
Also, I actually saw a poster claiming that NO SWAP worked better than having a swap at all. If anyone has some real data, please tell us: 1) whether swap increases phone performance (and how), and 2) which swap (linux, compcache, or compcache with backing swap) is better.
Thanks!
Click to expand...
Click to collapse
Compcache with backing swap uses both compcache and the linux swap partition (or a regular swap file). Because this uses both methods, this would be fastest. Its actually made the JACHero ROMs ridiculously usable (compared to before anyways...). The swappiness doesn't matter, it just determines how often android will use compcache or linux-swap. It differs from build to build, each build will have an optimal setting.
Linux-swap is faster than regular swap file.
I don't have any data, but testimonial(ly?) when I use JACHero with vs without compcache and linux-swap is like night and day. Without it, the phone is unusable, with it, the phone is very much improved.
Kind of off topic, but how do i change the size of the compcache file?
cronin4392 said:
Kind of off topic, but how do i change the size of the compcache file?
Click to expand...
Click to collapse
Edit the userinit.sh file you're using. Check the proper threads for compcache in development forums.
As far as Compcache vs swap, I've gone back to no swaps, it seems snappier by itself without these methods. It could be a personal preference though depending on what apps/services you use the most.

is compcache worth it

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.

Making g1 run faster? (10 mb hack)

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.

[Q] whgat are the best settings for cyanogen7 on a htc hero CDMA??

any one got the best way to setup a hero with cyanogen7?
looking to get the best of every thing from this rom!!
weirdfate said:
any one got the best way to setup a hero with cyanogen7?
looking to get the best of every thing from this rom!!
Click to expand...
Click to collapse
Unfortunately there is no definitive standard answer because everyone's phone's run a little differently. What works for me, may not work for you and vice versa....but here's some info to get you going. These options are under Cyanogenmod Settings.....
Overclocking...best max cpu settings will probably be somewhere between 691 & 748
Underclocking...can go as low as 19 mhz, but that may cause sluggishness when you wake your phone up, and also may give you problems with screen off music player, camera, & navigation problems. I usually have my min set around 264 (going from memory here..the Hero is home & I'm at work).
Governor....On Demand or Interactive seem to be the post popular governors....I use On Demand.
Compcache....mine's set at 18% per someone elses reccomendations after having some nav problems.
Enable JIT....Seems to be personal preference, try it both ways.
Surface Dithering....off
Allow purging of assets....Personal preference, try it both ways.
hockeyfamily737 said:
Unfortunately there is no definitive standard answer because everyone's phone's run a little differently. What works for me, may not work for you and vice versa....but here's some info to get you going. These options are under Cyanogenmod Settings.....
Overclocking...best max cpu settings will probably be somewhere between 691 & 748
Underclocking...can go as low as 19 mhz, but that may cause sluggishness when you wake your phone up, and also may give you problems with screen off music player, camera, & navigation problems. I usually have my min set around 264 (going from memory here..the Hero is home & I'm at work).
Governor....On Demand or Interactive seem to be the post popular governors....I use On Demand.
Compcache....mine's set at 18% per someone elses reccomendations after having some nav problems.
Enable JIT....Seems to be personal preference, try it both ways.
Surface Dithering....off
Allow purging of assets....Personal preference, try it both ways.
Click to expand...
Click to collapse
Id disable compcache. Read up on it. And keep jit off. Just makes system unstable with no performance gain.
Sent from Enrique Iglesias.
youdug said:
Id disable compcache. Read up on it. And keep jit off. Just makes system unstable with no performance gain.
Sent from Enrique Iglesias.
Click to expand...
Click to collapse
ya and the scren on/off animations dont like to work for me with jit.
do you know how to convert the file system and the other 2 to sae ext4?
weirdfate said:
ya and the scren on/off animations dont like to work for me with jit.
do you know how to convert the file system and the other 2 to sae ext4?
Click to expand...
Click to collapse
Why would you want to use ext 4???
Locked & Loaded
I say enable jit and enable surface dithering. Also enable compcache to 24. Try it for a day or two and see how it works.
Locked & Loaded
laie1472 said:
I say enable jit and enable surface dithering. Also enable compcache to 24. Try it for a day or two and see how it works.
Locked & Loaded
Click to expand...
Click to collapse
What is compcache?
Compcache (compressed caching) is , in short , virtual swap , setting aside a certain percentage (usually 25% ) of your RAM as 'compressed' swap. Compcache compresses the data that would normally go to swap, then moves it back into RAM, and reverses the process when moving it out of the 'compressed' swap. However, this is a classic space-time tradeoff . You effectively get more RAM from the compression , but it is slower than 'normal' RAM due to the CPU time required to compress and decompress the swapped pages.
wiki.cyanogenmod.com/wiki/Swap_and_Compcache
Surface dithering improves the quality of images but takes away from performance.
Try jit if u want. Some people say games run better but other than that theres no difference. All i had was instability when i just tried it again.
Sent from Enrique Iglesias.
youdug said:
What is compcache?
Compcache (compressed caching) is , in short , virtual swap , setting aside a certain percentage (usually 25% ) of your RAM as 'compressed' swap. Compcache compresses the data that would normally go to swap, then moves it back into RAM, and reverses the process when moving it out of the 'compressed' swap. However, this is a classic space-time tradeoff . You effectively get more RAM from the compression , but it is slower than 'normal' RAM due to the CPU time required to compress and decompress the swapped pages.
wiki.cyanogenmod.com/wiki/Swap_and_Compcache
Surface dithering improves the quality of images but takes away from performance.
Try jit if u want. Some people say games run better but other than that theres no difference. All i had was instability when i just tried it again.
Sent from Enrique Iglesias.
Click to expand...
Click to collapse
Ummm very aware of what compcache is and what it does. That's why I suggested he enable it. And jit has given me not one issue. Only improved my hero when I had it.
Locked & Loaded
laie1472 said:
Ummm very aware of what compcache is and what it does. That's why I suggested he enable it. And jit has given me not one issue. Only improved my hero when I had it.
Locked & Loaded
Click to expand...
Click to collapse
Guess its all in what u do wit ur phone. Wasnt saying u dont know what it is but disabling it would give u the best performance. But if u need the extra bit of ram it creates then go for it. Did you actually see a gain with jit tho? Ive used it bunch of times for days at a time and seen no gain. Just random reboots n lag that i never had a problem with before or after i enabled it.
Sent from Enrique Iglesias.
youdug said:
Guess its all in what u do wit ur phone. Wasnt saying u dont know what it is but disabling it would give u the best performance. But if u need the extra bit of ram it creates then go for it. Did you actually see a gain with jit tho? Ive used it bunch of times for days at a time and seen no gain. Just random reboots n lag that i never had a problem with before or after i enabled it.
Sent from Enrique Iglesias.
Click to expand...
Click to collapse
I could be wrong but I think jit has a lot to do with how much mem you have free. " I think " I was running data2ext ext2 on a 16gb class 4 sd and a 2048 ext2 partition with the boost added and jm's 806 kernel oc to 768 max and 691 min. When ever I turned jit off I would notice a big difference in app loading, scrolling in apps,web page loading, animation and transitions. Boot time was a lot slower as well. But with jit on I automatically notice a speed gain in all of the above. Its true though no to phones are alike so its a hit or mis with it. I was one of the lucky ones were it actually benefited me. Also with comcache any amount of ram gain on the hero "Imo" was a plus.
Locked & Loaded
laie1472 said:
Why would you want to use ext 4???
Locked & Loaded
Click to expand...
Click to collapse
not sure but i got faster startup and a bit better performance out of my samsung transform with a coverted system to ext4
Are you planning on using a certain mod that requires ext 4??
Locked & Loaded
laie1472 said:
Are you planning on using a certain mod that requires ext 4??
Locked & Loaded
Click to expand...
Click to collapse
no not at this time
just thought id ask cause i always swapped the systems to either ext3 or 4 and it got me better startup and such (from what i saw) on my transform
Well from my knowledge on data2 ext. Ext2 was faster but ext 4 was safer. In terms of data loss and battery pulls. But I've always used ext2 and have pulled my heroes battery several times and never lost any data.
Locked & Loaded

Categories

Resources