The Effects of CompCaching? - G1 Q&A, Help & Troubleshooting

I was just wondering, since using a Linux Swap over time wears down your SD card, doesn't using a CompCache wear down your internal memory.. which is just as bad if not worse?

SolemnWishing said:
I was just wondering, since using a Linux Swap over time wears down your SD card, doesn't using a CompCache wear down your internal memory.. which is just as bad if not worse?
Click to expand...
Click to collapse
Compcache doesn't use internal memory but the phone's RAM, two different things, don't get them confused. Like the RAM in your computer, it doesn't have a limit two how many times it can be written to or read from. So its "healthier" for your phone. But its results are mixed, some see a huge improvement, some see none, some see their phones slow down. Its worth a try as its only one userinit.sh from being used. Not a huge ordeal, if it doesn't work, delete the script and just reboot your phone and you're back to just linux-swap.

Related

Use internal memory to have more RAM space

Hello everybody
First, plz excuse my very bad english..
I would like to know if its possible, and if yes, how, to use internal memory to make the same thing than a swap linux partition, but on the phone memory, not on SD
I would like to know if there is a tutorial or anythings that speak about this..
It could be very interesting to save SD card life and i don't care about to loose memory for my apps
Thx for Help
Fabulous, speaking for a few members of Smartphone France community
I thought about this myself (putting swap partition on internal storage), since it should be faster.
After thinking for a while though I realised that wearing out an SD card is one thing, destroying the internal flash is far worse.
even with a swap partition on your phone the sdcard will still last around 2 and a half years. i thought people had quit this about sdcard life. My sdcard will probably be around then my phone.
besides when the sdcard doesn't just die on day. the "dead parts" parts of the sdcard will just no longer be used. meaning there will be less overall storage space on the card but it will still function
I don't think that's a particularly good idea. The sd card might stay longer with you than your phone, but if your phone's internal memory breaks you can't just shrug and buy a new one.
That said, if you're set on doing this, you could probably put a swap file in /cache. Without OTA updates that doesn't get used for much anyway.
Afirejar said:
I don't think that's a particularly good idea. The sd card might stay longer with you than your phone, but if your phone's internal memory breaks you can't just shrug and buy a new one.
That said, if you're set on doing this, you could probably put a swap file in /cache. Without OTA updates that doesn't get used for much anyway.
Click to expand...
Click to collapse
i wasn't suggesting what the OP said, i have a linux-swap partition, i was simply that the card will most likely last longer than the phone but why ruin internal phone memory, that would make it unusable. I agree that you should put the swap file on the sdcard
is it possible ? yes
but like everyones sayd just don't do it , you might break your phone very fast and you won't gain any significant speed either
a class 6 card is about the same speed as internal storage and theyre relatively cheap now
Even if you could it probably wouldn't be worth it and there is already a very limited amount of memory in the phone. It would be safer for the phone and you would be able to have a larger swap file by using the sdcard.
If you are dead set on it, about 5 minutes of googling didn't turn up any howto's on making the swap on the system memory but here are a couple howto's one is the linux swap file and the other is adding the swap to the sdcard. The instructions shouldn't be hard to adapt for the main system flash memory
http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/
http://androidcommunity.com/forums/f8/adding-swap-space-ram-to-g1-16325/
i still don't understand why people insist on using sdcard for swap space. It'd make sense if the sdcard were used exclusively for swap, but with all the r/w operations going on (app read, media read/write, and swap read/write), not even a class 6 card provides enough bandwidth for doing swap operations effectively... I'm with cyan on this one, and a good compcache setup is the best choice atm.
jubeh said:
i still don't understand why people insist on using sdcard for swap space. It'd make sense if the sdcard were used exclusively for swap, but with all the r/w operations going on (app read, media read/write, and swap read/write), not even a class 6 card provides enough bandwidth for doing swap operations effectively... I'm with cyan on this one, and a good compcache setup is the best choice atm.
Click to expand...
Click to collapse
I have around 15-20 mb free internal memory when using cyanogen rom but around 1 to 2 mb free when using hero rom
sd swap use around 50 mb on hero rom with swapiness at 70%
you absolutly need to swap in hero rom
samygent said:
I have around 15-20 mb free internal memory when using cyanogen rom but around 1 to 2 mb free when using hero rom
sd swap use around 50 mb on hero rom with swapiness at 70%
you absolutly need to swap in hero rom
Click to expand...
Click to collapse
If Apps2SD is running correctly you should have 89mb free on Cyanogen and about 50-70mb on Hero :-S
AdrianK said:
If Apps2SD is running correctly you should have 89mb free on Cyanogen and about 50-70mb on Hero :-S
Click to expand...
Click to collapse
apps2d doesn't have anything to do with swap partition or does it ?
# free
free
total used free shared buffers
Mem: 97860 95896 1964 0 360
Swap: 104412 57060 47352
Total: 202272 152956 49316
#
swapiness at 70 and everything run's very smoothly
edit : yah i love tabulation
increase ram
Fabulous691 said:
Hello everybody
First, plz excuse my very bad english..
I would like to know if its possible, and if yes, how, to use internal memory to make the same thing than a swap linux partition, but on the phone memory, not on SD
I would like to know if there is a tutorial or anythings that speak about this..
It could be very interesting to save SD card life and i don't care about to loose memory for my apps
Thx for Help
Fabulous, speaking for a few members of Smartphone France community
Click to expand...
Click to collapse
please tell me how to convert internal memory into ram. I will be very thankfull to you

basic enthusiast questions

i got a few questions...
1) i have on average 36m of available memory, is this normal? i got task manager app and seem to be at my optimization limit..
2) im on stock 1.5 now, what is the fastest and most efficient firmware out now that reduces the bloat and optimizes the phone, and how do i put it on the phone
3) what else can you do with the usb cable, is there a 3rd party android client for pc or something like that? anything interesting like that
thanks
1) I assume you mean 36 MB of RAM available? Not internal memory? If so, yes that is actually very good, I average less than 25 and tend to stay under 20 MB
2) There are ROMs on the G1 going all the way up to 2.2, I for one have chosen to stick to 1.6 because, I know many people will disagree with me on this, but I simply just believe the G1's hardware wasn't really meant to go anywhere above 1.6. 2.2 and anything above 1.6 in my opinion is a bit too slow and cumbersome for me. I believe you should make the move to 1.6, maybe SuperD which is what I have been using for half a year now. 1.6 more closely integrates the search function and search tools, when you upgrade to 1.6 you will quickly see what I mean by that and it tends to cause a bit of lag and takes a large chunk of memory, though it is more convenient.
3) Well... you can use it for ADB (Android Debug Bridge). You can use it with Android ScreenCast, which is a program that allows you to use your G1 from your computer as long as it is connected to your phone, you can see whats on the screen, click, etc.
------------------
In continuation of 2:
I don't know if you have rooted your phone or not, but you will definitely need to do that first. Find instruction for that, there are only like a couple dozen threads telling how on XDA.
Find your ROM, again I recommend a 1.6 ROM, but feel free to give 2.2 a try and see if you like it. Install it, do be careful and read the instructions very carefully, especially when it comes to flashing a new radio image, you can brick your phone rendering it unusable.
So just look those things up, follow instructions carefully, reread everything in the instructions before doing anything and of course, in the case you do mess up, I can't be held responsible, I just provided you with a start. Best of luck!
there was an update to 1.6 so im on 1.6 now
since the g1 appears to have a limited amount of ram, is apps2sd worth it, say if i get a class 6 sd card of newegg, how difficult is it to install apps to the sd, and what is the performance
will the sd card deteriorate over time and lose performance?
i just want to put together the most efficient longest lasting setup
btw my i was checking my ram i guess through the task manager app, my free internal memory is like 50+mb..i dont see the point of an sd card if its not even being used, so running apps off the sd is what interests me, i dont have much other reasons to root
RAM really doesn't have that much to do with Apps2SD. I believe you should go ahead with the Apps2SD, but it really depends on how many applications you have. If you have anymore than 30 or so applications, you should go with Apps2SD. I for one am not certain about the effects of low internal memory, except that it gives you an alert every once in a while. My phone has "grown up" with Apps2SD from the start, so I don't have much experience on how a phone runs without it. The thing with Apps2SD is that it might be a hair slower than storing in internal memory, but that is a given. I use a Class 4 SD card and it still runs really nicely, a Class 6 SD card should definitely be good.
The lifetime of an SD card is pretty dicey, it really depends. SD cards have a certain amount of read and write cycles they can do before they finally kill over. Using Apps2SD will be a bit more harder on the SD card, especially if you use a Swap partition too. I use both, and my SD card is still working even a year and a half later.
One benefit, though I don't know how much this means to you, more internal storage data gives you more storage for system applications, such as for Contacts, text messages, etc.
A word of warning though, as using these features like Swap and Apps2SD does put more work on the SD card, the chance of error and corruption on the card itself increases a bit too. So far, I have had two instances in the year and a half where my SD card simply just blanked out. The first time around I lost everything that was on it, music, pictures and all my applications and application data and my phone could no longer boot (this was an issue with older ROMs back in the day of Android 1.0 and when everyone though Cupcake was a myth, when running Apps2SD, the phones would need the SD card to boot, it is no longer a problem). Just a suggestion, backup what is on your SD card every once in a while. I don't mean to scare you with that, it is extremely rare for that to happen, I believe I was just unlucky.
With Apps2SD, I actually feel a lot more free on my phone. I can install tons of applications and not have to worry about running out of memory, I have over 100 applications installed, which the internal memory (because of the applications I have) can't even hold.
So to wrap it up, I apologize for the long winded explanations, I say go Apps2SD, it really is worth it. Most of the ROMs today support automatic Apps2SD, whenever you install an application it just automatically goes onto your Ext3 partition. (Yes, you will need to repartition your SD card to have an Ext3 partition as well as a Swap partition if you want, this can be done really easily with Amon's Recovery Image.) In some ROMs, you can just go to the settings/ Spare Parts section and check Apps2SD.
so basically app2sd has only to do with the internal memory...it will not help free the ram even with a swap drive, is this what your saying correct
it will help only with installed applications
Yes that is correct, Apps2SD is designed to keep internal storage memory free and open for other things like text messages, call logs, internet data (cache, cookies, etc) and cache data for other applications like Google Maps and the Android Market.
where are the text messages stored by default, in the internal memory or the sim card, cause my old phone could hold only 25 messages in the sim card, how does this work on here
Messages are stored in internal memory and no where else, they can be moved to the SIM card with other applications, though space is extremely limited there.
hitman3x said:
1) i have on average 36m of available memory, is this normal? i got task manager app and seem to be at my optimization limit..
Click to expand...
Click to collapse
This is a linux based system.. "free" memory is pretty much meaningless. Stop worrying about it. Task manager apps are a waste of time and actually cause a lot of problems in android.
hitman3x said:
2) im on stock 1.5 now, what is the fastest and most efficient firmware out now that reduces the bloat and optimizes the phone, and how do i put it on the phone
Click to expand...
Click to collapse
Why don't you root your phone and find that out for yourself? Everyone has their own favourite build so you won't get many meaningful answers here.
hitman3x said:
3) what else can you do with the usb cable
Click to expand...
Click to collapse
Err.. I don't know.. lace your shoes with it? That's an odd question.
hitman3x said:
3) what else can you do with the usb cable, is there a 3rd party android client for pc or something like that? anything interesting like that
thanks
Click to expand...
Click to collapse
Well once rooted, with most roms you can tether your pc to your phone for internet access (using the phone as a modem so to speak). useful if you are in dire need of internet access using a pc/laptop with no current available wired connection.
alright i figured most of this out i tried thedudes lite and dwang 1.17.1 build
the only problem i have is any build on donut (1.6) makes my camera not work the camera closes unexpectedly all the time (full wipe)
on cupcake its completely fine

[HOW TO][SCRIPT] Swap

I've made a simple script that activates swap on boot
What is swap?
Swap puts the 'less important RAM' on the sdcard, making the device faster. It is best when used with v6 Supercharger. (See my other thread)
Requirements:
An SD card to BE IN THE DEVICE AT BOOT, POSSIBLY EVERY BOOT, with at least 150mb of space free on it
A 8/16gb Archos G9 (NOT THE 250GB MODEL)
Root
Script Manager from the market
Busybox (See my other thread)
What to do:
1. Download this: (long press > save link)
http://db.tt/LP7tliLZ
2. Using Script Manager, locate the downloaded file and rename (long press > rename) to 90swapon.sh
3. Copy (long press > copy) it to /data and then tap it to bring up a pop up window
4. Tap the little "pirate flag" (superuser logo) and the "gear" (run on boot)
5. Tap run and wait for it to say swap is on
6. Reboot
7. Hit thanks, you are done
Note: to check if it works, type "free" into a terminal, and it will give you values for swap. It takes a bit to kick in, so it won't be on straight away on boot
Sent from my ARCHOS 80G9 using xda premium
thank you for this and all the stuff you did/contribute for our G9
jipee296 said:
thank you for this and all the stuff you did/contribute for our G9
Click to expand...
Click to collapse
I actually do most of this stuff for myself and then upload it for the community, but thanks
Sent from my ARCHOS 80G9 using xda premium
Quinny,after using this script for two days, i always get a random reboot or the devices freezes... any help?
jipee296 said:
Quinny,after using this script for two days, i always get a random reboot or the devices freezes... any help?
Click to expand...
Click to collapse
Don't have that issue. It's not to do with swap
Sent from my ARCHOS 80G9 using Tapatalk HD
gorymp mine
Hi, thanks for that job, I'm going to try it!
But I have one question:
Why, if the G9 recongnizes de main memory as SD, is not posible to do that with the main memory instead of an external card??
I prefer to lose even 1Gb on my memory for increasing my perfomance...
Denkel said:
Why, if the G9 recongnizes de main memory as SD, is not posible to do that with the main memory instead of an external card??
Click to expand...
Click to collapse
First of all, because the swap is continuously rewritten as the system tries to distribute itself between physical RAM and swap in the optimal way. Any type of flash memory allows only a limited number of read-write cycles - and not really big. So, if you put swap onto it, you will kill it in a relatively short time . If it is a card, you just replace it; if it is the main ROM, you ruin the entire device.
Аnd once the swap volume is corrupt, results are unpredictable - that is what might happen to jipee296. jipee296, did you use an old card that had been rewritten many times before? Try a brand new one just to see if the problem goes away.
HDDs do not have this limitation, so if it were the HDD model, there would be the perfect place for swap. But this is not the case.
Quinny899, will the system start at all if swap is activated but the card is missing or corrupt? Actually there are two more inctructions missing for a complete solution: how to replace the SD card (will the swap be re-built automatically on a new card?) and how to remove swap completely. Any new step should be repeatable and reversible.
BTW, does someone know the exact brand of SD card reader used in G9 (hopefully it is the same in all models), or at least its performance characteristics (class, read spped, write speed)? This would be helpful to choose the optimal SD - as fast as the controller can support, but not an even more fast and more expensive one.
iourine said:
First of all, because the swap is continuously rewritten as the system tries to distribute itself between physical RAM and swap in the optimal way. Any type of flash memory allows only a limited number of read-write cycles - and not really big. So, if you put swap onto it, you will kill it in a relatively short time . If it is a card, you just replace it; if it is the main ROM, you ruin the entire device.
Аnd once the swap volume is corrupt, results are unpredictable - that is what might happen to jipee296. jipee296, did you use an old card that had been rewritten many times before? Try a brand new one just to see if the problem goes away.
HDDs do not have this limitation, so if it were the HDD model, there would be the perfect place for swap. But this is not the case.
Quinny899, will the system start at all if swap is activated but the card is missing or corrupt? Actually there are two more inctructions missing for a complete solution: how to replace the SD card (will the swap be re-built automatically on a new card?) and how to remove swap completely. Any new step should be repeatable and reversible.
BTW, does someone know the exact brand of SD card reader used in G9 (hopefully it is the same in all models), or at least its performance characteristics (class, read spped, write speed)? This would be helpful to choose the optimal SD - as fast as the controller can support, but not an even more fast and more expensive one.
Click to expand...
Click to collapse
To remove just delete the file you pushed. And I ran swap on my old phone for 2 years and nothing happened to the sd
Sent from my HTC Desire HD using XDA Premium HD app
jipee296 said:
Quinny,after using this script for two days, i always get a random reboot or the devices freezes... any help?
Click to expand...
Click to collapse
I didn't try the script yet but used "swapper 2". I assume this does the same thing and I get random reboots and freezes too. I tried different values for swappiness, internal memory or sdcard, swap file and swap partition, the problem remains
SE-X1 said:
I didn't try the script yet but used "swapper 2". I assume this does the same thing and I get random reboots and freezes too. I tried different values for swappiness, internal memory or sdcard, swap file and swap partition, the problem remains
Click to expand...
Click to collapse
Swapper 2 has freezing issues, the script doesn't
Sent from my Desire HD using XDA Premium HD app
Hi,
I looked at your script and it seems to recreate the swap file at every boot. That might slow the boot process. You could add an "if file exists...don't rm and create" kind of instruction...
Quinny899 said:
To remove just delete the file you pushed.
Click to expand...
Click to collapse
And what happens next? Does the system start at all? Does it re-create the swap, or operates without swap from that point on? (Sorry, I'm on the go now and cannot investogate your script.)
And I ran swap on my old phone for 2 years and nothing happened to the sd
Click to expand...
Click to collapse
Well, to say not so categorically - this may depend upon many things: memory type, manufacturer, actual load, etc. E.g. if the amount of physical RAM is sufficient for everyday use, then swap is used very rarely, or not used at all - surely, the card will live much longer in this case. Yet finally any flash memory is mortal, sooner or later (like us, too). I personally had a few dead cards and sticks over the past few years (without swap, just due to intensive usage), and I won't risk the entire device for the price of a flash card.
x3ss said:
Hi,
I looked at your script and it seems to recreate the swap file at every boot. That might slow the boot process. You could add an "if file exists...don't rm and create" kind of instruction...
Click to expand...
Click to collapse
I'll look into it
Sent from my Desire HD using XDA Premium HD app
iourine said:
And what happens next? Does the system start at all? Does it re-create the swap, or operates without swap from that point on? (Sorry, I'm on the go now and cannot investogate your script.)
Well, to say not so categorically - this may depend upon many things: memory type, manufacturer, actual load, etc. E.g. if the amount of physical RAM is sufficient for everyday use, then swap is used very rarely, or not used at all - surely, the card will live much longer in this case. Yet finally any flash memory is mortal, sooner or later (like us, too). I personally had a few dead cards and sticks over the past few years (without swap, just due to intensive usage), and I won't risk the entire device for the price of a flash card.
Click to expand...
Click to collapse
If you delete it it just doesn't use the swap file. End of.
And why, if swap was unsafe, do almost all Linux builds recommend it and HTC incorporate it on some phones?
Sent from my Desire HD using XDA Premium HD app
iourine said:
Yet finally any flash memory is mortal, sooner or later (like us, too). I personally had a few dead cards and sticks over the past few years (without swap, just due to intensive usage), and I won't risk the entire device for the price of a flash card.
Click to expand...
Click to collapse
I still use Kingston 8GB micro sd card- it had 128MB swap partition used from the very beginning I bought it (samsuck Spica had 256MB ram, it was quite hard to use it without swap)- card still works fine, no r/w problems on swap area.
On the other hand- if you don't like swap on flash memory you are free to make zram driver
Quinny899 said:
If you delete it it just doesn't use the swap file. End of.
Click to expand...
Click to collapse
Ok, now it is more clear.
And why, if swap was unsafe, do almost all Linux builds recommend it and HTC incorporate it on some phones?
Click to expand...
Click to collapse
Because all end-user Linux distributions arу traditionally targeted at conventional PCs equipped with a HDD. Things are different, say, for embedded Linux projects - swap is a very rare thing there.
In fact, swap concept is a thing of the past. Physical ROM is rather cheap now, and there are very few reasons to have it less than needed for your everyday use. Provided that, you can eliminate swap at all, both for Windows, Linux, or whatever else. I did this a few years ago (with RAM ranging from 1,25GB at my very old travel notebook to 8GB at graphic station used to stitch multi-megapixel panoramas), and never was short of RAM.
Unfortunately, this is not the case for current G9 8-(( A few bucks saved on a RAM chip by Archos designers cause problems now and will definitely cause much more problems in the future. I would never buy it if I only knew that there is only 512MB. I just missed the fact that RAM is not listed in technical specifications because I could not imagine that the very top model, the newest one, with high-end other hardware, may be below the de-facto standard of 1GB. That is why swap is really important for us here and now.
As for HTC, they might have various reasons to do so... not only the technical ones...
Hello, you can not increase the size of the swap file more than 150mb?
brbi said:
Hello, you can not increase the size of the swap file more than 150mb?
Click to expand...
Click to collapse
Modify the file. 150 should be all you need though. It will also take longer to boot the higher you make it
Sent from my Desire HD using XDA Premium HD app

[Q] Can you replace the internal memory on the Galaxy Note NT-7000?

With people trying different ROM all the time would it affect the lifespan of the internal storage? If so, can you replace it then whenever it gives out? Cheers!
No, it is soldered down. Desoldering it would be more-or-less akin to performing the miracle of walking on water.
andruyd said:
With people trying different ROM all the time would it affect the lifespan of the internal storage? If so, can you replace it then whenever it gives out? Cheers!
Click to expand...
Click to collapse
While I'm sure that there is a finite limit to the amount of read/write cycles that can be done on the memory of the phone, if you are really worried, you can just load all of your apps onto a microSD (and just tear up that memory instead).
While I am not sure if it is possible to run the whole OS from the microSD slot, it has been done on other devices but would be slow and buggy.
However, if you want to only limit the total number of read/write cycles on the physical memory, a great way is by moving apps to external storage, but bear in mind they will run slower.
Also, you will probably upgrade your phone far earlier than you might have a problem with the internal storage corrupting.
In terms of flashing ROMs, this is somewhat of a valid point, but once there is a stable ICS rom of your liking, chances are at least some of us will be flashing much less

[app] ramexpander

Thought of sharing this if anyone wants to increase device RAM. I am not selling this product. I find it useful.
It is too expensive though.. Search Play store for Ram Expander. I expanded my RAM with external sdcard crearing a swap fle of 4gb. Now my device avaialble RAM is 6.38gb. It helps apps to load fast and also less lag in system response.
Keep in mind the following when using such a program:
1) All this does is to create a swap file on your SD card, it doesn't increase actual RAM of the device.
2) This can hit your SD card HARD with writes. Each cell in a SD card has a max number of writes it can perform before it wears out. If you use this and create a swap file on your SD card, it will cause the device to wear faster, which could cause the card to go bad faster than it normally would.
3) SD card random write/read speed is much, much slower than system RAM. Random write/read is pretty bad compared to system RAM, so you may not see the performance you are looking for.
Anyone is, of course, free to decided for themselves if it is worth the $9, but for my device I'm not going to take the chance.
hbar98 said:
Keep in mind the following when using such a program:
1) All this does is to create a swap file on your SD card, it doesn't increase actual RAM of the device.
2) This can hit your SD card HARD with writes. Each cell in a SD card has a max number of writes it can perform before it wears out. If you use this and create a swap file on your SD card, it will cause the device to wear faster, which could cause the card to go bad faster than it normally would.
3) SD card random write/read speed is much, much slower than system RAM. Random write/read is pretty bad compared to system RAM, so you may not see the performance you are looking for.
Anyone is, of course, free to decided for themselves if it is worth the $9, but for my device I'm not going to take the chance.
Click to expand...
Click to collapse
Thanks. Wonderful write-up. I didn't realise this fact. Micro sdcard is cheaper now days and worth wearing out.

Categories

Resources