[Fix] SDcard speed Tweak - Samsung Galaxy SL i9003

Hello everyone, i was testing 'SD speed tweak' of CF-Root by skin1980 in KPM, and found out that it wasn't working properly, so i decided to fix it and share the results
This tweak aims to increase read speed of both internal and external sd-cards by increasing the buffer size. It should work in any firmware/rom with ROOT privileges, if the rom doesn't support loading scripts from init.d, check the bottom of the post.
Put this script in /etc/init.d with any name, for example 98Sdfix:
Code:
#!/system/bin/sh
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/179:16/read_ahead_kb;
Important! it needs execution permissions (rwxrwxrwx) it can be done in root explorer or on a terminal by doing chmod 777 /etc/init.d/98sdfix
Important! the second path 179:16 may vary according external SD size, check the path with a root explorer and adjust the script if needed.
Reboot or run the script in a terminal as root to see the effects
Info: the number 2048 is the new buffer size (original was 128), it can be anything like 256,512,1024,2048,3072,etc. you can use whichever you found best (i recommend Sd Tools to test)
Option 2 (if the above isn't working for you)
Code:
#!/system/bin/sh
echo "2048" > /sys/devices/platform/mmci-omap-hs.0/mmc_host/mmc1/mmc1:1234/block/mmcblk1/queue/read_ahead_kb;
echo "2048" > /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/read_ahead_kb;
Please notice that in the path to the file there are folders named mmc0:0001 and mmc1:1234 this last 4 numbers could vary from different firmware versions/roms check the path with a root explorer and adjust the script if needed.
Note: if the rom doesn't support loading scripts from init.d, it could work anyways using Script manager or any app like it, be sure to check "Run as Root" and 'Run at boot'
Similar Post on http://forum.xda-developers.com/showthread.php?t=1010807
(it isn't exactly the same since i added external-sd and option 2 is device specific)
I hope it helps
Script attached: unzip and place it in /etc/init.d please check the second path with a root explorer and adjust the script if needed

You should put a disclaimer: With this fix there will be sync issue with voice and video in video recording

jaskiratsingh said:
You should put a disclaimer: With this fix there will be sync issue with voice and video in video recording
Click to expand...
Click to collapse
Sorry to hear that, but its not a problem of the fix (tested several times, i don't have that problem), maybe it's a slow card (Class 4 or greater is recommended for HD), or it can be some other modifications you made, try with a ramscript to see if the phone has the problem because it struggling with ram, i suggest v6supercharger with MegaRAM settings...

Can u upload ur script so that we directly test it...? That will be good for every one.

vishal24387 said:
Can u upload ur script so that we directly test it...? That will be good for every one.
Click to expand...
Click to collapse
these are already present in many roms

sakindia123 said:
these are already present in many roms
Click to expand...
Click to collapse
Not really, only internal sdcard is considered (179:0) wich is universal, external-sd (179:16) it's not and must be manually added

alfrix said:
Not really, only internal sdcard is considered (179:0) wich is universal, external-sd (179:16) it's not and must be manually added
Click to expand...
Click to collapse
great work buddy...

great work.
works well.

most of the script part went over my head so can someone pls tell how to install it in a simple way??pls
i can paste the script in /etc/init.d
but what does this mean?-
please check the second path with a root explorer and adjust the script if needed??

akashsgpgi said:
most of the script part went over my head so can someone pls tell how to install it in a simple way??pls
i can paste the script in /etc/init.d
but what does this mean?-
please check the second path with a root explorer and adjust the script if needed??
Click to expand...
Click to collapse
"Please notice that in the path to the file there are folders named mmc0:0001 and mmc1:1234 this last 4 numbers could vary from different firmware versions/roms check the path with a root explorer and adjust the script if needed."
after placing the script, using root explore, follow the system path as mentioned: "/sys/devices/platform/mmci-omap-hs.0/mmc_host/mmc1/mmc1:1234"
means "in the sys folder, open the devices folder, then open the platform folder, then open the mmi-omap-hs.0 folder, etc. etc." until you get where you need to go.
my address on mmc1 is e624

im going to use method 1
but in place of 2048 what should i put , i tried sd tools but i got speed in mb/s (writing 7mb/s and reading 16.7mb/s)
so what to put in place of 2048 in the script:
#!/system/bin/sh
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/179:16/read_ahead_kb;

Mine is 60MB/s read and 10 in write
akashsgpgi said:
im going to use method 1
but in place of 2048 what should i put , i tried sd tools but i got speed in mb/s (writing 7mb/s and reading 16.7mb/s)
so what to put in place of 2048 in the script:
#!/system/bin/sh
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/179:16/read_ahead_kb;
Click to expand...
Click to collapse
Sent from my GT-I9003 using XDA App

i have applied this script
so now do i have to disable sd speed tweak in the cf root tweak manager??

It simply worked , thanks :good:

i have 32GB class 10 SD Card before this script my Writing Speed was :28.3 MB/s and Read Speed: 34.2
but after the script my Writing Speed is:16.4 :crying: but My Read Speed: 64.8 what is this ????

Important!
For people that can't find the second path :: like Me
I think this is easiest way to know the second path the first part 179 is constant put the the second part (16) it depends on you Ext SD Card Size (i tried this tweak but without modification and it work on internal sd card only but when i modified it and make it 179:32 cuz i have 32GB micro SD card it works perfectly )

Related

SD tweakz - Run scripts from your SD on every boot

This mod will let you run any script for you from your SD on every reboot.
WARNING: your ROM must have init.d support for this to work.
Instructions:
1. Download the flashable zip from here
2. Flash via recovery
3. Create a folder on SD-card called "scriptz" (/sdcard/scriptz)
4. Place your tweaks/scripts inside "scriptz" folder.
5. Reboot and see your script run on boot time
What does it do?
#During boot-up
-mounts SD
-checks if "scriptz" folder exists
-copies scripts from "scriptz" folder to /data partition
-sets permission to scripts
-runs all the scripts (all the scripts found in the scriptz folder)
-deletes "scriptz" folder from /data partition
-unmounts SD
-done
I created this script originally intended for the optimus one(p500), to try out and test some tweaks from this thread. I later found out that it works perfectly for other phones as well so here I am sharing it to people who wish to test out some scripts without the hassle of constantly pushing and pulling files from the system.
what is it useful for? well for advanced users, it's not much of a help. But for most users and mid level coders, it can help with debugging like finding the right value or right combination of scripts to apply. Also it simply gives you the ease of applying and modifying your scripts from your SD card. That's great right?
If it works for you please post a feedback and the ROM/phone you are using
If you find any bug, please do tell
Suggestions would be appreciated
Original thread from optimus one here
Undo.zip here
heres a few scripts that could help speed up your phone.
noatime: sets the noatime option to your filesystems
Code:
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
TCP-buffer: increases the TCP buffer size
Code:
setprop net.tcp.buffersize.default 4096,87380,256960,4096,16384,256960
setprop net.tcp.buffersize.wifi 4096,87380,256960,4096,16384,256960
setprop net.tcp.buffersize.umts 4096,87380,256960,4096,16384,256960
SD-patch: sets the read_ahead_kb value to 4096
Code:
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
download and copy to /sdcard/tweakz

[MOD] One stop for tweaks and other useful cool stuff

ok, from my android tweaking and playing around with all kinds of settings and other things i know it can be somewhat hard to find everything you might need to make the most of your android device so i will put links to them here along with providing support and my own little discoveries here...if anyone knows anything else that is cool or useful just post it and i'll update this post (btw these are tested on droid 1 only but many may apply to most android devices)
*Anyone who knows of any other tweaks/mods/scripts/useful terminal commands please feel free to post and i'll add it here (after testing it if possible)*
***disclaimer- I am not responsible for any damage you may do to your device, please make sure to have a backup before doing any of these tweaks***
first off how about a simple rooting/returning to stock guide?
quick root guide
1)download these files
http://www.motorola.com/staticfiles/Support/Experiences/Global_Drivers/MotoHelper_2.0.40_Driver_4.9.0.exe
http://wonderly.com/bb/DROID/OEM/rsdlite_5.0.msi
http://wonderly.com/bb/DROID/OEM/VZW_A855_QSC6085BP_RZRECOVERY_UPDATE.sbf
http://wonderly.com/bb/DROID/OEM/update.zip
2)install the first 2 links in order
3)connect your phone via usb to your computer and copy the update.zip you downloaded to your sdcard
4)reboot your phone and hold power + vloume up + the camera button until you see the screen that says bootloader battery ok
5)open rsd lite and see if it recognizes your phone (basically any entry in the model column) and slide your phone keyboard open
6) click the ... near the start button and navigate and select the VZW_A855_QSC6085BP_RZRECOVERY_UPDATE.sbf file
7)click start and WATCH FOR "Phone[0000]: Phone is being rebooted" On your phone the screen will change to "SW Update Complete" and your phone will reboot within a second or two. You want to be already holding the x button on your keyboard to boot into recovery mode when the phone actually reboots so the stock OS doesnt erase the new recovery you just flashed
8) using the volume keys to move through the menu, the camera button to select and the power button to go back, go to install and select the update.zip you put on your sdcard earlier and select install update.zip
9) then select "reboot into android" and enjoy the benefits of being rooted
return to stock
1)download these files
http://www.motorola.com/staticfiles...al_Drivers/MotoHelper_2.0.40_Driver_4.9.0.exe
http://wonderly.com/bb/DROID/OEM/rsdlite_5.0.msi
http://wonderly.com/bb/DROID/OEM/VZW_A855_FRG22D_QSC6085BP_C_01.43.01P_SW_UPDATE.sbf
2)install the first 2 files
3)reboot your phone and hold power + vloume up + the camera button until you see the screen that says bootloader battery ok
4)connect your phone via usb to your computer and reboot your phone and hold power + vloume up + the camera button until you see the screen that says bootloader battery ok
5)open rsd lite and see if it recognizes your phone (basically any entry in the model column)
here are are some useful build.prop tweaks I've encountered along the way, just put the line into the build.prop or modify it if its already in there, save, wipe dalvik cache and reboot
6) click the ... near the start button and navigate and select the VZW_A855_FRG22D_QSC6085BP_C_01.43.01P_SW_UPDATE.sb f you downloaded earlier
7)click start and let it run and reboot automatically (it should work even if rsd lite says the result was fail)
8) you are now on stock unrooted froyo
FRG22D
(optional) 9) go to settings > about phone> check for updates and allow system updates to download and install (allows for a super clean setup if you are planning to re-root)
for possibly better scrolling speed, can be set to any number from 35-300:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec=
change lcd density (already in build.prop), which is like changing the resolution on a windows computer can be anywhere from 140 to 260 (under 200 not recommended because everything may be too small for the phone to be usable:
ro.sf.lcd_density=
dalvik cache virtual memory size (already in build.prop)...can also help performance. set anywhere from 24m to 64m based on how complex your setup is. i.e. tons of apps, in depth theme, memory intensive apps, etc.
dalvik.vm.heapsize=
incoming ringer delay (already in build.prop) sets how soon the phone starts ringing when a call comes in. set between 0 and 2000
ro.telephony.call_ring.delay=
proximity delay. sets how long before screen turns off during call. set between 0 and 600
# Proximit sensor screen off delay
mot.proximity.delay=
tcp stack- optimizes data performance
net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960
enable hardware acceleration
# Render UI through GPU instead of CPU
# Comment out if this causes laggy UI (it should speed up UI)
debug.sf.hw=1
sleep mode for battery savings. 0 means power collapse suspend, 1 is power collapse (usually the best choice), 2 is apps go to sleep, 3 is show clock and wait, 4 is wait for interrupt...not sure which each one does or is good for, just know about this little tweak lol
# Battery Savings (Sleep Mode)
pm.sleep_mode=
more battery savings
# When moving through zones or losing signal, having a delay
# smooths out constant disconnects and reconnects, which in turn
# saves a ton of battery life!
ro.mot.eri.losalert.delay=1000
disable sending usage data
ro.config.nocheckin=1
wifi scan interval (already in build.prop) can save battery as well. set from 15 to 999
# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.supplicant_scan_interval=
ok, now for some useful links (all credit goes to the creators of these cool tweaks/apps/programs
v6 supercharger by zepplinrox - http://forum.xda-developers.com/showpost.php?p=18703418&postcount=5021
Deodex/odex tweak by Nibras, Reeza & Danzano (thanks to BrUhNiGGs for finding this) - http://www.droidforums.net/forum/steel-droid/200388-ram-tweak-free-up-more-ram-make-apps-load-faster.html
setcpu for free (legitimately legal lol) - http://forum.xda-developers.com/showthread.php?t=505419
wifi tethering app Downloads - http://code.google.com/p/android-wifi-tether/downloads/list
wired tethering app Downloads - http://code.google.com/p/android-wired-tether/downloads/list
easy install of adb http://www.droidforums.net/forum/chevyno1/162984-your-1-adb-source-7-29-11-a.html
Guide to building a rom from source (credit to chevycam and SnkBitten) - http://www.droidforums.net/forum/steel-droid/196475-guide-how-build-your-own-rom-cm7-source.html
Ok, here's a new section with just general tips, tricks and scripts
Useful terminal emulator scripts run as superuser (su)
*Using the debugging logging to report issues
Code:
logcat > /mnt/sdcard/logcat.txt
wait 4-5 seconds then hold volume up and press f on the keyboard to stop it
if logcat is disabled then do this instead
Code:
dmesg > /mnt/sdcard/dmesg.txt
wait 4-5 seconds then hold volume up and press f on the keyboard to stop it
*Find top CPU/memory using apps. value after -m is how many apps to show, value after -n is how many times to update (be sure to set this value or it will run endlessly until terminal is closed)
Code:
top -m 10 -n 1
*Find md5sum for downloaded files (checks to ensure proper downloads especially for roms, just compare your result to whatever value the rom developer provides and they should match)
Code:
md5sum /mnt/sdcard/(file path on sdcard)
For example
Code:
md5sum /mnt/sdcard/download/SD_9.0.0.zip
*Use swap partition without swapper2.
Add this script to the end of any file in the /etc/init.d folder. If you don't have one just run it in terminal emulator each reboot and run it in terminal first since sometimes its mmcblk0p2 instead of mmcblk0p3 depending on where you have the swap partition (or use the app script manager to make it run at boot. Script manager doesn't run continuously like swapper2)
Code:
swapon /dev/block/mmcblk0p3
And to turn swap off
Code:
swapoff /dev/block/mmcblk0p3
*Setting swappiness
Add or edit this line in the file etc/sysctl.config using whatever value you want, just keep the spaces (open in text editor)
vm.swappiness = 30
Or add this to the end of a script in init.d or run in terminal emulator
Code:
sysctl -w vm.swappiness=30
*Loading a module for apps2sdext (link2sd style apps2sd)
Run this in terminal emulator with superuser permission, substituting ext3 for whatever extension you want loaded (keep the .ko though)
Code:
insmod /system/lib/modules/ext3.ko
or the simple way
Code:
modprobe ext3
*Listing loaded modules
Run this in terminal emulator with superuser permissions
Code:
lsmod
*Forcing a hot reboot to clear caches
Run this in terminal emulator with superuser permissions
Code:
pkill zygote
*terminal tips-
Find list of many possible scripts to run
Code:
busybox
List sysctl commands
Code:
sysct -h
List first or last 10 lines of another scripts output (note | is not lower case L, its a separate character)
First 10-
Code:
(script) | head
Last 10
Code:
(script) | tail
Example (list first 10 sysctl values)
Code:
sysctl -a | head
Finding lines with certain letters/word in another scripts output
Code:
(script) | grep (letters/word)
Example (show only sysctl lines with vm in them) (note | is not lower case L, its a separate character)
Code:
sysctl -a | grep vm
Don't worry more to come soon
Ok, those are the well tested tweaks, now for a few experimental ones. Please make sure to have a backup ready to restore since these ARE experimental and may cause your rom not to load
improve peformance?
Add this to the build.prop
#disable the zygote loader
ro.wmt.blcr.enable=0
Fix app issues? (change it to 0 to improve performance)
Add this to build.prop
ro.kernel.android.checkjni=1
Change the I/O scheduler (effects how your phone reads and writes data)(first line tells you whats available and what you currently have in [ ], then put whichever one you want in the "" after echo, and the last line will confirm the change)
Code:
cat /sys/block/*/queue/scheduler
for i in /sys/block/*/queue/scheduler
do
echo "deadline" > $i
done
cat /sys/block/*/queue/scheduler
Increse overall touch resposivness?
Add these to build.prop
debug.performance.tuning=1
video.accelerate.hw=1
ro.min_pointer_dur=8
Raise Photo and video quality?
Add these to build.prop
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
change sdcard buffer speed
run in terminal emulator as superuser (su) or put #!/system/bin/sh as first line and put in /system/etc/init.d (you can change the value in the "echo 512 > /sys/devices/virtual/bdi/179:0/read_ahead_kb" line to suit your needs- common values are 256, 512, 1024, 2048, 3072, 4096, 5120, 6144)
Code:
for i in /sys/devices/virtual/bdi/*
do
echo 2 > $i/read_ahead_kb
done
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 2 > /sys/devices/virtual/bdi/default/read_ahead_kb
or you can try just simply using the simple version
Code:
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Disable boot animation
add to build.prop (use caution after wiping dalvik, it will appear to hang at the M but its usually still booting up all the way)
dev.sfbootcomplete=0
Use dalvik JIT compiler
add to build.prop (Just In Time compiler is much faster)
dalvik.vm.execution-mode=int:jit
Improve performance?
change in build.prop
ro.setupwizard.mode=DISABLED
Rom dependent tweaks (will only work if these features are included in your rom and most are included in settings anyway, most of the time they are but if not sure then ask the dev) add these to build.prop, 1 is on 0 is off
help to free up unused ram-
persist.sys.purgeable_assets=
stop usb debugging on notification-
persist.adb.notify=
Force capacitive buttons to stay on while screen is on?-
ro.mot.buttonlight.timeout=
Improve screen quality at the cost of performance-
persist.sys.use.dithering=
*reserved*
**reserved**
and one more just in case
***reserved***
btw, i hope i posted this right, I'm still new here to xda forums, i hope i posted in the right section too...if not then someone can go ahead move it (if possible)
Nice collection!
Say, do you have anything specific to CDMA bandwidth?
I know my 3G TurboCharger has a positive effect somehow even though most of the entries are GSM related but hey... every bit helps
zeppelinrox said:
Nice collection!
Say, do you have anything specific to CDMA bandwidth?
I know my 3G TurboCharger has a positive effect somehow even though most of the entries are GSM related but hey... every bit helps
Click to expand...
Click to collapse
not sure if any of these would apply to data at all but i know kfazz posted them as the only ril settings for the droid, maybe this could further improve speed on all devices if anything applies to mobile data
Moto ril sholes accepted properties found via strings
persist.ril.mux.timeout.enbld
persist.ril.enableradio.powerup
persist.ril.uart.flowctrl
persist.ril.mux.noofchannels
persist.ril.mux.ttydevice
persist.ril.mux.retries
persist.ril.mux.sleep
persist.ril.mux.logmask
persist.ril.rssi.enable.param6
persist.ril.modem.ttydevice
persist.ril.pppd.start.fail.max
ro.ril.ecclist
ro.ril.barcode
ro.build.id
/data/data/com.motorola.motoapr.service/paniclogging
/data/misc/ril/ril_apr.log
Click to expand...
Click to collapse
Ok I guess those are boolean values soget either = 0 or =1 values then?
Well that's weird.. I didn't know there are ro.cdma values...
http://pastebin.com/LWWcSMTD
zeppelinrox said:
Ok I guess those are boolean values soget either = 0 or =1 values then?
Well that's weird.. I didn't know there are ro.cdma values...
http://pastebin.com/LWWcSMTD
Click to expand...
Click to collapse
i searched for ro.cdma and found some others too
ril.cdma.ppp.up=3
ro.radio.use-ppp=yes
net.cdma.ppp-exit=0
cool... maybe you can test them see if you notice a difference?
zeppelinrox said:
cool... maybe you can test them see if you notice a difference?
Click to expand...
Click to collapse
I'll try it out but it I'll try it on something where the radio fully works lol, is still being fixed on the ics build but obviously I have to go back to gingerbread to make and receive calls, if it does anything on GB, then I'll test on ics, who knows it might fix the radio issues somehow
A friend of mine just asked me to root his old droid for him to use merely as a multimedia (music & video) and google docs device. Strictly Wifi, no service plan.
i plan on rooting, wiping, and running SteelDroid on it for him:
http://forum.xda-developers.com/showthread.php?t=1098483
I came across these tweaks and they look AWESOME. I just have a few questions about some of them in particular.
metalspring said:
for possibly better scrolling speed, can be set to any number from 35-300:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec=
Click to expand...
Click to collapse
Is this in the build.prop or elsewhere?
metalspring said:
tcp stack- optimizes data performance
net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960
Click to expand...
Click to collapse
where do i find and change these? build.prop or elsewhere?
metalspring said:
enable hardware acceleration
# Render UI through GPU instead of CPU
# Comment out if this causes laggy UI (it should speed up UI)
debug.sf.hw=1
disable sending usage data
ro.config.nocheckin=1
Click to expand...
Click to collapse
in build.prop?
metalspring said:
Useful terminal emulator scripts run as superuser (su)
*Use swap partition without swapper2.
Add this script to the end of any file in the /etc/init.d folder. If you don't have one just run it in terminal emulator each reboot (or use the app script manager to make it run at boot. Script manager doesn't run continuously like swapper2)
swapon /dev/block/mmcblk0p3
And to turn swap off
swapoff /dev/block/mmcblk0p3
*Setting swappiness
Add or edit this line in the file etc/sysctl.config using whatever value you want, just keep the spaces (open in text editor)
vm.swappiness = 30
Or add this to the end of a script in init.d or run in terminal emulator
sysctl -w vm.swappiness=30
*Loading a module for apps2sdext (link2sd style apps2sd)
Run this in terminal emulator with superuser permission, substituting ext3 for whatever extension you want loaded (keep the .ko though)
insmod /system/lib/modules/ext3.ko
Click to expand...
Click to collapse
Can i make 2 scripts in script manager that can do this? or are there any available? I know on such a low ram & low internal storage device, swap and apps2sdext would be INCREDIBLY useful.. any tips on making this permanent? If i can make a script in SM i know i can set it start at boot. But i wouldn't need to do that for a2sdext right? once that's set, it's set and needs no changes right?
Also, would you suggest a custom rom like steeldroid or would i be better off stripping out the crapware from the stock ota rom (froyo) and just flashing a better compatible kernel and using some tweaks & scripts to speed things up a bit and optimize them for his purposes.
Let me know what you think?
thanks!
Originally Posted by metalspring
for possibly better scrolling speed, can be set to any number from 35-300:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec=
Click to expand...
Click to collapse
Is this in the build.prop or elsewhere?
Originally Posted by metalspring
tcp stack- optimizes data performance
net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960
Click to expand...
Click to collapse
where do i find and change these? build.prop or elsewhere?
Originally Posted by metalspring
enable hardware acceleration
# Render UI through GPU instead of CPU
# Comment out if this causes laggy UI (it should speed up UI)
debug.sf.hw=1
disable sending usage data
ro.config.nocheckin=1
Click to expand...
Click to collapse
in build.prop?
Originally Posted by metalspring
Useful terminal emulator scripts run as superuser (su)
*Use swap partition without swapper2.
Add this script to the end of any file in the /etc/init.d folder. If you don't have one just run it in terminal emulator each reboot (or use the app script manager to make it run at boot. Script manager doesn't run continuously like swapper2)
swapon /dev/block/mmcblk0p3
And to turn swap off
swapoff /dev/block/mmcblk0p3
*Setting swappiness
Add or edit this line in the file etc/sysctl.config using whatever value you want, just keep the spaces (open in text editor)
vm.swappiness = 30
Or add this to the end of a script in init.d or run in terminal emulator
sysctl -w vm.swappiness=30
*Loading a module for apps2sdext (link2sd style apps2sd)
Run this in terminal emulator with superuser permission, substituting ext3 for whatever extension you want loaded (keep the .ko though)
insmod /system/lib/modules/ext3.ko
Click to expand...
Click to collapse
Can i make 2 scripts in script manager that can do this? or are there any available? I know on such a low ram & low internal storage device, swap and apps2sdext would be INCREDIBLY useful.. any tips on making this permanent? If i can make a script in SM i know i can set it start at boot. But i wouldn't need to do that for a2sdext right? once that's set, it's set and needs no changes right?
Also, would you suggest a custom rom like steeldroid or would i be better off stripping out the crapware from the stock ota rom (froyo) and just flashing a better compatible kernel and using some tweaks & scripts to speed things up a bit and optimize them for his purposes.
Let me know what you think?
thanks!
Click to expand...
Click to collapse
to the first 4 yes, just add them to the build.prop and for the last ones you can either use script manager to make a new script in the folder /system/etc/init.d
if you dont have an init.d folder then you have to have script manager to run them at boot (i'd suggest having the scripts in /data) and for apps2sdext, i'd suggest using the app link2sd, its basically the only way to control moving apps to the sdcard ext
also the biggest help for low ram devices is v6 supercharger and all the other zeppelinrox scripts
http://forum.xda-developers.com/showpost.php?p=18703418&postcount=5021
and i'd highly highly suggest steeldroid 10, its what i currently run and most of the tweaks i have in this thread are already included in it
and btw if you didnt know, in order to use swap and link2sd you have to format your sdcard and repartition it, the easiest way is installing rom manager, flashing clockwork recovery and there should be an option to partition your sdcard in rom manager (it will erase everything on your sdcard so back everything up)
also i'm going to update this thread with more stuff i've found
updated and cleaned up op
awesome! thanks! yea i know about partitioning the sdcard. I use both swap and a2ext on my htc g2, but they are part of the kernel on the ROM i run, i've never used any other software to initiate them.
Thanks for the tips!
Also, how can ANYONE flash roms from XDA and NOT know about the AMAZING supercharger v6 script!
first of all I want to thank the OP! being how this is not my phone but my brothers. he wants me to root it and install a rom. this thread made everything a whole lot simple.
now to bug you guys.. where can I find a suitable system recovery apk for this phone? I have one installed but it never boots into recovery. also I haz steel droid 10 running.
Sent from my DROID X2 using XDA App
motrinHD said:
first of all I want to thank the OP! being how this is not my phone but my brothers. he wants me to root it and install a rom. this thread made everything a whole lot simple.
now to bug you guys.. where can I find a suitable system recovery apk for this phone? I have one installed but it never boots into recovery. also I haz steel droid 10 running.
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
if you're talking about a droid 1 then the instructions to root should install a custom recovery
If you're talking about a droid x2 as your signature suggests then I'd say try looking on droidforums.net... They are more dedicated to the droid series of android phones and I know any Motorola phone other than the droid 1 is more complicated because of a locked bootloader
You can try downloading rom manager to flash a recovery for either phone I believe
Also if you are already rooted and think you have a working recovery then try installing android terminal emulator from the market and typing in
su
reboot recovery
metalspring said:
if you're talking about a droid 1 then the instructions to root should install a custom recovery
If you're talking about a droid x2 as your signature suggests then I'd say try looking on droidforums.net... They are more dedicated to the droid series of android phones and I know any Motorola phone other than the droid 1 is more complicated because of a locked bootloader
You can try downloading rom manager to flash a recovery for either phone I believe
Also if you are already rooted and think you have a working recovery then try installing android terminal emulator from the market and typing in
su
reboot recovery
Click to expand...
Click to collapse
I am talking about the droid 1. tho I spf'd to 2.2 I then went with the one click root method. and it placed a system recovery apk on my sd but I find that it does not work. I'm going to try that emulator thing you suggested
Sent from my DROID X2 using XDA App
metalspring said:
to the first 4 yes, just add them to the build.prop and for the last ones you can either use script manager to make a new script in the folder /system/etc/init.d
if you dont have an init.d folder then you have to have script manager to run them at boot (i'd suggest having the scripts in /data) and for apps2sdext, i'd suggest using the app link2sd, its basically the only way to control moving apps to the sdcard ext
also the biggest help for low ram devices is v6 supercharger and all the other zeppelinrox scripts
http://forum.xda-developers.com/showpost.php?p=18703418&postcount=5021
and i'd highly highly suggest steeldroid 10, its what i currently run and most of the tweaks i have in this thread are already included in it
and btw if you didnt know, in order to use swap and link2sd you have to format your sdcard and repartition it, the easiest way is installing rom manager, flashing clockwork recovery and there should be an option to partition your sdcard in rom manager (it will erase everything on your sdcard so back everything up)
also i'm going to update this thread with more stuff i've found
Click to expand...
Click to collapse
MS,
I have learned alot from your posts. Thanks for the time spent sharing them. A few questions.
You mention and I have noticed many of the tweaks are already incorporated into Steel Droid X. (I am currently running the rc1 version with the last Deprimed Kernel.) Am am liking it ALOT!!.
Is there anyway you could somehow put a denotion on the tweaks that are already included in SDX? I think it would be helpful, as I certainly would find it so.
How much of a effect did you find running v6 supercharger had given the other changes already in SDX? Any conflicts or issues running it with this ROM?
I am planning on partitioning my SD card as I would like to try the benefits of a swap partition. Upon checking my usage I am considering a 128mb. Seems like a safe size all around. Believe you have posted this somewhere as well? Card is a 32g class 4. I have never messed with running a swap. Currently, I have a standard single FAT32 format part. I have a number of programs already set as loaded on the SD card so I will have to move those back.
I believe SDX has apps2sdext already, correct?
From your post I take I still need links2sd to have the apps to go to that swap partition?
Is there a good link to info on the hows, workings, etc on the swap partition, apps works? I can search for one, only if you happen to have a link handy.
Thanks for all your help.
BE

[GUIDE]Use SWAP As Virtual RAM Without Partitioning SD Card

Firstly what is swap, you should know about it before
you go further
What is Swap:-
Swap space in Linux is used when the amount of
physical memory (RAM) is full. If the system needs
more memory resources and the RAM is full, inactive
pages in memory are moved to the swap space. While
swap space can help machines with a small amount of
RAM, it should not be considered a replacement for
more RAM. Swap space is located on hard drives, which
have a slower access time than physical memory.
Swap space can be a dedicated swap partition, a swap
file, or a combination of swap partitions and swap files.
Normally the swap space should be equal to the Actual
physical Ram
Click to expand...
Click to collapse
.
LEGAL WARNING-Read This before you proceed
I and XDA is not responsible for any damage done to your device..........
Click to expand...
Click to collapse
Requirements for this process:-
* Kernel which supports swap(Deviant,Hells,GNU,Merruk)etc
* Rooted galaxy y
* Busybox (atleast v1.18)
* Terminal Emulator
Click to expand...
Click to collapse
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
You Can Rate This Thread 5 Stars......I won't ask for thank......if I deserve it..go ahead.....please do not copy the work to any other forum
Click to expand...
Click to collapse
error
it says function not implemented on busybox swapon
feature: swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
I figured this was a doable thing glad you had a step by step, I'm surprised more people don't do this.
I have an old droid eris I've downgraded to and am stuck with until I can afford a new phone and it is grossly under-stocked on memory for modern phone requirements. Having devised my fair share of linux partition schemes I thought surely it was a possibility to get a swap partition activated on there but it seems like alot of people were trying to do it with various third party applications and kinda misunderstood just exactly what swap was. You certainly saved me effort by listing out the steps and stopping me from going for a full on fdisk of a portion of my sdcard (and also having to track down my micro to sd adapter), for that I salute you.
Sometimes the simple things are the best
Error message
Hi friend
When I type #(swapon /sdcard/swap/swap) #
I just see this error "file has holes"
I don't no do after it,if possible please help me
DC07 said:
Firstly what is swap, you should know about it before
you go further
.
LEGAL WARNING-Read This before you proceed
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for
Click to expand...
Click to collapse

[Guide] {Noob friendly} How to create init.d scripts

REFERENCE
Read everything. Everything in this thread is important to make init.d script.
I am not responsible for anything that happens to your phone.
****************************************************************
***************************************************
We have come accross this quite a few times. So what is init.d folder?
In simple words, whatever scripts you place in this folder will be executed when the device boots.
******************************************************************************************************
ORDER in which scripts are executed.
Init.d scripts are executed in alphabetical order. That is, any script, the name of which starts with the alphabet A, will be executed first and scripts, the name of which starts with Z will be executed at last.
Therefore the name of the script is really important.
For example, if we make a script with name A, to change the governor to smartassv2
AND
we make another script with the name Z , to change the governor to PegasusQ and place both of them in init.d folder, then the system will first execute script A and change the governor to smartassv2, and then it will execute script Z and change the governor to PegasusQ.
So if you use any mod by some other person, and if you don't know what's inside the script then you should name your script with alphabet z to make your settings stick.
*********************************************************************************************************************************************************
OK NOW enough of explanations, Let's see how to make an init.d script.
REQUIREMENTS :-
1. ROOTED PHONE
2. BUSYBOX INSTALLED
3. KERNEL THAT SUPPORTS INIT.D (like CoCore)
4. TEXT EDITOR.
I usually use solid explorer to do every thing. If you are editing on your computer, then use notepad++.
STEP 1
Set up init.d folder. Using your root explorer, browse to /system/etc and create a folder init.d. Now set the folder's permission to rwxrwxrwx or 0777. You can do this with TWRP recovery also.
STEP 2
1. Now this is the real part. Create a file with appropriate name (see above if you have not read).
Remember, the script should not have any extentions like .txt or .sh. There should be no extentions.
2. Long press the file using your root explorer and open the file as text.
3. NOW THE FIRST LINE OF YOUR SCRIPT SHOULD ALWAYS BE
Code:
#!/system/bin/sh
Do not leave any blank space in between or after the line. As soon as you write this, press enter to go to the next line.
4. Now write any script that you want. For example, if you want to change the governor to smartassv2, then you need to use echo command, followed by the name of the governor followed by the path of the file that needs to be changed like this
Code:
echo "smartassv2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
your script should look like this,
Code:
#!/system/bin/sh
echo "smartassv2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
To set deep sleep to 4 script should be,
Code:
#!/system/bin/sh
echo "4" > /d/cpuidle/deepest_state
STEP 4
Put this file inside init.d folder. Now long press the file using your root explorer and set the permission to 0777 and ownership to root 0 : root 0.
Reboot your device.
*************************************************** *************************************************** ***************************************************
THINGS TO REMEMBER :-
1. NEVER leave a blank space at end of any line otherwise the script won't work.
2. To know about more tweaks go to the cocore thread and see the second and third posts.
http://forum.xda-developers.com/showthread.php?p=37782495
3. Download amd install script manager. Run the script through it. If it shows 0, then it means your script has no errors. If it returns any other number, it means the script has errors. (may be you left a blank space).
4. You can also tweak your governors. Read this thread to know various governor tweaks.
http://forum.xda-developers.com/showthread.php?t=1369817
*************************************************** *************************************************** ***************************************************
RESERVED
Definitely useful. Thanks a lot..
Thanks for this tutorial !!!
Sent from my GT-I9070 using xda app-developers app
Good
:good::good: thank you, very helpful
anantttt said:
REFERENCE
Read everything. Everything in this thread is important to make init.d script.
I am not responsible for anything that happens to your phone.
****************************************************************
***************************************************
We have come accross this quite a few times. So what is init.d folder?
In simple words, whatever scripts you place in this folder will be executed when the device boots.
******************************************************************************************************
ORDER in which scripts are executed.
Init.d scripts are executed in alphabetical order. That is, any script, the name of which starts with the alphabet A, will be executed first and scripts, the name of which starts with Z will be executed at last.
Therefore the name of the script is really important.
For example, if we make a script with name A, to change the governor to smartassv2
AND
we make another script with the name Z , to change the governor to PegasusQ and place both of them in init.d folder, then the system will first execute script A and change the governor to smartassv2, and then it will execute script Z and change the governor to PegasusQ.
So if you use any mod by some other person, and if you don't know what's inside the script then you should name your script with alphabet z to make your settings stick.
*********************************************************************************************************************************************************
OK NOW enough of explanations, Let's see how to make an init.d script.
REQUIREMENTS :-
1. ROOTED PHONE
2. BUSYBOX INSTALLED
3. KERNEL THAT SUPPORTS INIT.D (like CoCore)
4. TEXT EDITOR.
I usually use solid explorer to do every thing. If you are editing on your computer, then use notepad++.
STEP 1
Set up init.d folder. Using your root explorer, browse to /system/etc and create a folder init.d. Now set the folder's permission to rwxrwxrwx or 0777. You can do this with TWRP recovery also.
STEP 2
1. Now this is the real part. Create a file with appropriate name (see above if you have not read).
Remember, the script should not have any extentions like .txt or .sh. There should be no extentions.
2. Long press the file using your root explorer and open the file as text.
3. NOW THE FIRST LINE OF YOUR SCRIPT SHOULD ALWAYS BE
Do not leave any blank space in between or after the line. As soon as you write this, press enter to go to the next line.
4. Now write any script that you want. For example, if you want to change the governor to smartassv2, then you need to use echo command, followed by the name of the governor followed by the path of the file that needs to be changed like this
your script should look like this,
To set deep sleep to 4 script should be,
STEP 4
Put this file inside init.d folder. Now long press the file using your root explorer and set the permission to 0777 and ownership to root 0 : root 0.
Reboot your device.
*************************************************** *************************************************** ***************************************************
THINGS TO REMEMBER :-
1. NEVER leave a blank space at end of any line otherwise the script won't work.
2. To know about more tweaks go to the cocore thread and see the second and third posts.
http://forum.xda-developers.com/showthread.php?p=37782495
3. Download amd install script manager. Run the script through it. If it shows 0, then it means your script has no errors. If it returns any other number, it means the script has errors. (may be you left a blank space).
4. You can also tweak your governors. Read this thread to know various governor tweaks.
http://forum.xda-developers.com/showthread.php?t=1369817
*************************************************** *************************************************** ***************************************************
Click to expand...
Click to collapse
I'm having a bit of trouble trying to figure out how into save a script for init.d..
Do I save it as a .sh script?
If you take a look at Step 2 you can read this:
"Remember, the script should not have any extentions like .txt or .sh. There should be no extentions."
:good
Those commands only changes a specific parameter, what if you want to add something to ie. build.prop. Would you still use echo?
ie. echo "something" >> /system/build.prop
fusk said:
Those commands only changes a specific parameter, what if you want to add something to ie. build.prop. Would you still use echo?
ie. echo "something" >> /system/build.prop
Click to expand...
Click to collapse
Yes, we have to use echo to add something to build.prop but not at every boot...
The lines in the build.prop are still available after boot too..
So only once we have to do that....
If they changes i.e., the line exists but prop value changes then we have to use
Code:
setprop <prop>=<prop_value>
HemanthJabalpuri said:
Yes, we have to use echo to add something to build.prop but not at every boot...
The lines in the build.prop are still available after boot too..
So only once we have to do that....
If they changes i.e., the line exists but prop value changes then we have to use
Code:
setprop <prop>=<prop_value>
Click to expand...
Click to collapse
Thanks.
I had issues getting it to stick after reboot, the line i added disappeared every time. Wanted to try an init.d script and see if that did the trick. I havn't used it before so wanted to be sure about the command. But i does not appear to have worked.

[LOS][SWAP][MEM] Snappier than ever

NOTE: BEFORE SAYING "yet another memory swapping evangelist", WATCH THE VIDEO: https://youtu.be/sdeKuPiR4II
I have been doing some research on system responsiveness with my good old Mofo Z. Then arrived at this.
24 hours after having configured:
LineageOS 15.1 (root enabled)
Swap file size = 4GB (in /data/swap)
vm.swap_ratio = 100 (default)
vm.swap_ratio_enable = 1
vm.swappiness = 75
I have achieved the readings contained in the attached screenshots, and the system acts snappier than ever. It's actually running pretty cool.
First I enabled init.d processing by adding an RC file to init, then created userinit.sh with the necessary systcl and swapon commands.
No system files were changed (new files were added only), so after an update the configuration won't revert to the original state (swap-less).
The least used pages (some [almost] never used) are being written to the swap file and therefore more room for active code (and cached apps) is made available.
It's almost like I had an 8GB RAM bastard in my hand. This with around 130 apps loaded.
STEPS USED
File init_d.rc was created (as described in https://forum.xda-developers.com/lineage/general/how-to-enable-init-d-to-function-t3810355)
Executed:
Code:
$ su
# cd /data
# mkdir swap
# cd swap
# dd if=/dev/zero of=swapfile bs=1048576 count=4096
# mkswap swapfile
Created /data/local/userinit.sh (called from within already existing /system/etc/init.d/90userinit) with the code:
Code:
#!/system/sbin/sh
# vm_swap_ratio=100 is default, no need to set
sysctl vm.swap_ratio_enable=1
sysctl vm.swappiness=75
swapon /data/swap/swapfile
Rebooted and let the system run for a few hours. Things only get better with uptime/usage.
The best part is that you can unroot afterwards and have it still working.
Merry Christmas!
thanx 4 ur work but i m newbie i dont understand what is for , what makes this for this device
murteci said:
thanx 4 ur work but i m newbie i dont understand what is for , what makes this for this device
Click to expand...
Click to collapse
It's for making your device multitasking better. Watch the video: https://youtu.be/sdeKuPiR4II
Guess what? The Galaxy Note 9 (SM-N9600, 6GB/128GB version) employs memory swapping. It has a 2GB active swap file right out of the box.
I received mine last friday, updated Android and went to check it out after I noticed it behaved and reported much like LineageOS with my mod applied. Then I installed a terminal emulator (no root needed) and ran "free -m".
Bang! The swapping is there!
Can't wait to root it and verify that the swappiness is set to... 75. Kinda keen those Samsung guys, huh? Heheheh.
Whammamoosha said:
Guess what? The Galaxy Note 9 (SM-N9600, 6GB/128GB version) employs memory swapping. It has a 2GB active swap file right out of the box.
I received mine last friday, updated Android and went to check it out after I noticed it behaved and reported much like LineageOS with my mod applied. Then I installed a terminal emulator (no root needed) and ran "free -m".
Bang! The swapping is there!
Can't wait to root it and verify that the swappiness is set to... 75. Kinda keen those Samsung guys, huh? Heheheh.
Click to expand...
Click to collapse
Can Make this tutorial to Video Tutorial on Youtube ?
Whammamoosha said:
It's for making your device multitasking better. Watch the video:
Click to expand...
Click to collapse
it looks fantastic, but does it wear the internal storage after time?
JuniorCaesar said:
it looks fantastic, but does it wear the internal storage after time?
Click to expand...
Click to collapse
Yes it does, everything is a trade-off, there's no such thing as a free lunch.
But the wear level added is roughly same as on a computer SSD, so we're talking about decades of use before everything wears out.
emrebozkurt99 said:
Can Make this tutorial to Video Tutorial on Youtube ?
Click to expand...
Click to collapse
I could, but everything is so simple that it's pretty unnecessary.
. Install terminal emulator app from Play Store
. Run terminal emulator app
. Type "free -m"
. Done!
As for the swap configuration for LOS I'm writing a shell script (BIG) that will handle the configuration as user-friendly as possible. Stay tuned!
Could this be used on a stock rom as well?
SlashSpeed said:
Could this be used on a stock rom as well?
Click to expand...
Click to collapse
This is for LineageOS. For stock ROMs (once rooted) one may make the necessary adaptions.
im noob
Hi, im noob and I followed your instructions (at least what I understood) n_nU
I hope that I did it right, the question is, how can I know that?
old thread, but this may not work for most because the script has a slight error:
Code:
#!/system/sbin/sh
It should be:
Code:
#!/system/bin/sh
then all is well.
justle said:
im noob
Hi, im noob and I followed your instructions (at least what I understood) n_nU
I hope that I did it right, the question is, how can I know that?
Click to expand...
Click to collapse
https://gist.github.com/iGlitch/be70d403ad1cfa42ac7e1d46f1b546db Amend a script to a script to track whether or not it executes. Note: You need to manually create the log folder and logs file in /storage/emulated/0 in order for it to work.
Code:
# Push a semi-needed log to the internal storage with a "report" if the script could be executed or not;
# Script log file location
LOG_FILE=/storage/emulated/0/logs
echo $(date) > /storage/emulated/0/logs/script.log
if [ $? -eq 0 ]
then
echo "Script executed. Enjoy!" >> /storage/emulated/0/logs/script.log
exit 0
else
echo "Script failed!" >> /storage/emulated/0/logs/script.log
exit 1
fi
# Done!
Thanks! Worked like a charm.
I use a bunch of fat apps and this caused a few seconds of load times with almost every app switch.
I'm running LOS 17.1 on gemini with 3GB RAM; swap file defaults to 0.5GB.
I've left
Code:
vm.swap_ratio_enable = 0
vm.swappiness = 60
as it was. Simply adding a new 4GB swap file fixed my daily pain.
I have to provide an update on the charm part. (I've tried other settings from first post too).
Previously system was stuck at fully utilized 500 MB default swap. Every app change (I'm using hungry ones) was a pain.
Now system uses ~300 MB more in swap, and for some use cases user experienced have gotten bettter.
I don't feel like this mode would be complete without changing app killer configuration. Would it even be efficient considering the memory read speed in mi5 (or at all)? Idk.
Bottom line.
If you are unhappy with the performance of your hardware and it's because of RAM and your system are using 100% of swap, then it is probably worth increasing the paging file size.
SyraAB said:
Thanks! Worked like a charm.
I use a bunch of fat apps and this caused a few seconds of load times with almost every app switch.
I'm running LOS 17.1 on gemini with 3GB RAM; swap file defaults to 0.5GB.
I've left
Code:
vm.swap_ratio_enable = 0
vm.swappiness = 60
as it was. Simply adding a new 4GB swap file fixed my daily pain.
Click to expand...
Click to collapse
Hi SyraAB.
I am glad that you successfully create swap and make swap service work, which I think now you are the only one who can solve my problems.
So I did every step that Whammamoosha said. However, I failed. When I check whether there was swap created using free -m in Termux there was nothing. Then I dig something out from some research. Here is my question:
1)
Whammamoosha said:
Created /data/local/userinit.sh (called from within already existing /system/etc/init.d/90userinit) with the code:
Click to expand...
Click to collapse
It appears that I don't have file 90userint under /system/etc/init.d (by the way I believe Whammamoosha meant /system/etc/init here because init.d does not exist in android). Also I notice your ROM is Lineage OS 17.1, which is the same as mine. So I am curious how did you make that work without file 90userinit.
2)
To my best knowledge that sysinit is killed in Los 17.1. There is a post on Reddit regarding to enable init.d on Los 17.1. Link is here. What makes me more curious is that how did you manage to make all things work without some key files? If you don't mind could you tell me how did you successfully create swap?
My phone is HTC m8 running on Lineage os 17.1.
Thanks in advance
Hello mrdet,
I didn't configure applying new swap on startup at all, so I didn't dance around absent init.d.
Increasing the paging file consist of two steps.
1. Create a file to be used as swap. This needs to be done once, as file persist after reboot.
Spoiler: mkswap example
Bash:
cd /data
mkdir swap
cd swap
# create swap file
dd if=/dev/zero of=swapfile bs=1048576 count=4096
mkswap swapfile
2. Activate it. This needs to be done after every reboot.
Spoiler: swapon example
Bash:
swapon /data/swap/swapfile
Hope this helps.

Categories

Resources