Swap or not to swap? - G1 Q&A, Help & Troubleshooting

I've been reading mixed things about swap space. Is it required and if so..why? What does it do?
I'm running Cannon202 and really like it but it's 2.1.2 and I'd like to go up to 2.2 but am very pleased with the rom. I got my SD card partitioned and used the defaults in recovery...Are those fine..I'm using the..crap..its 1.7 something.
Also, I've had troubles with the UI crashing in the 2.2 version6 build of the....the one with a C..the long name one..sorry for not remembering names but I'm on my phone.
Anyway..any suggestions?
Sent from my G1 from the only app on my main homescreen.

its same concept as pagefile on windows...giving more avaialble ram..at the cost of slower performance (time taken to write to sd card is slower)
and possibly less battery life

Say no to swap, kids!
It just isn't worth it, especially if you're using a ROM with the *shudder* CM kernel, which will slow your phone to a crawl. CompCache is a much better option.

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?

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] What factors determine benchmark speed differences in identical roms?

To try to make sense of my title, say we have 2 Hero cdma running the same rom. In linpack one scores 2.9 and one 4.9. Obviously hardware should be the same other than SD card. Can a fast SD card make that kind of a difference? What else can and is there a guide for optimizing our systems?
I get very confused as I switch between roms. Some roms won't run A2SD for me at all (while working great for other people) and some I have no problem with, so I'm kind of confused what I can get away with as I switch around.
Thanks,
Mike
I don't think SD card or a2sd should matter for linpack scores. What predominantly matters is CPU speed, JIT, VM heap size, how many widgets you have on your home screens, etc., and it might sound obvious but things that affect the overall "smoothness" of your phone.
Also, are you wiping ext before flashing a new ROM?
c00ller said:
I don't think SD card or a2sd should matter for linpack scores. What predominantly matters is CPU speed, JIT, VM heap size, how many widgets you have on your home screens, etc., and it might sound obvious but things that affect the overall "smoothness" of your phone.
Also, are you wiping ext before flashing a new ROM?
Click to expand...
Click to collapse
Yeah, I've been wiping everything. Haven't used JIT because I'm not sure what I need to use it properly. I've always been of the impression that it was dependent on A2SD which I can only ever get to work on Cyanogen roms. Also ignorant regarding VM settings and use.
Thanks for answering.

Compcache

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

recommendations wanted for a new android build

ive been running myns warm donut on my sd card and its been overall good there have been minor issues with some programs requiring a newer version of android but nothing major
anyway, its been running really slow lately and ive been thinking of reformatting and and starting fresh
1st i wonder is there any way to backup my texts,contacts,call logs etc.?
also since i will most likely be reinstalling anyway
is it worth it to move to a froyo or a eclair build overall? are there any features they dont have that myns warm donut had? and what about speed?
and finally if i should update to a eclair or froyo whats the best build?
thanks
i would recommend using froyo, you could use dzo, incubus or kyle's build and you could use atools to customise the speed. the dev's still developing on this but i think it is worth to try.
Sent from my Full Android on Vogue using XDA App
If you think things are slow, go to nand. It's awesome.
you can go to your contacts, press the menu button (power) and then click import/export and then choose export to sd card for the contacts. if you have a data plan, you can skip that and just sync with a google acount
the directions that i gave you comes from my experience with eclair and froyo.
i haven't used any other build.
i have used nand and the sd card method, and i prefer the nand method WAAAYYYY more. (faster, stable, and more stuff i can't think of)
you can use a third party app for the texts, call log, etc. i can't really recommend one because i haven't used one.
a quick google search will do
good luck

Categories

Resources