here is an init.d script to optimize your ext4 partitions
thanks to crackpot for the original script, all i did was change the values to optimize performance
this has been tested and does improve performance
go inside tar and extract s99 file put into init.d folder /system/etc/init.d
dsexton702 said:
because im not professional with kernels raver or drhonk will have to install this on the kernel, but for those who have ext4 on all partitions on GB this mod is definitely for you
"Barriers allow usage of delayed allocations without risk. Delayed allocations are the key to performance for modern filesystems," supercurio.
THIS IS FOR EXPERIENCED PEOPLE WITH ADB
plug the phone in
make sure debug is on
and type the following into your command prompt
adb shell
mount -o remount,barrier=0 /system /system
mount -o remount,barrier=0 /cache /cache
for some reason the kernel only has /data with barriers when all 3 should have them
you will notice your quad go up about 2-300 more
and your performance will be much better
Click to expand...
Click to collapse
the barriers were prob removed to the fact of such little actuall memory on the system and cache partition or they may be looking at shortning the sgs4g cache partition size and when they keis the gingerbread forgot to add the barrier back in. Also note when you barrier the cache you also run the risk of locking downloads to a set size hince why some had issues on frayo with download sizes larger then 30 mb in size also why u dont see that in gb or if you adb shell in frayo
/unmount cache
rmdir cache
mdir cache
then ln the 2 caache files back which removes the limit
Must we ADB this, or can we do this via terminal as well?
Part Four said:
Must we ADB this, or can we do this via terminal as well?
Click to expand...
Click to collapse
i believe terminal is fine as well
Wow! Finally broke 3000!
Sent from my SGH-T959V using Tapatalk
Do we need to do this every (re)boot, or just once?
Thanks, amazing as always dsexton!
It will, but you will have to input out each time you reboot. Also...if you do use terminal to do it, you may need to put the commands in a note pad and copy /paste it. (holds down on the screen to get the paste function) it kept changing barriers to barrIers which is not valid .
Sent from my GS4G using XDA app.
there's an app called script manager, its free. just create new script, place code, save, set to root and to run at boot.
shotchacokov said:
It will, but you will have to input out each time you reboot. Also...if you do use terminal to do it, you may need to put the commands in a note pad and copy /paste it. (holds down on the screen to get the paste function) it kept changing barriers to barrIers which is not valid .
Sent from my GS4G using XDA app.
Click to expand...
Click to collapse
ADB it is then!
Somairotevoli said:
Wow! Finally broke 3000!
Sent from my SGH-T959V using Tapatalk
Click to expand...
Click to collapse
were you OC'd or stock? also, did you cook that battery mod? and are you on the kg4 or kg6 rom?
shotchacokov said:
were you OC'd or stock? also, did you cook that battery mod? and are you on the kg4 or kg6 rom?
Click to expand...
Click to collapse
I'm only managing to get 1200 on Quadrant, with a 1.2ghz OC. I'd love to know what I'm doing wrong...
Would this in any way benefit froyo, specifically audiophile-frayo?
Sent from my SGH-T959V using XDA Premium App
Could you elaborate if you don't mind? I've never used script manager
Somairotevoli said:
there's an app called script manager, its free. just create new script, place code, save, set to root and to run at boot.
Click to expand...
Click to collapse
sent from my Real Gs move in silence like lasagna
I am using KG6 w/ cwm/voodoo/KG4 kernel with lag fix enabled. I'm [email protected] 1.44ghz.
the battery is from
A UOT theme I am working on.
As for script manager, install from market.
Open app and create new script from menu.
Call it what ever you want. Hit ok.
Menu will open asking what to open file with, choose text editor.
Paste this code
Code:
mount -o remount,barrier=1 /system /system
mount -o remount,barrier=1 /cache /cache
Hit menu > close > yes to save
Using the programs built in file browser, locate the script, select it.
Check run as root and run at boot. Hit save.
Either run the script after that or reboot.
Run mount command in terminal and check your mounts.
should see barrier=1 on system, cache, and data.
Sent from my SGH-T959V using Tapatalk
Thank you sir very helpful
sent from my Real Gs move in silence like lasagna
Just a note. You have to decide yourself what you want to achieve in the end: better performance or better data integrity. Enabling barriers (setting barrier=1) reorders journaling in a way so that all data blocks are guaranteed to be written before committing, but it degrades the performance because the system have to wait until writes are done in certain sequence. Data integrity is better as there is less change for the transaction to complete improperly in case the system crashes (like when journal data is written but actual data is not.) On phones the chance of screwing up transactions is quite low, just don't ever remove the battery without shutting down the phone properly.
Quote from mount docs: "...Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance penalty. If your disks are battery-backed in one way or another, disabling barriers may safely improve performance. ..."
Some more readings here for example: lwn.net/Articles/283161/
The way to remount ext4 partitions for best performance should be this:
mount -o remount,noatime,delalloc,noauto_da_alloc,barrier=0
If you want more data safety then enable barriers.
AntonX said:
Just a note. You have to decide yourself what you want to achieve in the end: better performance or better data integrity. Enabling barriers (setting barrier=1) reorders journaling in a way so that all data blocks are guaranteed to be written before committing, but it degrades the performance because the system have to wait until writes are done in certain sequence. Data integrity is better as there is less change for the transaction to complete improperly in case the system crashes (like when journal data is written but actual data is not.) On phones the chance of screwing up transactions is quite low, just don't ever remove the battery without shutting down the phone properly.
Quote from mount docs: "...Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance penalty. If your disks are battery-backed in one way or another, disabling barriers may safely improve performance. ..."
Some more readings here for example: lwn.net/Articles/283161/
The way to remount ext4 partitions for best performance should be this:
mount -o remount,noatime,delalloc,noauto_da_alloc,barrier=0
If you want more data safety then enable barriers.
Click to expand...
Click to collapse
I've modified my init.d script to use these settings, for comparative purposes. Anyone is welcome to try it, assuming your ROM has init.d.
crackpot said:
I've modified my init.d script to use these settings, for comparative purposes. Anyone is welcome to try it, assuming your ROM has init.d.
Click to expand...
Click to collapse
wont work on gb right now because the kernel still doesnt support init.d at the moment
That's odd, it seems to load the mount settings.
Here's output from "mount" via ADB's shell.
Code:
/dev/block/stl9 /system ext4 rw,noatime,barrier=0,data=writeback,noauto_da_alloc
0 0
/dev/block/stl11 /cache ext4 rw,noatime,barrier=0,data=writeback,noauto_da_alloc
0 0
/dev/block/stl10 /data ext4 rw,noatime,barrier=0,data=ordered,noauto_da_alloc 0
0
crackpot said:
That's odd, it seems to load the mount settings.
Here's output from "mount" via ADB's shell.
Code:
/dev/block/stl9 /system ext4 rw,noatime,barrier=0,data=writeback,noauto_da_alloc
0 0
/dev/block/stl11 /cache ext4 rw,noatime,barrier=0,data=writeback,noauto_da_alloc
0 0
/dev/block/stl10 /data ext4 rw,noatime,barrier=0,data=ordered,noauto_da_alloc 0
0
Click to expand...
Click to collapse
it did nothing for me, my mount settings were exactly the same upon every reboot :/
Related
Hi, this is my first time posting on this site and I apologizes if this is in the wrong place. I just recently rooted my evo and was wondering when I want to apply a customization such as a new notification bar how do I know to use either flashing the file from the sd card or to run a command in adb? Is there an important difference, or can either be used? Thanks in advance for the help.
rafroehlich2 said:
Hi, this is my first time posting on this site and I apologizes if this is in the wrong place. I just recently rooted my evo and was wondering when I want to apply a customization such as a new notification bar how do I know to use either flashing the file from the sd card or to run a command in adb? Is there an important difference, or can either be used? Thanks in advance for the help.
Click to expand...
Click to collapse
Most files can be flashed, if they are in a .zip form, you should be okay. However for things like the bootscreens, the recommended method is to use ADB and push the bootanimation.zip file to the specified folder on the phone. However, this has been extremely simplified by user-made tools here on the EVO forums, not many people like using ADB (don't know why)... so there are tools to make it easier for people.
Usually the person that is distributing the file should say whether you need to flash or use ADB commands, just read the OP's post.
Thanks so much for your help.
rafroehlich2 said:
Thanks so much for your help.
Click to expand...
Click to collapse
Sure, no problem!
pseudoremora said:
Most files can be flashed, if they are in a .zip form, you should be okay. However for things like the bootscreens, the recommended method is to use ADB and push the bootanimation.zip file to the specified folder on the phone. However, this has been extremely simplified by user-made tools here on the EVO forums, not many people like using ADB (don't know why)... so there are tools to make it easier for people.
Usually the person that is distributing the file should say whether you need to flash or use ADB commands, just read the OP's post.
Click to expand...
Click to collapse
If I use the flashing method will the files be moved to the correct system folder or will it just deposit it in the ROM? When you use adb you specify the target, if I'm not mistaken. I just don't want my system to get cluttered with random files. Sorry if this isn't worded well.
rafroehlich2 said:
If I use the flashing method will the files be moved to the correct system folder or will it just deposit it in the ROM? When you use adb you specify the target, if I'm not mistaken. I just don't want my system to get cluttered with random files. Sorry if this isn't worded well.
Click to expand...
Click to collapse
When using ADB, the system won't get "cluttered"... mainly because when you're are using the adb push (copy) command, you will be overwriting the file that is currently residing on your phone.
For example, if I wanted to replace my bootanimation -- I would type:
Code:
adb push bootanimation.zip /system/customize/resource
This would copy the new bootanimation.zip over to the directory being specified (/system/customize/resource -- where the bootanimation resides), upon copying, it explicitly overwrites any file/folder with the name "bootanimation" -- unless you set a parameter when typing the command to ask you if it should overwrite. You don't need to worry about this though, almost always you'll overwrite the files.
As long as you push (copy) any and all files to its correct directory, nothing should ever get cluttered and if it does, then you can always remove it just as easily.
pseudoremora said:
When using ADB, the system won't get "cluttered"... mainly because when you're are using the adb push (copy) command, you will be overwriting the file that is currently residing on your phone.
For example, if I wanted to replace my bootanimation -- I would type:
Code:
adb push bootanimation.zip /system/customize/resource
This would copy the new bootanimation.zip over to the directory being specified (/system/customize/resource -- where the bootanimation resides), upon copying, it explicitly overwrites any file/folder with the name "bootanimation" -- unless you set a parameter when typing the command to ask you if it should overwrite. You don't need to worry about this though, almost always you'll overwrite the files.
As long as you push (copy) any and all files to its correct directory, nothing should ever get cluttered and if it does, then you can always remove it just as easily.
Click to expand...
Click to collapse
Thanks for taking the time to answer. I'm new to this and any time I see command line I get hesitant. Thanks again for the thorough answer.
rafroehlich2 said:
Thanks for taking the time to answer. I'm new to this and any time I see command line I get hesitant. Thanks again for the thorough answer.
Click to expand...
Click to collapse
Yup, no problem. I try to usually give a detailed answer, as I'm sure not everyone will understand vague answers.
pseudoremora said:
Yup, no problem. I try to usually give a detailed answer, as I'm sure not everyone will understand vague answers.
Click to expand...
Click to collapse
Since you seem to be knowledgeable what is the difference between flashing a rom by its name.zip as opposed to renaming it update.zip? Does the former start new and the latter maintain all apps/settings?
Sent from my PC36100
rafroehlich2 said:
Since you seem to be knowledgeable what is the difference between flashing a rom by its name.zip as opposed to renaming it update.zip? Does the former start new and the latter maintain all apps/settings?
Sent from my PC36100
Click to expand...
Click to collapse
No difference.
The naming conventions don't mean anything really. There used to be a time when all packages had to be called "update.zip", but the Devs that built the recoveries made it so you could name the .zip files whatever you wanted.
You'll see ROM's/theme's/etc with fancy names -- that's just so its easier for the end user to identify what he/she is actually going to flash.
When I say "update.zip", I just mean that the file can be flashed via recovery and won't require command line/terminal/ADB.
However, there are certain files that will always have a static name (bootanimation.zip) -- that can't change because the phone is programmed to look for that specified file. So whenever someone uploads a bootanimation and calls it: "Nexus-bootanimation.zip" --- this should be renamed to bootanimation before adb pushing or flashing to its specified directory.
Now I understand the idea behind flashing a radio, however I don't understand flashing a kernel. How do I know when to do this and do the risks of radio apply to the kernel? Also, are there any other major components that I'll eventually have to flash? Thanks for answering my many questions.
Sent from my PC36100
rafroehlich2 said:
Now I understand the idea behind flashing a radio, however I don't understand flashing a kernel. How do I know when to do this and do the risks of radio apply to the kernel? Also, are there any other major components that I'll eventually have to flash? Thanks for answering my many questions.
Sent from my PC36100
Click to expand...
Click to collapse
There are risks with both.
Flashing a kernel or radio has the potential to brick your phone. The radio is used for controlling all the "wireless" functions (3G, 4G, x1 connections (texting/calling)) -- pretty much anytime the phone connects to the Sprint towers, the radio is playing its part. So if you flash it incorrectly; the consequences are obvious.
The kernel is the heart of the Android. The kernel itself is actually Linux. Android is built upon Linux, so pretty much Google took the already existing Linux kernel and built Android on top of it (the UI, the apps, etc) and made Android into a Mobile OS, which can run on virtually any platform or device.
How do you know? You don't -- it's a matter of wanting to be curious enough to test. Some devs will put out kernels that overclock your device, others will add different features (screen fixes, loopback interface, underclocking, etc). The kernel controls all the hardware on the phone and how everything functions -- so when devs mess with source code, they are essentially making the hardware function differently for your device.
Some of the major components? -- The biggest ones so far are the wireless driver and 4G driver. When the EVO came out -- the battery life wasn't great; but after the new update (1.47 and the accompanying radio's); battery life on the device have improved significantly and people have experience better WiFi reception and such.
Hope that helps.
pseudoremora said:
There are risks with both.
Flashing a kernel or radio has the potential to brick your phone. The radio is used for controlling all the "wireless" functions (3G, 4G, x1 connections (texting/calling)) -- pretty much anytime the phone connects to the Sprint towers, the radio is playing its part. So if you flash it incorrectly; the consequences are obvious.
The kernel is the heart of the Android. The kernel itself is actually Linux. Android is built upon Linux, so pretty much Google took the already existing Linux kernel and built Android on top of it (the UI, the apps, etc) and made Android into a Mobile OS, which can run on virtually any platform or device.
How do you know? You don't -- it's a matter of wanting to be curious enough to test. Some devs will put out kernels that overclock your device, others will add different features (screen fixes, loopback interface, underclocking, etc). The kernel controls all the hardware on the phone and how everything functions -- so when devs mess with source code, they are essentially making the hardware function differently for your device.
Some of the major components? -- The biggest ones so far are the wireless driver and 4G driver. When the EVO came out -- the battery life wasn't great; but after the new update (1.47 and the accompanying radio's); battery life on the device have improved significantly and people have experience better WiFi reception and such.
Hope that helps.
Click to expand...
Click to collapse
That does help. This is my first time with android and my first time attempting to actually mess with it.
rafroehlich2 said:
That does help. This is my first time with android and my first time attempting to actually mess with it.
Click to expand...
Click to collapse
There will be a lot more "firsts", believe me. Some things will be harder than others; but if you stick with it and actually take the time to learn, you'll realize that working Android can be a helluva lot of fun and unbelievably addictive!
pseudoremora said:
There will be a lot more "firsts", believe me. Some things will be harder than others; but if you stick with it and actually take the time to learn, you'll realize that working Android can be a helluva lot of fun and unbelievably addictive!
Click to expand...
Click to collapse
The bug has already bit me. I appreciate the help. It's nice to know there is a community to get good answers from when needed.
Sent from my PC36100
pseudoremora said:
There will be a lot more "firsts", believe me. Some things will be harder than others; but if you stick with it and actually take the time to learn, you'll realize that working Android can be a helluva lot of fun and unbelievably addictive!
Click to expand...
Click to collapse
Instead of posting a new thread perhaps you can help me on this. When I attempt to use adb to remove a bundled app.
adb shell
cd /system/app
ls
rm app.apk
I get Disk space read only. I have full root and NAND I assume. I used the OTA method and am able to flash custom ROMs. I am using the rooted stock 1.47.651.1
rafroehlich2 said:
Instead of posting a new thread perhaps you can help me on this. When I attempt to use adb to remove a bundled app.
adb shell
cd /system/app
ls
rm app.apk
I get Disk space read only. I have full root and NAND I assume. I used the OTA method and am able to flash custom ROMs. I am using the rooted stock 1.47.651.1
Click to expand...
Click to collapse
When a "read-only" message is returned, it usually means that you don't have RW (read-write access), to circumvent this, run this command:
Code:
adb remount -- Should always be run if you plan on changing something that requires RW access
Then:
adb shell
cd /system/app
ls
rm app.apk
If for some reason you get a error message with adb remount (most likely due to permissions), then you'll need to use the full "remount" command, for that, run:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
Hope that helps.
pseudoremora said:
When a "read-only" message is returned, it usually means that you don't have RW (read-write access), to circumvent this, run this command:
Code:
adb remount -- Should always be run if you plan on changing something that requires RW access
Then:
adb shell
cd /system/app
ls
rm app.apk
If for some reason you get a error message with adb remount (most likely due to permissions), then you'll need to use the full "remount" command, for that, run:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
Hope that helps.
Click to expand...
Click to collapse
I tried your method, but I get another error. It looks like:
Code:
mac-mini:~ rafroehlich2$ adb remount
remount failed: Operation not permitted
mac-mini:~ rafroehlich2$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount: exec /usr/sbin/mount_yaffs2 for /System: No such file or directory
Is there a preventable reason
Code:
adb remount
fails? Thanks for the help.
rafroehlich2 said:
I tried your method, but I get another error. It looks like:
Code:
mac-mini:~ rafroehlich2$ adb remount
remount failed: Operation not permitted
mac-mini:~ rafroehlich2$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount: exec /usr/sbin/mount_yaffs2 for /System: No such file or directory
Is there a preventable reason
Code:
adb remount
fails? Thanks for the help.
Click to expand...
Click to collapse
I figured you might have trouble with the ADB remount -- again, this is usually due to permissions. For testing purposes, try booting into recovery and then issuing the adb remount command.
In regards to the full remount command -- I'm wondering if you have busybox (it contains all the Linux command line tools) so that you can run the above commands.
Can you issue and then paste the output back here?:
Code:
cat /proc/mounts
Also, run this:
Code:
adb shell
cd /system/xbin
ls
If you can see a huge list of files -- then that means you do in fact have Busybox installed.
Also, what ROM are you running?
pseudoremora said:
I figured you might have trouble with the ADB remount -- again, this is usually due to permissions. For testing purposes, try booting into recovery and then issuing the adb remount command.
In regards to the full remount command -- I'm wondering if you have busybox (it contains all the Linux command line tools) so that you can run the above commands.
Can you issue and then paste the output back here?:
Code:
cat /proc/mounts
Also, run this:
Code:
adb shell
cd /system/xbin
ls
If you can see a huge list of files -- then that means you do in fact have Busybox installed.
Also, what ROM are you running?
Click to expand...
Click to collapse
After
Code:
cat /proc/mounts
Code:
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock4 /system yaffs2 ro 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
tmpfs /app-cache tmpfs rw,size=8192k 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Code:
mac-mini:~ rafroehlich2$ adb shell
$ cd /system/xbin
$ ls
wireless_modem
dnsmasq
su
I download the BusyBox app to keep it up to date and also installed it through the "problems" section on titanium backup. However, that's all I got.
The ROM I am using is the fully rooted stock RUU. I'd post a link, but am not sure if I'm allowed to yet. It is the one posted by whitslack.
Hey guys!
Together with some others at android-hilfe.de I'm working on an overlay filesystem for the Desire.
We've chosen aufs (Another Unionfs) to implement our idea.
Basically, two filesystems are combined to a single one.
The first filesystem contains the initial data. The second one is used to overlap it.
Aufs first searches the second for files, then the first. We plan to use a fully writeable filesystem for the second and a secured filesystem for the first.
If you want to modify a file on the first partition, you can put it on the second filesystem and change it there.
So we can get indirect write access to the secured filesystem by mounting the aufs partition to the right path so that the system sees it as the original, secured filesystem.
In theory, a full r/w acces to the all partions on the phone could be possible.
Visit the project site for files and instructions.
that is actually a pretty good idea... and would be awesome if it could be implemented i have no experience in android development and would therefore not be at much help there, but i could help you with testing, as i don't use my phone for any important stuff
antweb said:
Hey guys!
Together with some guys at android-hilfe.de I'm working on an overlay filesystem for the Desire.
We've chosen aufs (Another Unionfs) to implement our idea.
.......
We still could use some help, as for now we are only 2 active developers.
Click to expand...
Click to collapse
Nice thought. Wish i could help
Great idea, and it seems it should work and will obviate the need for a eng-SPL.
Have you tried it ? You seem to have all the necessary bits (you don't really need the utils) so i'm not sure what else you need at this point. This should work with adb in normal mode (ie not recovery) as you should be able to remount the system ontop of itself like so:
adb shell
first to get to your desire root shell. Then do
insmod aufs2
Then create some persistent storage on your sdcard
mkdir /sdcard/sysrw
Then mount the dir
mount -t aufs -o br=/sdcard/sysrw=rw:/system=ro none /system
you should now be able to write to /system, so try doing a
touch /system/foo
If that works, you should be away.
Clearly your modules you provide above will be specific to a certain kernel and with so many ROMS out there i can't say it will work with the one i have so you can try and report back.
Putting the persistent storage on the sdcard means that when it is mounted via usb you will loose access to it and bad things will happen.
Also remember if this works you need to add this to your init scripts
daveba said:
mount -t aufs -o br=/sdcard/sysrw=rw:/system=ro none /system
Click to expand...
Click to collapse
This step fails. All I get is
Code:
mount: No such Device
daveba said:
Clearly your modules you provide above will be specific to a certain kernel and with so many ROMS out there i can't say it will work with the one i have so you can try and report back.
Click to expand...
Click to collapse
Every ROM (with a custom kernel) will need some kernel patches anyways as otherwise many simbols are missing (and sure some other stuff, no clue what the aufs kernel patches do in detail). The attachements include a patched stock kernel. To try it out, you'll have to install the included kernel.
daveba said:
Also remember if this works you need to add this to your init scripts
Click to expand...
Click to collapse
Yep, thats the next step after I get a successful mount.
antweb said:
This step fails. All I get is
Code:
mount: No such Device
Click to expand...
Click to collapse
So it looks like the mount command doesn't accept 'none' as a non-device argument perhaps which i find strange since /proc is one of those also. Are you getting any messages from 'dmesg' or 'logcat' ?
My basic question:
If we use more and more the SD card, i believe we will drain more and more battery.
Apps2sd, system2sd etc
Or it is not draining more battery the extended sd usage?
billias said:
My basic question:
If we use more and more the SD card, i believe we will drain more and more battery.
Apps2sd, system2sd etc
Or it is not draining more battery the extended sd usage?
Click to expand...
Click to collapse
Not much stuff gets written to /system constantly. Just a few changes so you shouldn't see much of a drain.
Ok, so it looks like this actually works. You can't put the rw partition on a VFAT sdcard partiton only. SO in theory if you make a ext{123} partition on your sdcard it should work. For now i tried with the writeable mtd /data partition on my CM nightly and all works. Look:
Code:
adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo
A writeable /system !!!
And here is the real data on /data/rw
Code:
ls -l /data/rw/
-rw-rw-rw- 1 root root 0 Aug 8 20:30 foo
In theory Metamorph, adblock and all the rest that require /system should now work as expected.
daveba said:
Ok, so it looks like this actually works. You can't put the rw partition on a VFAT sdcard partiton only. SO in theory if you make a ext{123} partition on your sdcard it should work. For now i tried with the writeable mtd /data partition on my CM nightly and all works. Look:
Code:
adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo
A writeable /system !!!
And here is the real data on /data/rw
Code:
ls -l /data/rw/
-rw-rw-rw- 1 root root 0 Aug 8 20:30 foo
In theory Metamorph, adblock and all the rest that require /system should now work as expected.
Click to expand...
Click to collapse
could you try metamorph?
finally....
Nice work!! :O
Edit: Ok I tried this but metamorph still gives me an error when trying to set it up.
daveba said:
Code:
adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo
Click to expand...
Click to collapse
cTrox said:
Nice work!! :O
Edit: Ok I tried this but metamorph still gives me an error when trying to set it up.
Click to expand...
Click to collapse
Really ? I just tried it and it worked fine for me...
Could anyone give a step by step guide on doing this?
daveba said:
Really ? I just tried it and it worked fine for me...
Click to expand...
Click to collapse
Oh I just saw, that metamorph is giving me an error because I havn't got enough free space in /system. How much do I need? I have 20MB free.
Ireas said:
Could anyone give a step by step guide on doing this?
Click to expand...
Click to collapse
+1 I'm very interested on this
cTrox said:
Oh I just saw, that metamorph is giving me an error because I havn't got enough free space in /system. How much do I need? I have 20MB free.
Click to expand...
Click to collapse
Where did you put the writeable partition on ? Ensure it has enough space. I'm not sure exactly what checks metamorph does when it runs but it definetly succeeded for me.
shawe_ewahs said:
+1 I'm very interested on this
Click to expand...
Click to collapse
It's exactly as i wrote in the previous page.
You'll need to ROM to have the aufs overlay 'filesystem' built in or as a module. If you're on CM6 you're lucky as it has it builtin (i was suprised it loaded when i did the modprobe myself as i didn't think it was included).
You should see a aufs.ko if it's built in as a module. Try running a jar/grep on your ROM of choice to see if it's included
Code:
jar tvf RoufianosV6.zip |grep aufs
gives no output, but
Code:
jar tvf cm_bravo-08082010-104323.zip |grep aufs
169400 Fri Feb 29 02:33:46 GST 2008 system/lib/modules/2.6.34.2-cyanogenmod/kernel/fs/aufs/aufs.ko
does.
You can do the steps described earlier (via adb) when your desire is fully booted as it doesn't require it at recovery only.
This needs to be pushed out to rom creators as it needs to be included in the startup scripts or else the next time you reboot your desire you'll lose all changes you made while the overlay was active.
daveba said:
This needs to be pushed out to rom creators as it needs to be included in the startup scripts or else the next time you reboot your desire you'll lose all changes you made while the overlay was active.
Click to expand...
Click to collapse
Oh that's why it didn't work I thought I might have to reboot the device to get access
Thanx guys ! Someone tested on 2.2
Sent from my HTC Desire using XDA App
Apparently this is suppose to improve performance but I dont know how to do it.
If anyone could figure out let me know!
http://forum.xda-developers.com/showthread.php?t=876069&page=3
I have tried the commands in terminal, and adb. Bothing using su and then entering the commands. Nothing has worked!
EDIT: Oops I didn't mean to put this in themes and apps. If someone could move it?
Barrier
I tried this last week with no luck as well is it useful for our phones ??
Dsexton got it to work for his phone and he is getting faster speeds.
Ok update if you use terminal emulator in root you can enable and disable barriers plus apply this tweak it is however already set up in the bali 2.1 uv kernel i believe enter mount in the terminal and read the results i am by no means a dev but have self taught minor ubunt experience learn by doing type stuff
Sent from my SGH-T959V using Tapatalk
Can you give me the steps you've tried to get it to work?
barriers
I downloaded the terminal emulator from the market then after it was installed I opened it and typed in the following
su <enter>
mount <enter>
From that point it should list all the mount information look at the data line in there it will list / data ext4 rw,relatime,barrier=1,data=ordered,noauto_da_alloc 0 0 /
then type the string in the post you were looking at and then
mount <enter>
read the string again
then to set barrier to 0
mount -o remount,barrier=0 /data /data
mount <enter>
barrier is now =0
no performance gains but it mat be more involved to get gains not sure I hope this helps a bit
Check your quadrant scores they should of went up.
Eric-1987 said:
Check your quadrant scores they should of went up.
Click to expand...
Click to collapse
were you able to get this working? i am a bit confused by his post.
edit: i figured it out. I was able to make a simple script to apply at boot.
Code:
mount -o remount,rw,nosuid,nodev,noatime,nodiratime,barrier=0,data=ordered,noauto_da_alloc /dev/block/stl10 /data
so far so good
Sent from my SGH-T959V using Tapatalk
I'll try that when I can do it with GB. Its a pain to get back to my old KD1 deodexed rom right now.
Mounts2SD - Storage & Memory Management
The Opening Post (OP) has been moved to a new DevDB Section
This Thread has been assigned as an Q&A.
You should see a new pane above where you can navigate this project.
About dalvik-cache? It remains in phone memory?
Hi I cant understand How to use it ! any guide ?!
denzel09 said:
About dalvik-cache? It remains in phone memory?
Click to expand...
Click to collapse
dalvik-cache remains, so does all of the app related data. Only the APK's is moved.
Taki2011 said:
Hi I cant understand How to use it ! any guide ?!
Click to expand...
Click to collapse
First of all you need a custom rom. If you have a stock rom it will not work since you need a rom that will allow custom scripts during boot.
You will also need to know how to use ADB (An android tool for communicating with your phone. It is used to enter the android shell and also to transfer files to and from the phone, among other things).
And last, you will need at least 2 or 3 partitions on your sdcard (Otherwise it's a waste of time, although the script is build to adapt for these scenarios). One as a regular fat32 sdcard partition, one for the sd-ext and one for the cache. (Use ext2 for the last two. ext3 will eat your card to fast)
Here is the steps (You need to have ADB working on your computer).
Copy/Paste the script content into a file editor and safe the file with the name "99mounts2sd"
Plug your phone to your computer using a usb cable (Select charge only on your phone))
Open a terminal on your computer (In windows use "run" and type "cmd")
Type in shell: "adb shell mount -o remount,rw /system"
Type in shell: "adb push <path to script> /system/etc/init.d/"
Type in shell: "adb shell chmod a+x /system/etc/init.d/99mounts2sd"
Reboot your phone
The first time you boot your phone using the script it will take some time, because the script needs to copy all of your APK's from internal storage to the sd-ext partition.
The script has been rewritten. Better checks and more options has been added.
Great script
Sent from my GT-S5570 using Tapatalk
It didn't work for me, I made the files made sure they were in the right place and rebooted but booted normally. No delay on first boot and still seems to not be using the other two partitions on my sd card. i used cwm4 to partiton my SD card and it is partitioned correctly (3 partitons). I see the script says "log" I don't know where the log is stored or how to view it. Thanks.
To see the log, type in the terminal: "logcat | grep mounts2sd". Download a terminal or use ADB.
Also run the command "df -h" to see what is mounted where.
Sent from my HTC Desire using xda premium
thanks for the share.
#7 @dyehya
It seams that logcat has a very limited lifetime. In order to get the log info, you would have to get it during boot.
Instead I have updated the script to do this itself. Update your script and config file content with the new above code.
In the config file set VAR_DEBUG="yes" and reboot your phone. Now enter a terminal and type "cat /var/mounts2sd.log | grep mounts2sd" which will show you all the messages from the script, and possible errors, if any.
I am not sure what is going on in boot. I just saw your replies and haven't had a chance to update the script and mess with the phone. I do know that when I was playing with it before it kept using the busybox minimal that was in the kernel loaded in sbin I tried copying your version of busybox into bin and xbin (and now reverted back) but it would still use the one in sbin. What I would really like to do and would recommend is you design the script where you can put busybox in a certain location and the script will use that version over any other versions. I am still learning with all this and despite being able to create the files throw them in the correct places I don't know the code well enough to do this myself. Thanks again for all your help.
Ok i have changed the script so that it now forces the usage of /system/xbin/busybox or /system/bin/busybox and ignores /sbin/busybox
Place a full busybox version in one of the system bin folders, update the script and see what happends.
Otherwise paste a copy of "df -h" and "cat /data/mounts2sd.log | grep mounts2sd" here so that I can see what it does during boot.
Thanks for this. Just flashed the ICS beta 0.1 with your a2sd embedded. Just a suggestion, I added $CMD_CHMOD 777 $CMD_BUSYBOX at line 260, just after the affectation of CMD_BUSYBOX.
For now, it seems to work very well !
virus2013 said:
Thanks for this. Just flashed the ICS beta 0.1 with your a2sd embedded. Just a suggestion, I added $CMD_CHMOD 777 $CMD_BUSYBOX at line 260, just after the affectation of CMD_BUSYBOX.
For now, it seems to work very well !
Click to expand...
Click to collapse
That I don't get? $CMD_CHMOD is undefined at line 260 and why use busybox to change permissions on itself?
dk_zero-cool said:
That I don't get? $CMD_CHMOD is undefined at line 260 and why use busybox to change permissions on itself?
Click to expand...
Click to collapse
Sorry, I'm tired... :-\
In fact, I just wanna be sure that the busybox in /system/bin was executable as I pushed it into the rom zip. And as chmod was already used upper, I was thinking it could be a good idea. However, I'm not a script writer! ;-)
Sent from my Desire running ICS
Hello Cool,
trying ICS with your script. Here is the output of logcat an df -h command:
Code:
# cat /data/mounts2sd.log | grep mounts2sd
cat /data/mounts2sd.log | grep mounts2sd
12-14 13:05:12.905 V/mounts2sd( 96): Initiating Mounts2SD (v:1.1.1)...
12-14 13:05:12.985 V/mounts2sd( 101): Including configuration file...
12-14 13:05:14.897 V/mounts2sd( 212): Searching for sdcard...
12-14 13:05:15.277 V/mounts2sd( 231): Searching for sd-ext partition (/dev/block/mmcblk0p2)...
12-14 13:05:16.198 V/mounts2sd( 254): sd-ext partition was mounted successfully...
12-14 13:05:16.728 V/mounts2sd( 278): Moving /data/app to /sd-ext/app...
12-14 13:05:17.049 V/mounts2sd( 297): Moving /data/app-private to /sd-ext/app-private...
12-14 13:05:17.209 V/mounts2sd( 305): Searching for the sd-cache partition (/dev/block/mmcblk0p3)...
12-14 13:05:18.050 V/mounts2sd( 326): sd-cache was mounted successfully...
12-14 13:05:18.280 V/mounts2sd( 335): A device is already mounted at /cache. Umounting it...
12-14 13:05:18.420 V/mounts2sd( 341): Moving /cache to /sd-cache...
12-14 13:05:18.440 V/mounts2sd( 342): Done!
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 202.9M 32.0K 202.9M 0% /dev
tmpfs 202.9M 0 202.9M 0% /mnt/asec
tmpfs 202.9M 0 202.9M 0% /mnt/obb
/dev/block/mtdblock3 250.0M 165.0M 85.0M 66% /system
/dev/block/mtdblock5 147.6M 62.4M 85.2M 42% /data
/dev/block/mmcblk0p2 960.7M 1.2M 959.4M 0% /sd-ext
/dev/block/mmcblk0p2 960.7M 1.2M 959.4M 0% /data/app
/dev/block/mmcblk0p2 960.7M 1.2M 959.4M 0% /data/app-private
/dev/block/mmcblk0p3 295.9M 168.0K 295.8M 0% /sd-cache
/dev/block/mmcblk0p3 295.9M 168.0K 295.8M 0% /cache
/dev/block/vold/179:1
6.2G 4.6G 1.6G 75% /mnt/sdcard
/dev/block/vold/179:1
6.2G 4.6G 1.6G 75% /mnt/secure/asec
This looks good, can you please confirm?
Also, why is /data not on ext partition but on phone memory?
Thanks for the script though!
Cheers, keep up the good work.
jukyO said:
This looks good, can you please confirm?
Also, why is /data not on ext partition but on phone memory?
Thanks for the script though!
Cheers, keep up the good work.
Click to expand...
Click to collapse
That looks as it should.
The whole /data is not moved to the /sd-ext for that simple reason that there are no hboot out there with 0mb /data.
I have options in my script to move both the .apk files (The applications) and the dalvik-cache which are the biggest things in the /data partition. If I moved everything to sd-ext, there would be nothing using the remaining space available on the internal data which is a waste of good space. It's like having an extra room in your house that is not used for anything at all. If we have to have it, we might as well use it
BTW:
You don't have dalvik-cache aktivated. So if you ever need more space on /data, activate it in /system/etc/mounts2sd.conf
dk_zero-cool said:
BTW:
You don't have dalvik-cache aktivated. So if you ever need more space on /data, activate it in /system/etc/mounts2sd.conf
Click to expand...
Click to collapse
Could you provide an example mounts2sd.conf file, so that all settings could be established at first boot. This would make it much easier when updating ROMS.
uzi2 said:
Could you provide an example mounts2sd.conf file, so that all settings could be established at first boot. This would make it much easier when updating ROMS.
Click to expand...
Click to collapse
You don't need a .conf file now - it's not used. You simply install the zip and then use the m2sd commands in terminal to make changes (see instructions in OP - type m2sd help for more info)
uzi2 said:
Could you provide an example mounts2sd.conf file, so that all settings could be established at first boot. This would make it much easier when updating ROMS.
Click to expand...
Click to collapse
The config files is deprecated and replaced with the "m2sd" command, as said above. Settings is saved to /data/.m2sd which means that it keeps your settings when you flash new ROM's as long as you don't wipe data.
Getting the Most Out of Your Nexus 7
Jay's Recipe for Buttery Goodness
for Android 4.1.2/4.2/4.2.1
What we're going to do here is remount /data and /cache with discard and noauto_da_alloc, disable fsync, enable a 128mb zRAM and setup a good, stable starting point for further modification. The result is a stable, considerably smoother multitasking powerhouse with overall better power management and performance.
This recipe will work on pretty much any 4.1.2 ROM, and instructions are given for stock-based (with and without init.d support) and CM-based ROMs. If you have any questions, comments, or suggestions, please leave them below. I'll be happy to address whatever I can in a timely manner
[Common] Determining which script to use:
Download: SecretSauce4.1.2.zip - Contains 4 scripts. Unzip and choose which one you want
This all depends on how much you multitask (how many different things you do at once). If you usually have 4 or 5 apps open that you switch between regularly, then you do a moderate amount of multitasking, and would choose the 256mb script. If you tend to do only one thing at a time, you may decide to save the RAM and run with no zRAM. That's fine, too (I've even got a script for that, it's a favorite among gamers ). If you feel you fall somewhere in between, there are 64mb and 128mb scripts, as well.
If in doubt, try each for a day or two. Decide for yourself (and let me know what you find). Feel free to modify the script to suit you. If you don't understand anything in there, don't worry about it. It's set up pretty well as-is, and the defaults should suit you fine.
Please read this post to help you decide which script to install
[Common] To init.d or not to init.d:
If you run a custom ROM that supports /system/etc/init.d/ (and sometimes even /data/local/userinit.d), then you definitely want to go the init.d route, as it's pretty much bulletproof and needs virtually no resources to operate - it's built-in to the system.
If your ROM is stock-based, it probably doesn't support init.d - but it might. Ask the developer of your ROM if it has init.d support (and then let me know ). This recipe can be done on stock with init.d support! I include a link to a stock 4.1.2 kernel with init.d support in the ramdisk that you can flash before the M-Kernel Plus. Then just create /system/etc/init.d, chmod it 0755, and drop your script in there.
If your ROM is CyanogenMod (CM) based, then not only does it have init.d support, it has userinit.d support, which is great because it persists between dirty flashes. userinit.d is a directory you create in /data/local and chmod 0755. Any script you put in there (chmod 0755) will be run as it would were it in /system/etc/init.d
If you're completely stock but rooted (hey, it happens), and you want the buttery goodness but you don't want to flash a kernel - don't fret! I've even included a way for you to get what you can from the recipe! You'll be using an app called Script Manager (it's free, but you can donate, too. It's totally worth it) to autoload the script at boot-time. A couple of extra steps, but absolutely no mucking around under the hood
Personally, whether I'm on stock or something CM-based, I prefer having init.d (and userinit.d) support, as like I said, it's pretty much bulletproof and requires no extra resources. I, myself, run ParanoidAndroid 2.23, which is CM-based. It's the best-running, sturdiest, most usefully customized ROM I have ever used on any device, and I can't recommend it enough. Team Paranoid Android is top-notch!
...Now that you've decided on, flashed, setup and customized a ROM (or maybe you stayed stocked)...
BEYOND THIS POINT, THERE BE DRAGONS!
I'm not responsible if you FUBAR your device. But, if you follow my directions and pay attention to what you're doing, you won't.This tutorial assumes basic knowledge of the Android operating system, related terminology, and the most basic of Linux understanding. Any term I use in this guide can be quickly and easily Googled.
[Stock, rooted, no init.d] Installing the Special Sauce script and Script Manager:
* Open the Play Store and get the Stericson's Busybox Installer and install it
* Run the program, let it boot up and figure out what's where (takes a bit)
* Install Busybox 1.20.2 to /system/xbin
* Create /sdcard/scriptinit.d
* Copy the script you decided on into /sdcard/scriptinit.d
* Open the Play Store and get Script Manager and install it
* Run Script Manager, find your script, load it up, click the little root icon, and set it to run at boot
* Close Script Manager
* Skip to [Common (except CM-based)] Install M-Kernel Plus
[Stock, has init.d] Installing the Special Sauce script:
* Open the Play Store and get the Stericson's Busybox Installer and install it
* Run the program, let it boot up and figure out what's where (takes a bit)
* Install Busybox 1.20.2 to /system/xbin
* Copy the script you decided on into /system/etc/init.d/ and chmod it 0755
* Skip to [Common (except CM-based)] Install M-Kernel Plus
[Stock, needs init.d] Installing the Special Sauce script and creating init.d:
Download:Nexus7Stock_Insecure_InitD_4.1.2.zip by Metallice
* Reboot into recovery
* Flash Nexus7Stock_Insecure_InitD_4.1.2.zip
* Go to advanced and fix permissions
* Go back and reboot system
* Open the Play Store and get the Stericson's Busybox Installer and install it
* Run the program, let it boot up and figure out what's where (takes a bit)
* Install Busybox 1.20.2 to /system/xbin
* If /system/etc/init.d/ does not exist, create it, and make sure it's chmod 0755
* Copy the script you decided on into /system/etc/init.d/ and chmod it 0755
* Skip to [Common (except CM-based)] Install M-Kernel Plus
[CM-Based] Installing the ramdisk, M-Kernel Plus and Special Sauce script:
CM really should have busybox. If it doesn't, install it.
Download: Nexus7_CM10_PA22_4.1.2_complete.zip
and
the M-Kernel Plus of your choice from Metallice's M-Kernel Classic/Plus thread
* Reboot into recovery
* Flash Nexus7_CM10_PA22_4.1.2_complete.zip
* Go to advanced and fix permissions
* Go back and flash the M-Kernel Plus you downloaded
* Go to advanced and fix permissions again
* Go back and reboot system
* If /data/local/userinit.d/ does not exist, create it and chmod it 0755
* Copy the script you decided on into /data/local/userinit.d/ and chmod it 0755
* Skip to [Common] Verifying Installation
[Common (except CM-based)] Install M-Kernel Plus
Download: the M-Kernel Plus of your choice from Metallice's M-Kernel Classic/Plus thread
* Reboot into recovery
* Flash M-Kernel_alpha1_446GPU.zip
* Go into advanced and fix permissions
* Go back and reboot system
* Profit - You're done!
[Common] Verifying Installation
Pretty easy to verify if it's working. First off, it'll be really fast and snappy! Second, if you're using zRAM, you can open a terminal or adb shell from your PC and
free
The last line it outputs will be for swap (this is actually your compressed zRAM). For total and free, there should be numbers. If there are, then you have a page file and it's working.
Finally, you can open a terminal or adb shell from your PC and
mount | grep discard
It should output 2 lines, one for /data and one for /cache. That means it's working.
[Common] Further Optimization:
I recommend the Play Store app System Tuner for further customization. The customizations I recommend are
* Undervolt the entire system by -50mV
* Try that for a day or two and then try another -25mV
* If you end up stable at -75mV, leave it be. That's a good unvervolt
* CPU Governor should be set to either interactive or ondemand, unless you're a hardcore gamer, in which case you might want to use performance
* CPU Frequencies can be set. I use 100-1300. Use whatever floats your boat
* I/O Scheduler can be specified. I recommend deadline in every situation, as it's specially modified by _motley
* Go to Boot Settings from any of those screens, and save cpu and sd via the 'on boot complete' or init.d method (if you chose not to implement init.d, choose upon boot completion).
* Back out of System Tuner and reboot
* Profit
Feel free to take it from there, and post your experiences here
Just In Case
Update 11/10/2012
If you are using kernel a6 or better, you don't need to flash any other kernel or ramdisk zip first. Starting with a6, Metallice compiles his own universally-compatible ramdisk.
I'll try it, Thank you. Your 4.1.1 recipe was awesome
I loved your guide for 4.1.1. Thank you very much for updating it to 4.1.2
Thanks for the guide
Btw my swap says 0 in every one, I am using the 128mb script, shouldn't be 128 in swap?
I can confirm swap is 0. The funny thing is that mkswap and swapon actually work at boot, I can see from dmesg, but swap gets disabled by something. If you just run swapon again, it activates and stays.
Sent from my Nexus 7 using xda app-developers app
kzakhar said:
I can confirm swap is 0. The funny thing is that mkswap and swapon actually work at boot, I can see from dmesg, but swap gets disabled by something. If you just run swapon again, it activates and stays.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Ditto here - even tried renaming to S90SecretSauce128 - PA 2.23
sizanx said:
Thanks for the guide
Btw my swap says 0 in every one, I am using the 128mb script, shouldn't be 128 in swap?
Click to expand...
Click to collapse
kzakhar said:
I can confirm swap is 0. The funny thing is that mkswap and swapon actually work at boot, I can see from dmesg, but swap gets disabled by something. If you just run swapon again, it activates and stays.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Ryan Kasper said:
Ditto here - even tried renaming to S90SecretSauce128 - PA 2.23
Click to expand...
Click to collapse
Can you guys confirm whether the script is running at all? What are the results of
mount | grep discard
?
Not so sure zram is worth the loss of actual ram.
Maybe a swap partition would be more useful, although is that worth potential damage to the internal SD.
With the S3 you can set it to use the external storage so if that gets damaged from too many read/write operations an sdcard is cheap to replace.
Unfortunately we don't have that option with the N7.
Not trying to be negative, just throwing out some ideas to see what you think.
256mb+ swap partition on internal SD?
Sent from my GT-I9300 using xda premium
nodstuff said:
Not so sure zram is worth the loss of actual ram.
Maybe a swap partition would be more useful, although is that worth potential damage to the internal SD.
With the S3 you can set it to use the external storage so if that gets damaged from too many read/write operations an sdcard is cheap to replace.
Unfortunately we don't have that option with the N7.
Not trying to be negative, just throwing out some ideas to see what you think.
256mb+ swap partition on internal SD?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
It's worth it if you do a fair amount of multitasking. I have mine set at 128, but if I'm gonna be doing heavy gaming, I'll disable it, temporarily. Haven't run into any memory issues.
Jay Aristide said:
It's worth it if you do a fair amount of multitasking. I have mine set at 128, but if I'm gonna be doing heavy gaming, I'll disable it, temporarily. Haven't run into any memory issues.
Click to expand...
Click to collapse
But isn't that zram, which is basically taking some normal ram and compressing it and using it as swap?
Would it make sense to leave normal ram as is and to make a swap partition on the internal SD and have 1gb of ram, plus whatever size you make the swap partition.
I know it would be slightly slower than zram but we would end up with over 1gb of usable 'ram'
The only downside is the potential damage to the SD card which is why using zram is safer, but the downside to zram is loss of some normal ram.
There's pro's and con's to both really.
Sent from my GT-I9300 using xda premium
Jay Aristide said:
Can you guys confirm whether the script is running at all? What are the results of
mount | grep discard
?
Click to expand...
Click to collapse
Here you go.
Code:
[email protected]:/ $ mount | grep discard
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
[email protected]d:/ $
sizanx said:
Here you go.
Code:
[email protected]:/ $ mount | grep discard
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
[email protected]:/ $
Click to expand...
Click to collapse
Okay, do me a favor and reboot your tablet. Once it's up and going, do
uname -a ; free ; mount | grep discard
And tell me the results
Jay Aristide said:
Can you guys confirm whether the script is running at all? What are the results of
mount | grep discard
?
Click to expand...
Click to collapse
Code:
mount | grep discard
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
nodstuff said:
But isn't that zram, which is basically taking some normal ram and compressing it and using it as swap?
Would it make sense to leave normal ram as is and to make a swap partition on the internal SD and have 1gb of ram, plus whatever size you make the swap partition.
I know it would be slightly slower than zram but we would end up with over 1gb of usable 'ram'
The only downside is the potential damage to the SD card which is why using zram is safer, but the downside to zram is loss of some normal ram.
There's pro's and con's to both really.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Well, the point of it is to improve performance while multitasking by storing the page file in memory. I've played around with nand swap on other devices, and I've never been impressed with it on Android, whereas app-switching is noticeably snappier using zRam.
Either way, there's a no zRam version, and 3 different sizes to choose from, so just find what works for you and lemme how what you settled on
Jay Aristide said:
Okay, do me a favor and reboot your tablet. Once it's up and going, do
uname -a ; free ; mount | grep discard
And tell me the results
Click to expand...
Click to collapse
Code:
uname -a ; free ; mount | grep discard
Linux localhost 3.1.10-motley+ #51 SMP PREEMPT Mon Oct 15 14:37:13 EDT 2012 armv7l GNU/Linux
total used free shared buffers
Mem: 996780 969476 27304 0 51544
-/+ buffers: 917932 78848
Swap: 0 0 0
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
Ryan Kasper said:
Code:
uname -a ; free ; mount | grep discard
Linux localhost 3.1.10-motley+ #51 SMP PREEMPT Mon Oct 15 14:37:13 EDT 2012 armv7l GNU/Linux
total used free shared buffers
Mem: 996780 969476 27304 0 51544
-/+ buffers: 917932 78848
Swap: 0 0 0
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,relatime,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
Click to expand...
Click to collapse
What ROM are you running, if any?
Also, could you please
cat /sys/block/zram0/disksize
And report the results?
Jay Aristide said:
Well, the point of it is to improve performance while multitasking by storing the page file in memory. I've played around with band swap on other devices, and I've never been impressed with it on Android, whereas app-switching is noticeably snappier using zRam.
Either way, there's a no zRam version, and 3 different sizes to choose from, so just find what works for you and lemme how what you settled on
Click to expand...
Click to collapse
Ya you're right, I'm just apprehensive of zram from the S3, before jellybean it only had 778mb of usable ram and with a 128mb zram swap then you were down to 650mb.
But the N7 doesn't have that problem so zram is probably the better option for the N7.
I'll take the no zram one for a test drive first and try each one after that and I'll report back.
Thanks man.
Sent from my GT-I9300 using xda premium
Jay Aristide said:
What ROM are you running, if any?
Also, could you please
cat /sys/block/zram0/disksize
And report the results?
Click to expand...
Click to collapse
Paranoid 2.23
Code:
cat /sys/block/zram0/disksize
134217728
Jay Aristide said:
What ROM are you running, if any?
Also, could you please
cat /sys/block/zram0/disksize
And report the results?
Click to expand...
Click to collapse
I posted earlier: zram device is created ok, mkswap works ok, even swapon works ok, but then swap gets turned off by something. If later I run swapon again, swap comes back, meaning both zram device and mkswap worked fine.
I'm also using PA 2.23 with Metallice alpha kernel.