So, from my understanding compcache utilises RAM to store compressed swap pages, meaning that you don't need a swap partition since the 'swapped out' pages are still stored in memory.
So, why do all the 'with compcache' roms need you to partition your SD card?
I asked this in the Cyanogen ROM thread and got blanked - but would also like to know the answer.
I am interested in knowing the answer too, I was following Loccy's lastest topic on this subject but it ended up having no answers...
Related
Guys,
Is there somewhere else who create an application that can make SDHC card as device memory?
Thanx.
irmanpribadi said:
Guys,
Is there somewhere else who create an application that can make SDHC card as device memory?
Thanx.
Click to expand...
Click to collapse
The storage card can only be used as a storage card, not for device memory. nice idea though, it would be nice to have 16gb of ram
Regards
Jay
maybe this is not about ram but about having the sd card as primary partition, which might be possible although it has never been done before. in wm2003 the ramdrive was the primary partition and the "storage" was listed as a storage card. these days the storage is the first (and on most devices and roms only) partition. but when a ramdisk is added, it is listed as a storage card. that means the order of the drives is variable and a storage card could also be the first partition.
but what would you want with a theretical answer like that? an expert rom chef, who started with cooking wm2003 might know the answer or could do that for you.
but for all realistic means, you should simply try and save all documents, pictures, videos and music, install bigger programs, derive the cache for your browser, store email attachments all on the sd card. the only problems with completely leaving out on the internal storage, especially for program installation, is that it is slow.
It should be possible but you will probably need to cook a new ROM to get it working. It's mostly just a matter of telling CE which mounted volume you want to mount as root for the emulated objectstore.
This document on MSDN should give you an idea of what to do:
http://msdn.microsoft.com/en-us/library/ms885839.aspx
The MPx200's WM5/WM6 ROMs do this already. If you do this, keep in mind you likely won't ever be able to eject the card while the device is booted as the registry will be stored there. Now, maybe you could write some sort of app that would dismount/remount and reinitialize the registry at the press of a button but that doesn't seem too practical unless you have no choice as on the MPx200. Another workaround might be to store the registry hives on an internal flash partition and store the rest of the system folders on the SD card.
As for implementing the RAM/ROM based filesystem like in WM2003, I'm not sure. The Windows CE 5.x kernel used for Windows Mobile 5/6/6.1/6.5 certainly won't prevent you from doing it but I'm unsure the Universal's hardware can persist the ram contents between "soft" resets. If it can, then I imagine it's only a matter of using an NK.exe that doesn't force a clean reboot and using a different filesys.exe than the included ROM only/hive registry configuration it ships with. Heh, if you ever looked at the MS news groups you will see a whole bunch of posts by OEMS getting yelled at for using the ram based configuration in their beta WM5 roms. "Not supported" doesn't mean it can't be done and work, it just means MS doesnt' want you to do it for either marketing or other reasons.
Chef_Tony said:
maybe this is not about ram but about having the sd card as primary partition, which might be possible although it has never been done before. in wm2003 the ramdrive was the primary partition and the "storage" was listed as a storage card. these days the storage is the first (and on most devices and roms only) partition. but when a ramdisk is added, it is listed as a storage card. that means the order of the drives is variable and a storage card could also be the first partition.
but what would you want with a theretical answer like that? an expert rom chef, who started with cooking wm2003 might know the answer or could do that for you.
...
Click to expand...
Click to collapse
The ramdisk you are talking about is very different from the Windows CE object store used in WM2003 and many current non-PPC WinCE devices.
They don't even use the same filesystem! The ramdisk driver commonly circulated on these forums basically just formats/mounts a chunk of RAM as a FAT partition. It can't be resized and appears to the OS as any other flash card. You can even format it with StorageTools or whatever. The dynamic ramdisk or objectstore is built into the WinCE OS. It uses a proprietary filesystem optimized for RAM usage that is closely integrated into the kernel. As I understand it, It's more like a database than a filesystem like FAT. The registry, files and DBs are all stored in the same internal format and then abstracted by the OS and it's APIs. It couldn't even be disabled until more recent WinCE versions. More info: http://msdn.microsoft.com/en-us/library/aa910544.aspx
Help setting up userinit.sh & user.conf for "Backing Swap" on CyanogenMod
I am trying to set up Backing swap, which combines Compcache and traditional swap, on the phone/rom in my sig. I have been unable to do so for two main reasons.
1. I used Amon RAs recovery to make the partitions so I'm not sure what order they are in (need to know so I can put the right partition # in the useritit.sh file).
2. I am unsure how to create these files once I have all the proper info to plug into them, or where to acquire a base-line version of these files to edit.
I have been looking for hours but only seem to find posts of people suggesting I use these files. Even the Q&A wiki doesn't contain anything on the subject either (unless I was entering the wrong search critiria). I only have the terminal on my phone to work with or my pc which is win XP 64bit, so if I need any 3rd software please provide the windows flavor.
TIA everyone,
~psguardian
You can have one or the other one not both.
Swap always slows down the phone after a couple of hours and compache is compressed into the ram.If you want a fast rom use Super-D or Wesgarner.
Ace42 said:
You can have one or the other one not both.
Swap always slows down the phone after a couple of hours and compache is compressed into the ram.If you want a fast rom use Super-D or Wesgarner.
Click to expand...
Click to collapse
According to the Cyanogenmod wiki it does work with both (atleast you can back a shrunk compcache with the swap partition), I just don't want to try putting the file together until I can cipher out which part. # my swap partition is, as this may turn my ext3 partition into a 512mb swap partition & I don't want that.
~psguardian
Think i was thinking about backswap..thats not important though.
Swap partition is Block3
EXT is block 2
Ace42 said:
Think i was thinking about backswap..thats not important though.
Swap partition is Block3
EXT is block 2
Click to expand...
Click to collapse
I can see how backswap & standard swap wouldn't work together because they will try to use the same space. Is the linuxswap partition always mounted as Block3 ? when going through the format process in Amon RA recovery fat 32 is the last partition defined, which is why I hesitated to use the example given on the wiki (since back when that was put together partitioning was all manually handled).
~psguardian
still not smooth
I managed to get user.conf maker app on the market but it doesn't work properly in 4.2.13 (it sets the files up with its own defaults, but never accepts user input for value changes).
Had to
cp /system/sd/userinit.sh /sdcard/userinitsh.txt &
cp /system/sd/user.conf /sdcard/userconf.txt
so that I could use a 'notepad' type app to edit them propperly & then push them back to /system/sd now my phone is lagging worse then before so I'm not sure what I've done wrong... for backingswap am I suppose to enable compcache AND backingswap or just backingswap? I think its option A because that is the only time my swap partition shows active under 'free' command.
So now a new set of questions.
How much RAM is good to allocate to compcache
How large a swap partition should be used
What swappiness level is good for my setup
I know these answer are subject to the situation on my phone so let me give some stats, I am running a theme w/advanced launcher (5 screens) 10 widgets & 3 background apps that update every 15-30min (1 of them is a craigslist scanner that pulls search data from 10-15 regions so it probly should count as 3 by itself) so lets say 15ish self-updating apps.
Please any constructive input is very very welcome
Thanks In Advance Q&A guys-n-gals
~psguardian
I want to change the size of my /data/data ("datadata") partition permanently. I have plenty of space on my HTC Droid Incredible's NAND memory, but too much is allocated toward the /data partition and not enough toward the /data/data partition, so I am always being warned that I'm running low on space for application data (which a quick "df" command confirms is true). I am rooted of course and am hoping there's a way to manually redistribute the space; is there?
I purposely posted this question in general Android "hacking" because this question doesn't seem to be addressed anywhere on the internet, and I know this answer could benefit users of all phones, not just the Incredible.
Thanks a million in advance!
I too am looking into this. The stupid notification is extremely irritating.
I am also looking for a way to resize my /data partition. I have a rooted HTC Desire with Android 2.2.
Moving data partition to the SD card
Not quite what you're looking for, but can accomplish what you want. If you have a fast card, it improves performance as well.
Haven't posted enough to post a direct link, sorry:
forum.sdx-developers.com/moment-2-2-development/data-partition-on-sdcard-eliminate-lag
wolfclan68 said:
Not quite what you're looking for, but can accomplish what you want. If you have a fast card, it improves performance as well.
Haven't posted enough to post a direct link, sorry:
forum.sdx-developers.com/moment-2-2-development/data-partition-on-sdcard-eliminate-lag
Click to expand...
Click to collapse
Great, thanks a lot!
I know this issue has been more or less beat to death, trust me one google search proves that. and after 2 1/2 days searching and researching I have come up with an idea to rid us of this limited application space problem once and for all. At this point I am stuck realizing that android doesn't use an fstab file like any ol' standard linux install....so what's the android equivalent?
a little explaination....
I came across a solution used on another phone where via a custom rom someone was able simply hardlink /data/app, /system/media, etc... to a copy stored on a ext2/3/4 partition on the sd card, I guessed roughly 2~3 gb of space would be sufficient. I created the partition, copied the folders, and just before I was going to start hardlinking things, I realized I had to manually mount the ext2 partition, it wasn't done automatically, and therefore won't be done at boot. So...this is where I'm stuck. if I could figure out how to get the ext2 partition to mount at boot then problem solved
Any thoughts, suggestions, ideas, etc would be appreciated. I apologize in advance if I may have missed something someone may seem as "obvious"....I've been at this for over 2 days reading more webpages than I care to recount and quite frankly my brain is fried.....so please keep the "flaming" to a minimum...
dude just overwrite the FOTA files and it will free up 250mb.
Are you sure you searched these forums? It's in the dev section.
did the fota fix, got about 290mb free (already done before I posted this). call me greedy but ~300 mb just seems not quite enough.....my solution sounds simple enough if I could only fix that blasted mount on boot issue....
as for searching, I apologize but I viewed so many pages yesterday that I couldn't possibly list them all, but fota was one of them and already done.....I'm looking for a more permanent solution (assuming that ota updates will become available for this phone before it becomes obsolete)
Wouldn't that have to be a script initiated by the kernel? I could be way off, but it seems like thats how they fixed the problem with the G1 app mem issue using cm. You might read on cm+G1. Like the way your thinking though!
Check THIS out. I think it's along the right lines, if it could be ported.
Not sure what you think needs more than a few hundred MB in the "real" mount of /data.
Several ways you can install other apps on the SD card, both native using package manager (pm), as well as using tools like app2sd without a custom kernel and boot sequence.
Hi:
I am a newbie, but I've learned a lot about things using this site and others. Thank you!
I have a rooted LG Volt, which of course has the odious KitKat restrictions on putting apps on SD cards. I've read about mini-tools and have Link2SD (premium, so I can link everything to the SD), but haven't tried it out yet because I wanted to ask some questions first. For reference, I have a 16g (class?) 10 SD card, which I've verified is legit using an app (forgot name).
1) Is there a maximum size for the second (ext) partition? I've read 2g, but other sites have said that there are now no restrictions. 2g is quite small for me since the Volt has very little internal memory, and I download a ton of apps; I don't use as much data. Ideally, I'd like to go half and half (approx. 8/8g data/app partition).
2) If it is limited to 2g, is there any workaround that doesn't require a ton of knowledge? I read something about changing system apps to user apps, but would this work--and is there a noob-friendly walk through?
3) Is there a preferred ext partition type? Again, I've read varied opinions; most say that ext2 is optimal, but others say ext4 might work better with Link2SD.
4) Is there any advantage to using a swap file? Again, varied opinions, but it seems mostly beneficial in terms of speed, and not to a degree that it matters.
I have other questions regarding partition alignment (found a calculator, so I think I can figure out how to optimize the partitions) and will probably have more in the future, but I would really love answers (or else links to answers) about these issues.
Thanks in advance!
anoukaimee said:
Hi:
I am a newbie, but I've learned a lot about things using this site and others. Thank you!
I have a rooted LG Volt, which of course has the odious KitKat restrictions on putting apps on SD cards. I've read about mini-tools and have Link2SD (premium, so I can link everything to the SD), but haven't tried it out yet because I wanted to ask some questions first. For reference, I have a 16g (class?) 10 SD card, which I've verified is legit using an app (forgot name).
1) Is there a maximum size for the second (ext) partition? I've read 2g, but other sites have said that there are now no restrictions. 2g is quite small for me since the Volt has very little internal memory, and I download a ton of apps; I don't use as much data. Ideally, I'd like to go half and half (approx. 8/8g data/app partition).
2) If it is limited to 2g, is there any workaround that doesn't require a ton of knowledge? I read something about changing system apps to user apps, but would this work--and is there a noob-friendly walk through?
3) Is there a preferred ext partition type? Again, I've read varied opinions; most say that ext2 is optimal, but others say ext4 might work better with Link2SD.
4) Is there any advantage to using a swap file? Again, varied opinions, but it seems mostly beneficial in terms of speed, and not to a degree that it matters.
I have other questions regarding partition alignment (found a calculator, so I think I can figure out how to optimize the partitions) and will probably have more in the future, but I would really love answers (or else links to answers) about these issues.
Thanks in advance!
Click to expand...
Click to collapse
First of all, you haven't told us what are you trying to do. If you are just trying to get a few questions anwsered just say so.
From what I see you are trying to use Link2SD because of the kitkat sd card restriction?
Note: Apps can't detect if an SD card is fake. It will just test how fast it is and guess if it's fast engough for it's class
You can remove the KitKat SD restriction with this app: SDFix
1) Yes, there is a restriction but it depends on how it's formated: on ext2 and 3 the limit is 35184 GB on a single partition and ext4 has a max limit of 1152921500 GB.
2) It's not limited to 2GB. Changing system apps to user and user to system is useless and should not be done if you don't know what exactly and why you are doing it. Don't let root fool you. Deleting system apps will NOT give you more free space for all the games.
3) Depends on support. If your phone supports ext4 (and it does) use that if not use lower such as ext3 then 2 and so on.
4) Look at this as a glass and some water. Water is memory to be put in ram and the glass is the ram your phone has.
The more water you put in it, the less space there is. And when it's full it will overflow, and your phone will freeze or reboot.
What swap does is when the water overflows in the glass (the ram gets full), the water (memory) that overflows goes to a swap file instead of it just getting lost and the phone getting frozen.
But remember, any SD card is MUCH SLOWER that RAM and using swap will not give any preformacne improvments.
The swap sould be factory set anyways and it also uses a lot of storage.
You REALLY shouldn't mess with the partitions.
You could break your phone forever.
What I recommend using is FolderMount and GL2SD. FolderMount is exactly like Link2SD, but you don't need to do any fancy partitioning. And GL2SD works great too, the only downside is that you have to run the apps (you moved to SD) from within the app.
Thank you!
Wonderful, clear answers! Yes, just trying to figure out "what to do" so I can add more apps to the Volt in the easiest manner possible. Apologize for not being clearer about that.
Just some follow-up questions:
1) will the app cited above (nextapp) allow me to move apps to the sd, or just data? Never having had an android other than this one with the dread KitKat, I don't know how it typically works after a KitKat fix. So should I format the entire sd card as FAT32 or ext4 (is the latter even possible)? And where will the data that I do have be saved if I don't partition the card? All on the one partition?
2. RE: FolderMount and GL2SD: that sounds great. The one concern that I have is that Link2SD's support (I THINK that's where I found this) said that the problem with putting an app on an sd card versus linking it is that if you take the sd card out, all of the apps will be gone. Is that just incorrect?
Thanks again! Very helpful.