What's a good partition for a CM rom? - G1 Q&A, Help & Troubleshooting

Fairly new to CM, currently running the latest version (v4.2.12.2). I kept my partition from a previous build (Swap = 128 MB and Ext3 = 640 MB).
So what's a recommended partition for a CM build to run smoothly?

BoomBoomPOW said:
Fairly new to CM, currently running the latest version (v4.2.12.2). I kept my partition from a previous build (Swap = 128 MB and Ext3 = 640 MB).
So what's a recommended partition for a CM build to run smoothly?
Click to expand...
Click to collapse
CM doesn't use swap so it's ok to get rid of that unless you frequently try roms that need swap. And I would just use 512 for ext3, either size is an ungodly amount of apps

For donuts i like EXT=128MB & of course the rest if for Fat32.
I normally dont install 40>X apps.

Related

EXT Filesystems

Okay so when we first had apps to SD, we used an extended partition called EXT2. And then cyanogen and all the other devs decided that ext2 wasn't as good as ext3. Now I realize that there's an ext4. So my question is, is there an infinite list of ext filesystems and is it a coincidence that ext2<ext3<ext4?
The question relies on a bit of history.
ext - (extended file system) which was a file system used in minix and *nix.
ext2 (second extended file system) was a replacement for ext. Primarily this allowed for larger files and longer file names.
ext3 was the replacement for ext2... intuitively enough. the most important thing it added was journaling. There were quite a few other changes but the journal is the reason ext3 is favored for the G1. The short version is that an journaled file system is less likely to become corrupt if not powered off correctly.
ext4 extends ext3. From a G1 perspective the main things it provides is some performance improvements as well as journal checksumming. There are quite a few other changes but most will not be pertinent to an embedded environment. Check wikipedia if you want a complete list.
Ext2 to ext3 is completely backwards compatible - if you make a partition ext3 you can still mount it as ext2, you just lose the journal capability while doing so.
Ext3 to ext4 is not backwards compatible if extents are used. Truthfully, unless you map extents to a smaller multiple of block size of your flash card using extents on an SDHC would probably not be advisable. People enable it with the default 128MB extent size and 4KB block size none the less. It would be a long discussion as to why this is non optimal considering a flash block size of 128KB (page size 64KB I believe) but it is not worth having.... most people enable it and so ext4 in most cases will not be backwards compatible.
EDIT: As of this moment there is not an EXT5 on the horizon. Most next gen file system work on Linux is concentrating on BTRFS and a few others whose names escape me.
EDIT2: added block size to EXT4 extents to be clearer.
JanetPanic said:
The question relies on a bit of history.
ext - (extended file system) which was a file system used in minix and *nix.
ext2 (second extended file system) was a replacement for ext. Primarily this allowed for larger files and longer file names.
ext3 was the replacement for ext2... intuitively enough. the most important thing it added was journaling. There were quite a few other changes but the journal is the reason ext3 is favored for the G1. The short version is that an journaled file system is less likely to become corrupt if not powered off correctly.
ext4 extends ext3. From a G1 perspective the main things it provides is some performance improvements as well as journal checksumming. There are quite a few other changes but most will not be pertinent to an embedded environment. Check wikipedia if you want a complete list.
Ext2 to ext3 is completely backwards compatible - if you make a partition ext3 you can still mount it as ext2, you just lose the journal capability while doing so.
Ext3 to ext4 is not backwards compatible if extents are used. Truthfully, unless you map extents to a smaller multiple of block size of your flash card using extents on an SDHC would probably not be advisable. People enable it with the default 128MB extent size and 4KB page size none the less. It would be a long discussion as to why this is non optimal considering a flash block size of 128KB (page size 64KB I believe) but it is not worth having.... most people enable it and so ext4 in most cases will not be backwards compatible.
EDIT: As of this moment there is not an EXT5 on the horizon. Most next gen file system work on Linux is concentrating on BTRFS and a few others whose names escape me.
EDIT2: added page size to EXT4 extents to be clearer.
Click to expand...
Click to collapse
oo Awesome, THanks for the response. Cleared things up. Another thing...why didn't developers start with EXT4 then?
Ext4 support wasn't built into Android - Cyanogen (I think, don't mean to step on anyone's toes) added it in. And it is still a pretty new file system type, so after patching in support, Cyanogen still had to go back and bring in some newer patches to try and fix bugs.. It's very cutting edge still. Given time, it'll be the "standard" and we'll be poking at some other new file system and wondering why everyone doesn't use it.
The original kernel for android would not have supported ext4, since it was not available at the time of the G1 release.
I am going from memory but I think the cupcake release used a 2.6.27 kernel. This would have been before ext4 support was released for general consumption, though it might have been available under experimental.
Cyanogen and most of the custom ROMS out there are using a 2.6.29 kernel now, which has a general release of ext4. There are some known problems with the stock ext4 release in 29 but Cyanogen backported the fixes from 2.6.30. Since I believe most of the ROMS are "Cyanogized" you should be fine now with any of the current ROMS on a 29 kernel that supports ext4, which is not necessarily all of them. I pretty much stick to Cyanogen's ROMs so I can not say what the others do and do not have.
Saiboogu said:
Ext4 support wasn't built into Android - Cyanogen (I think, don't mean to step on anyone's toes) added it in. And it is still a pretty new file system type, so after patching in support, Cyanogen still had to go back and bring in some newer patches to try and fix bugs.. It's very cutting edge still. Given time, it'll be the "standard" and we'll be poking at some other new file system and wondering why everyone doesn't use it.
Click to expand...
Click to collapse
JanetPanic said:
The original kernel for android would not have supported ext4, since it was not available at the time of the G1 release.
I am going from memory but I think the cupcake release used a 2.6.27 kernel. This would have been before ext4 support was released for general consumption, though it might have been available under experimental.
Cyanogen and most of the custom ROMS out there are using a 2.6.29 kernel now, which has a general release of ext4. There are some known problems with the stock ext4 release in 29 but Cyanogen backported the fixes from 2.6.30. Since I believe most of the ROMS are "Cyanogized" you should be fine now with any of the current ROMS on a 29 kernel that supports ext4, which is not necessarily all of them. I pretty much stick to Cyanogen's ROMs so I can not say what the others do and do not have.
Click to expand...
Click to collapse
Ah Thank-you both of you. Cleared things up alot
This explains it nicely! Ext4 for cyan. Is it still a good idea to run the linux swap partition as well with ext4 and Cyan roms?
yes
you still want to run a linux-swap partion, swap and ext are 2 different things. Swap is where your system extends it's operating memory not storage as to say even a full computer linux distro uses a swap partion<I know my ububtu does> so yes if you want the benefits of swap than you better have a partion for it
Awesome..
Thanks to alritewhadeva for rising this question and thanks much to Saiboogu and JanetPanic for letting us win users what exactly these are for. Couldn't find better explanation even after googling about them.
gridlock32404 said:
you still want to run a linux-swap partion, swap and ext are 2 different things. Swap is where your system extends it's operating memory not storage as to say even a full computer linux distro uses a swap partion<I know my ububtu does> so yes if you want the benefits of swap than you better have a partion for it
Click to expand...
Click to collapse
Regarding this linux-swap.... I do have 32MB partition for that one created before installing the ROM. Now, are cyanogen's roms take advantage of this partition automatically or do I need to "enable" or change setting for that to happen?
If you read the first post on cyan's rom, I believe it does but as compcache, which I believe and I might not be right but I think it is just a better way of swap, I think more efficent
I repartitioned today to ext4. I used cyan's userint.sh and Mike Taylors user.conf. I'm not convinced it is working right at it seems more sluggish at times.
I just use a 96mb linux swap myself that I turn on with swapper and it is quite snappy, there was a thread were people were saying that comp wasn't as good as swap so I decided doing all that was just a hassle so I stuck with tried and true swap
This is the MT user.conf and the one I'm running.
# User.conf by miketaylor00
# General parameters
general{
apps2sd=0 # this is useless here, require a modified a2sd script
media2sd=1 # moves the medias to sd if /system/sd/media exists
}
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=1 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p3 # pointing to the backingswap partition device
cc_swappiness=28 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=0 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p3 # swap partition device
swappiness=30 # default 60
}
#virtual memory
sys_vm{
sys_vm_en=1 #enable(1) or disable(0) virtual memory configurations
page_cluster=3 # default 0
laptop_mode=0 # default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=500 # default 500
dirty_background_ratio=5 # default 5
dirty_ratio=10 # default 10
}
#cpu clock
proc_cpu{
proc_cpu_en=1 #enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=192000 # default 245760
scaling_max_freq=528000 # default 528000
sampling_rate=2000000 #default 200000 depending on kernel version
powersave_bias=0 # default 0, CM3.9.6 default uses 200
up_threshold=45 # default 40, percent cpu usage before going up a speed step
}
gridlock32404 said:
If you read the first post on cyan's rom, I believe it does but as compcache, which I believe and I might not be right but I think it is just a better way of swap, I think more efficent
Click to expand...
Click to collapse
Compcache is different to swap.
Swap is a virtual extension of the RAM, which is why it gives us a performance increase. Although adding x amount of swap space isn't the same as adding x amount of RAM.
Compcache compresses what's in RAM, which in theory increases the amount of RAM
Compressing pages and keeping them in RAM virtually increases its capacity. This allows more applications to fit in given amount of memory.
Click to expand...
Click to collapse
I flashed to Cyan's lastest this morning. I assume that user.conf and userint.sh was replaced with Cyans own?
I'm super fuzzy on all this, as I will be running Cyan's roms from now on, I just need a system/setup/ext that's optimized for his roms. I didn't have much luck with MT's for whatever reason. It ran, just lagged.

SunnyD 111

Loved this rom. Going back to it but I can't find(yes, I searched) the OP specifying the partitions(ext/swap/etc)...
Just curious what swap size(if any), ext(which number) I use for the rom.
You can use any swap size, I recommend 96 mb or higher. I also use ext4.
The Hero ROMs usually require 96 mb or higher swap size.
Are you talking about SuperD 1.11?
http://forum.xda-developers.com/showthread.php?t=613809
are apps2sd automatically enabled on this rom or do i need to do it manually?

what is need partition SD card?

"Its recommend to partition your sdcard before flash"
whats the use?..........
you can use cwm with the phone or minitool partition wizard with the pc
venkatarajeev131 said:
"Its recommend to partition your sdcard before flash"
whats the use?..........
Click to expand...
Click to collapse
the rom maybe containing a2sd script that's why it need a second partition do it there is no harm
What size this partition should be? 100MB is enough?
felipevsw said:
What size this partition should be? 100MB is enough?
Click to expand...
Click to collapse
atleast 512 mb for ext parttion you should create a swap partition of 256 mb,
swap will replace the ram according to the swappiness set by you
dhlalit11 said:
atleast 512 mb for ext parttion you should create a swap partition of 256 mb,
swap will replace the ram according to the swappiness set by you
Click to expand...
Click to collapse
So it should be 2 partitions: one with 512 MB and another with 256 MB... The one with 512 should be formatted ext4? and the other swap (of course)?
felipevsw said:
So it should be 2 partitions: one with 512 MB and another with 256 MB... The one with 512 should be formatted ext4? and the other swap (of course)?
Click to expand...
Click to collapse
Set it as ext2, it's faster.
---------- Post added at 08:15 PM ---------- Previous post was at 08:06 PM ----------
dhlalit11 said:
atleast 512 mb for ext parttion you should create a swap partition of 256 mb,
swap will replace the ram according to the swappiness set by you
Click to expand...
Click to collapse
Here's some info on how Linux (and thus Android) uses swap. http://www.linux-tutorial.info/modules.php?name=MContent&pageid=89
I wouldn't bother with it on a phone since Linux will just swap unchanged files right back to where they are on the phone storage without the need for a swap file and since it's unlikely that you'll ever multitask large user files on it there really is no need for it.
felipevsw said:
So it should be 2 partitions: one with 512 MB and another with 256 MB... The one with 512 should be formatted ext4? and the other swap (of course)?
Click to expand...
Click to collapse
swap is optional but it's good to have
dhlalit11 said:
swap is optional but it's good to have
Click to expand...
Click to collapse
For what? Who is changing large data files on their phone? In all likelihood it will cost you more memory to have a swap file than it will save you memory since it won't be used.
Linux won't use it at all if the file in memory hasn't changed since it was last read from storage, it will just swap it back to where it was last read, that is, if you have an app open and more memory is needed linux will first check to see if the file has been changed since last read and since it's an app it will just link it back to where it was read from in the first place rather than to put yet another copy in swap.
Jinxxed said:
For what? Who is changing large data files on their phone? In all likelihood it will cost you more memory to have a swap file than it will save you memory since it won't be used.
Linux won't use it at all if the file in memory hasn't changed since it was last read from storage, it will just swap it back to where it was last read, that is, if you have an app open and more memory is needed linux will first check to see if the file has been changed since last read and since it's an app it will just link it back to where it was read from in the first place rather than to put yet another copy in swap.
Click to expand...
Click to collapse
am not talking about swap file am talking about swap partition and if you think there is no need then why are there paid apps like swapper for root and why are people paying for them.
suppose you are playing shadow gun with help of cf3d after the play you find that all the app like launcher background working apps are stopped due to low ram but if you have swap then the app's memory will move to swap partition and it will not close
when I had mini I had a swap partition of 512 MB and it was really working and if you think the life of SD will decrease then you should know that it has a veeeeeery lil effect on life so don't worry there is no harm
Thank u for this useful thread..
dhlalit11 said:
am not talking about swap file am talking about swap partition and if you think there is no need then why are there paid apps like swapper for root and why are people paying for them.
suppose you are playing shadow gun with help of cf3d after the play you find that all the app like launcher background working apps are stopped due to low ram but if you have swap then the app's memory will move to swap partition and it will not close
when I had mini I had a swap partition of 512 MB and it was really working and if you think the life of SD will decrease then you should know that it has a veeeeeery lil effect on life so don't worry there is no harm
Click to expand...
Click to collapse
Whether you use a swap file or partition is irrelevant, Linux can use either and they work exactly the same.
In your example, all the apps would be swapped RIGHT BACK TO WHERE THEY ARE STORED since they did not change since last read, the swap would be unused and the apps would still be swapped.
I don't know if it's that you fail to comprehend the simple subject or refuse to read both what i post and what i link to but you are not understanding this.
Of course it won't affect the SD cards lifetime, it won't be used.

[Q] Memory Shown Less

Hello,
The RAM shown in my Nexus6 is
Code:
Total: 2970MB
Available 1332MB (45%)
Java Heap: 256MB
The Total RAM 2970MB is shown in the apps CPU-Z and Droid Info. Why the value is lesser than 3GB (3072MB) ? There should be a technical reason for that. Please let me know. Thanks.
Yep, the difference is allocated to a bunch of other hardware blocks, like the MODEM.
doitright said:
Yep, the difference is allocated to a bunch of other hardware blocks, like the MODEM.
Click to expand...
Click to collapse
okay, I also have learned from the internet that the difference is held by the GPU, which the OS is not aware of. So the Total: 2970MB shows the available memory and not the installed memory, Correct ?
aniyan.rajan6 said:
okay, I also have learned from the internet that the difference is held by the GPU, which the OS is not aware of. So the Total: 2970MB shows the available memory and not the installed memory, Correct ?
Click to expand...
Click to collapse
Yes. Boot to bootloader and it will will tell you what brand and size ram and memory is installed in device.
Also the storage space shows 54.6GB instead of 64GB. Is it because of the reserved space allocated, when the filesystem is formatted to ext4 ?
aniyan.rajan6 said:
Also the storage space shows 54.6GB instead of 64GB. Is it because of the reserved space allocated, when the filesystem is formatted to ext4 ?
Click to expand...
Click to collapse
That is minus the system and other partitions reserved for firmware and the OS.
prdog1 said:
That is minus the system and other partitions reserved for firmware and the OS.
Click to expand...
Click to collapse
But it takes almost 10GB of space, which is huge. I think it is good that I have brought a 64GB version.
aniyan.rajan6 said:
But it takes almost 10GB of space, which is huge. I think it is good that I have brought a 64GB version.
Click to expand...
Click to collapse
This is why you always buy as much memory as can afford.
prdog1 said:
Also the storage space shows 54.6GB instead of 64GB. Is it because of the reserved space allocated, when the filesystem is formatted to ext4 ?
That is minus the system and other partitions reserved for firmware and the OS.
Click to expand...
Click to collapse
If the remaining space (64GB - 54.6GB) is used by the OS and firmware, then what does the Available Storage mean ?
The Available Storage shows 49.88GB (91%). I mean there is one more difference: 54.6GB - 49.88GB. Please clarify. Thanks.
aniyan.rajan6 said:
If the remaining space (64GB - 54.6GB) is used by the OS and firmware, then what does the Available Storage mean ?
The Available Storage shows 49.88GB (91%). I mean there is one more difference: 54.6GB - 49.88GB. Please clarify. Thanks.
Click to expand...
Click to collapse
os and firmware + extra for future updates takes up the first 10 giving you 54. Available is your userdata. Anything less that 54 is what you put on it.
prdog1 said:
os and firmware + extra for future updates takes up the first 10 giving you 54. Available is your userdata. Anything less that 54 is what you put on it.
Click to expand...
Click to collapse
okay, When I brought this phone the Available Storage was 51GB, without adding any data by me. So I think something else has taken space from the 54GB (54 - 51 = 3GB).
Then I added some music files and the Available Storage is 49.88GB now.
aniyan.rajan6 said:
But it takes almost 10GB of space, which is huge. I think it is good that I have brought a 64GB version.
Click to expand...
Click to collapse
Not 10 GB, no. The difference is less.
In software, 64 GB is 64x1024 Bytes x 1024 KB x 1024 MB.
In hardware, 64 GB is 64x1000 x 1000 x 1000.
Because there is now a difference in what hardware manufacturers call a GB, they tried to rename the true software GB to be GiB instead (though generally I refuse to do this).
So to work out how many GB of software data you can get in a 64 GB hardware disk, use the maths below.
64 x 1000 x 1000 x 1000, / 1024 /1024 /1024 = 59.6 GB
So a 64 GB anything is only really 59 GB.
Then as mentioned, that is partitioned into /system, /cache, /data etc
danarama said:
Not 10 GB, no. The difference is less.
In software, 64 GB is 64x1024 Bytes x 1024 KB x 1024 MB.
In hardware, 64 GB is 64x1000 x 1000 x 1000.
Because there is now a difference in what hardware manufacturers call a GB, they tried to rename the true software GB to be GiB instead (though generally I refuse to do this).
So to work out how many GB of software data you can get in a 64 GB hardware disk, use the maths below.
64 x 1000 x 1000 x 1000, / 1024 /1024 /1024 = 59.6 GB
So a 64 GB anything is only really 59 GB.
Then as mentioned, that is partitioned into /system, /cache, /data etc
Click to expand...
Click to collapse
Okay, So is 'Total Internal Storage: 54.64 GB' the size of the /system partition or /data partition ?
Thanks.
aniyan.rajan6 said:
Okay, So is 'Total Internal Storage: 54.64 GB' the size of the /system partition or /data partition ?
Thanks.
Click to expand...
Click to collapse
Data.
aniyan.rajan6 said:
Okay, So is 'Total Internal Storage: 54.64 GB' the size of the /system partition or /data partition ?
Thanks.
Click to expand...
Click to collapse
/data AKA userdata. This is where your apps go, where your settings are stored and where your sdcard is.
danarama said:
/data AKA userdata. This is where your apps go, where your settings are stored and where your sdcard is.
Click to expand...
Click to collapse
So that 3 GB (54.64GB - 51GB) is used by the apps, I guess. So that is the reason why it was showing 'Available Storage: 51GB' at the beginning.
Thanks.
aniyan.rajan6 said:
So that 3 GB (54.64GB - 51GB) is used by the apps, I guess. So that is the reason why it was showing 'Available Storage: 51GB' at the beginning.
Thanks.
Click to expand...
Click to collapse
When you get the phone new, when you boot it, some system settings will be stored in data. Also some things related to Android Run time.
aniyan.rajan6 said:
If the remaining space (64GB - 54.6GB) is used by the OS and firmware, then what does the Available Storage mean ?
The Available Storage shows 49.88GB (91%). I mean there is one more difference: 54.6GB - 49.88GB. Please clarify. Thanks.
Click to expand...
Click to collapse
54.6 - 49.9 = 4.7
4.7 / 54.6 = 0.0861
0.0861 = 8.61%
8.61% rounded to the nearest percent = 9%
100 - 9 = 91.
Does that clarify it for you?

How many GB should I need for Linux mint to build ROMs for the op3t?

Like the title sates, I want to partition some space on my computer to build ROMs using Linux, but is 120gb enough? I have a tb hard drive so I'm not worried about space
jamescable said:
Like the title sates, I want to partition some space on my computer to build ROMs using Linux, but is 120gb enough? I have a tb hard drive so I'm not worried about space
Click to expand...
Click to collapse
I'm building NLOS for my own purposes and I gave 230 GB and its enough (ccache max - 25 GB), but note I'm also booting from that partition.
Aim for at least 220 GB.

Categories

Resources