[Q]most great set for SDCard - Huawei Ideos X6

Just simply question guys,but I confuse about this
*swap enable/using swap partition
*using ext partition over moving apps2SD normally
Is this could be better than normal/standard SDCard?
I have Transcend 16GB Class 10 using fat32+ext4 (using link2sd)
But I felt not different with my VGen Class4 8GB
Please guys if you have experience about this,,tell whats wrong n what were I missed for
Thanks
Sent from my Spice Mi-410 using Tapatalk 2

Arya_3RDNumber said:
Just simply question guys,but I confuse about this
*swap enable/using swap partition
*using ext partition over moving apps2SD normally
Is this could be better than normal/standard SDCard?
I have Transcend 16GB Class 10 using fat32+ext4 (using link2sd)
But I felt not different with my VGen Class4 8GB
Please guys if you have experience about this,,tell whats wrong n what were I missed for
Thanks
Sent from my Spice Mi-410 using Tapatalk 2
Click to expand...
Click to collapse
I'll try to answer base from what I know....
"*swap enable/using swap partition"
About this, we have to know what is swap, swap type and do we need it?
swap is the another partition which will be used as an extra memory. As we know, memory is been accessed VERY OFTEN in a process, both read and write.
On linux PC commonly we use one partition on disk drive for linux swap. On windows it's using a file as a virtual memory.
Swap is needed when the application need large memory to be used for a process and the current ram is not enough. Well there are some priority list to be followed. Ok, I'll give an example if we run a big game in an android. we have ~350MB total user memory but let say we have 50MB free memory. Most of android BIG 3D games will not exceed 300MB of memory, the game designer will look to target phone which will run it, and they presume all user don't have swap memory. But let say the app will need about 300MB of memory to run.
1. If we have 50 MB swap partition in sdcard
Android will never deplete the real ram, so let say it will keep 10MB of free ram, it will be use for the android system rom to keep running. In this situation the app will take 40MB of free ram, 50MB of swap... and what about another 210MB? Android will take it from the real ram by kill another apps (based on priority of low memory killer setting) to reallocate the ram. So for the game, the real ram will be taken about 250MB and 50MB from swap and free ram about 10MB. another 90MB of real ram used by the system and another hidden app like framework setting, messaging and others and for app cache. About 250MB ram used by game app is accessed very fast, but 50MB of swap if very slow because of access speed of sdcard is very much slower then ram.
When exiting from the game, some hidden apps still in memory. Android will run one or two another residen apps.
2. If we have 50 MB swap zram
Zram is swap partition in real ram, not sdcard. Any data written to the zram is compressed and decompressed on the fly. For 50MB zram, let say we can get about 80MB swap because of compression. the ratio depend on data been compressed.
Just like said in point 1, android will keep 10MB of free ram for the android system rom to keep running. The app will take 40MB of free ram, 80MB of swap. The real ram is 350MB - 50MB(zram) = 300MB, 290MB will be available for apps. The app will take 80MB from zram, and use 220MB from real ram. So 290 - 220 = 70MB of ram will used by android system and for app cache.
About speed of game between those 2 swap type, zram will be faster for sure because it use ram rather then sdcard. And one thing I feel necessary to let you know. Not as in PC which using HDD as storage which almost has unlimited write cycle. But we use SDCARD which has very limited write cycle. So consider using swap partition in your sdcard, even if it has very fast write/read speed. It will significantly affect your sdcard life.
When exited from the game, few hidden app still reside in memory. Android will run few another residen apps.
3. If we not use any swap
The game will take 300MB of ram, and let 40MB of ram used by android system. More apps have to be killed by android low memory killer system.
When exited from the game, only one or two hidden app still reside in memory. Android will run some more another residen apps.
It's your decision to use swap or not. The need is depend on your behave of use of this phone and the types of apps installed, such as more widgets, tools and some residen apps. Try every option, and you will get the result. The result could be different with another user, depend on behave and the apps installed.
*using ext partition over moving apps2SD normally
If you really have your internal storage depleted, let say you have installed hundreds of apps, then yes you will need app2SD or ext partition on sdcard.
The read and write speed of internal storage and sdcard will definitely win by internal storage (You have class 10 of sdcard? just test the write speed of internal storage).
ext partition is access directly while app2SD using 3rd app, so using ext partition should be faster then app2SD.
Just 1.5 cents....
Do you understand what I've talked about???? Well.... I don't!!!

I'm a noob and it cracks my skull. Great explanation though:good:

wow??!! great explanation agan master
well I understand very much after read 1000times
Thanks a lot gan,,I must little experiment to realize
Now I understand what is "ZRAM" (sorry I really noobie )
about all this case,,is ZIPALIGN also complicate?

Well... actually my explanation hasn't completed yet. I was mentioned about priority, I didn't explained it. It about low memory killer configuration and also the priority of using swap. You can Google that .
About zipalign, it related with apk files. It intended to make it faster to load. Apk file is a compressed file. But I don't have any further knowledge regarding this. May be someone can explain it.
Sent from my bike using Tapatalk 2

Related

Swap partition for SGS ?

Hi again guys...
In Linux we have a SWAP partition for some time if RAM (Random Access Memory) will full OR for speed up applications by buffering in swap partition.
(Recommend Linux SWAP partition size: half of RAM)
so Android is Linux based and have kernel like Linux. Is it work to make a SWAP partition for SGS with swap file system?
You don't want that...
Android doesn't wipe RAM immediately anyway, so apps which are open and shutdown can be restarted again quickly (unless the RAM has been reused).
Also, apps on Android are designed to be shut down whenever free RAM runs out (its in the development guidelines that all applications should expect to be shut down at any time). Since most Android phones use high-speed NAND memory, when properly configured, apps load quicker too
The problem with swap is that it can lead to thrashing and loss of battery life. It's good for computers (because generally, you would rather lose performance and ensure you don't lose work), but on Android, applications should be killable at any time, and should have mechanisms to protect their work anyway.
It's probably possible to create a swap partition/file if you wish (try to swapon), but I foresee some potential side-effects, especially if you don't want to spend a lot of time managing memory manually.
i didn't think about battery life.
Thank you so muchhhhhhhhhh
I was actually exploring this option last night and stumbled that the kernel does allows swapon commands. I remembered trying it earlier on a stock rom but it was not available then.
Why I need the swap was because of the frequent shutdown of my launcher pro due to apps contenting for memory. The live wallpaper and heavy Widgets like pure messenger pro aren't helping much either, after much usage the device just slows down, lags and silently kills the background apps. The "minfree" settings were also tweaked but with much less desirable results was seen...
So I downloaded an app called "swapper2" from market and tested via 2 methods; Swap file and swap partition.
The performance of a swap file that sits in the NAND is not really that great. In fact it kinda lags me when memory is being swapped in and out of it. I think its the same problem with the i/o lag problems with any other rom
Then I tried a swap partition on my class 6 SD card. Although the lifespan of the card would be shortened and the battery life would be impacted, the performance is better compared to the earlier method.
In either method, the amont of apps that can be left opened at the foreground and background had increased and doesn't lag as more apps is being launched. Not bad for me but well, I guess it's all up to the user of the device at the end. Just my 2 cents...
I'll try the swap file method again over at the ext2 partition created by the lagfix and see how it goes next. Not sure if anyone interested though...
Sent from my GT-I9000 using XDA App
It seems that using the swap partition doesn't have the lag compared to using the swap file method.
It may be due to the I/O of multiple storage (parallelism ?) is better than a single storage or writing into the raw partition is better in terms of performance than a swap file.
I'm done with my findings, the device still have 60mb free and never lags, I'm sold.
Sent from my GT-I9000 using XDA App

[Q] internal memory usage list?

As many others have, I frequently run into a lack of internal memory on my nexus. I only ever have about 20 mb free. So today I decided to try and figure out what takes up all my internal mem.
I have a stock, non rooted phone running 83d.
I use apps 2sd and dolphin browser with cache on sd
I went to apps2sd and added up all the package sizes of the apps on my phone memory, came up to about 93mb. Yet I only have about 20mb free. That means about 70mb is being used up by other crap. Phone and contact storage is only 2mb each. So what is eating my memory and how can I find out? is there an app that'll chart out internal memory usage by app/file?
Disk Usage, from the market may help...
Sent from my Nexus One using XDA App
Imbalance said:
As many others have, I frequently run into a lack of internal memory on my nexus. I only ever have about 20 mb free. So today I decided to try and figure out what takes up all my internal mem.
I have a stock, non rooted phone running 83d.
I use apps 2sd and dolphin browser with cache on sd
I went to apps2sd and added up all the package sizes of the apps on my phone memory, came up to about 93mb. Yet I only have about 20mb free. That means about 70mb is being used up by other crap. Phone and contact storage is only 2mb each. So what is eating my memory and how can I find out? is there an app that'll chart out internal memory usage by app/file?
Click to expand...
Click to collapse
93mb of apps is just for the actual app .apk file. app data takes a HUGE amount of space.
most things i've got left on the phone don't really have much associated data from the ones i've checked anyway. Still, can't believe there's no app to show internal mem usage. There's tons of them for the SDcard... Also, diskusage is only for sdcard. I'd still like an easy way to see what's taking up all my internal mem and decide if i want to uninstall it or clear the data or whatever.
As soon as you open diskusage, it asks if you wanna see internal or external...
Sent from my Nexus One using XDA App
I like this disk usage app,i find it interesting how the developer used the tap to com on the different layouts and how data is used

What is meant by swap space?

Can anyone help me find, what is actually swap space means??
Swap space is a reserved space on a harddrive that acts as a "extended" RAM. When the RAM memory is full the kernel move stuff from the RAM memory to the Swap partition to free up memory. The data is later stored in the Swap until it's needed again.
The same thing or similar at least on a Windows pc is pagefile.
There are some discussions if swap files should be used or not on flash based storage devices since it increase the read/write cycles to the storage device and there by would break it faster (since flash based storage devices have a maximum of read/write cycles).
lintz said:
Swap space is a reserved space on a harddrive that acts as a "extended" RAM. When the RAM memory is full the kernel move stuff from the RAM memory to the Swap partition to free up memory. The data is later stored in the Swap until it's needed again.
The same thing or similar at least on a Windows pc is pagefile.
There are some discussions if swap files should be used or not on flash based storage devices since it increase the read/write cycles to the storage device and there by would break it faster (since flash based storage devices have a maximum of read/write cycles).
Click to expand...
Click to collapse
wow..thats a good piece of information.thanks mate +1
W/O swap
When low memory occurs kernel kill processes
With Swap
Kernel move those about to be killed process to swap space and then map them pointer with RAM so when you open that app instead of allocating new memory to psycial RAM its been read from Swap and loaded to RAM.
As mentioned many times creating swap file and/or swap partition to flash drive aka our phone memory(internal storage) is not a wise choice cause recursive read and write can damage that nodes in longer run as flash memory has limited read/write cycles.
Other choice is to make swapfile and/or partition to external mmc but as external mmmc has which could also damage mmc in longer run but it could be replaced cheap rather than internal flash memory. Issue arises with external c swapfile and/or partition is slower read and write which could degrade performance
So one for-all if swap is needed than CompCache/Zram is a wise choice which uses physical reserved RAM portion for swap. Which uses extemsive CPU to compress data and write them to swap and retrive them by decompressing and writing back to physical RAM. Which is not harmful but can use more battery and obviously its faster than swap on external mmc. Usually its faster in the beginning and slight laggy after more hours and days usage
Sent from my LG-P990 using Tapatalk 2
spica1234 said:
W/O swap
When low memory occurs kernel kill processes
With Swap
Kernel move those about to be killed process to swap space and then map them pointer with RAM so when you open that app instead of allocating new memory to psycial RAM its been read from Swap and loaded to RAM.
As mentioned many times creating swap file and/or swap partition to flash drive aka our phone memory(internal storage) is not a wise choice cause recursive read and write can damage that nodes in longer run as flash memory has limited read/write cycles.
Other choice is to make swapfile and/or partition to external mmc but as external mmmc has which could also damage mmc in longer run but it could be replaced cheap rather than internal flash memory. Issue arises with external c swapfile and/or partition is slower read and write which could degrade performance
So one for-all if swap is needed than CompCache/Zram is a wise choice which uses physical reserved RAM portion for swap. Which uses extemsive CPU to compress data and write them to swap and retrive them by decompressing and writing back to physical RAM. Which is not harmful but can use more battery and obviously its faster than swap on external mmc. Usually its faster in the beginning and slight laggy after more hours and days usage
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
yh...this is actually what Iam looking for..thank you Spica it helped me a lot...So which is more harm less? swapfile,ZRam or CompCache?
basimsherif3 said:
yh...this is actually what Iam looking for..thank you Spica it helped me a lot...So which is more harm less? swapfile,ZRam or CompCache?
Click to expand...
Click to collapse
Compcache or zram which is fastest amongst swap
Sent from my LG-P990 using Tapatalk 2
So in cm7, if compcache/zram is disabled, will it use swap?
aldyu said:
So in cm7, if compcache/zram is disabled, will it use swap?
Click to expand...
Click to collapse
No untill and unless you have created swapfile and/or partition with an init.d startup script
Sent from my LG-P990 using Tapatalk 2

Swap

Is swap only usefull for gaming or it is also used when there a lot of apps running..
If the ram is totally used by the other apps and i open an app then will it run using swap or android system will kill the other app in background with least priority and make it run in the phone 's ram only...
In short is swap also usefull for multitasking...
IAmNice said:
Yes swap is useful for multitasking. It allows you to run 3-4 apps in the background. Consider swap if you have a fast sd card. If you open an app it will run in swap partion if your ram is full
Sent from my E15i using xda app-developers app
Click to expand...
Click to collapse
Man that's totally wrong! You obviously know nothing about how swap space works lol..
Swap partitions or files can be used like a ram buffer.. When ram gets full, the system can offload some data to the swap space, thus freeing some ram.
Apps NEVER EVER EVER run in swap space..
Using swap will drastically reduce the life of your sdcard. It is not advisable to use at all.
Uggh.. now I'm confused..
I just want to know that if the phones ram is full due to some apps running and i open a new app then wether it will run on swap or android system as it is architectured will kill the lowest priority app to free up space to run the new app launched in phone's ram..
Swap decrease sd cards life
bandarigoda123 said:
Swap decrease sd cards life
Click to expand...
Click to collapse
maybe you're right, but swap helped me a lot

[Q] Multiple SWAP !!

Hi,
I was looking for and answer, but i can find anything.
So i have 2 questions about swap.
1. Can i have multiple swap files? Like eg. Zram+other swap file? Or two swap files (one on /cache other on /sdcard). Made via 2 apps. One (on internal memory/sdext) would be working all the time, second (sscard) only if i had needed it.
2. Is it possible to lock app in swap? I mean that app should only work using swap - no real ram. I was thinking about music player or some widgets.
Romio.se4m said:
Hi,
I was looking for and answer, but i can find anything.
So i have 2 questions about swap.
1. Can i have multiple swap files? Like eg. Zram+other swap file? Or two swap files (one on /cache other on /sdcard).
Click to expand...
Click to collapse
I think it's possible to activate swap partition + swap file at once, but why you should do that?
You can create swap partition up to 4096 mb OR swap file up to 4096 mb using" ram expander" app from market.
-zram is ram compressor which slows down the device
Made via 2 apps. One (on internal memory/sdext) would be working all the time, second (sscard) only if i had needed it.
Click to expand...
Click to collapse
I didn't understand you, u wanna use internal memory as swap or install swapping app in internal?
(Cm9 roms use internal as swap partitions)
2. Is it possible to lock app in swap? I mean that app should only work using swap - no real ram. I was thinking about music player or some widgets.
Click to expand...
Click to collapse
I never heard something like locking app in swap but might be possible with some advanced RAM managers.
Sent From My BEAST , I mean X8
i guess u can have multiple swaps but you cannot have swap controlled by multiple apps.
kernel should find all swap places and should work according to them.
and u can increase swappiness to lock apps which are not active into swap.
but x8 internal memory is very slow.
our ram r/w speed is about 550MBps
and internal memory speed about 2mbps
so using swap other than zram is not really a good option.
also zram has disadvantages as it uses ram only and increases cpu overhead.
You can have any number of swap partitions or file that you like. Linux will do the job of distributing the swapped data to them and you can sit back and relax. Mind that only way this makes sense is if you got a fast enough sdcard.
Sent from my Galaxy Nexus using xda app-developers app

Categories

Resources