• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

[ALL] [MOD/Other] Disable/Enable *SWAP *zRam *Fstrim

79 posts in this topic

Posted · Report post

hwy just out of curiosity, will this method work on any device??

 

Not really, first is needed a kernel with swap and zram support *obviously* Busybox too is needed 
 
and SWAP scripts should be ajusted acording to the device's specificactions, I mean to the swap file size...
 
zRAM isn't always located at the same place on all devices, so it is need to be ajusted too...
0

Share this post


Link to post
Share on other sites

Posted · Report post

 

My Sysctl-Preferences.
 
To end, here a script with my SysCtl preferences like swappiness, min_free_kbytes, read_ahead_kb...
 
 
 
 
 
That's all! Greetings!

 

 

¿Qué hace esto? no entiendo muy bien esta parte, pero me parece interesante :)

 

[What this does? I don't understand very well this part... But looks interesting :) ]

0

Share this post


Link to post
Share on other sites

Posted · Report post

¿Qué hace esto? no entiendo muy bien esta parte, pero me parece interesante :)

 

[What this does? I don't understand very well this part... But looks interesting :) ]

 

Son solo ajustes o tweaks para mejorar un poco el rendimiento...

 

Esos ajustes los tome del script V6 Supercharger de @zeppelinrox

1

Share this post


Link to post
Share on other sites

Posted · Report post

Son solo ajustes o tweaks para mejorar un poco el rendimiento...

Esos ajustes los tome del script V6 Supercharger de @zeppelinrox

Gracias por responder. Por cierto, para que el SWAP sea efectivo debo utilizar el almacenamiento interno en vez de la memoria externa por defecto? O eso no influye?

0

Share this post


Link to post
Share on other sites

Posted · Report post

Gracias por responder. Por cierto, para que el SWAP sea efectivo debo utilizar el almacenamiento interno en vez de la memoria externa por defecto? O eso no influye?

 

err... Actually, device internal memory is faster than the most of Micro-SD cards... With these scripts SWAP.file is only created at /System or /Cache (internal memory), if you have a super faster Micro-SD Card like this one then you are free to find a way to use SWAP in your Micro-SD Card because the differences will be huge  :P

 

Regards.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Improve SSD performance with fstrim --> FSTRIM(8)

 

It seems that SSD performance decreases over time, since unlike hard disk drives (HDDs), NAND flash memory that make SSD cannot overwrite existing data. This means that you first have to delete the old data before writing new one.

 

Flash memory is divided into blocks, which is further divided in pages. The minimum write unit is a page, but the smallest erase unit is a block. This means that as time goes on, the SSD will internally fragment the blocks among the different pages, until that it reaches a point where there won’t be available any empty page. Then every time the drive needs to write a block into any of the semi-full pages, it first needs to copy the current blocks from the page to a buffer, then it has to delete the whole page to finally rewrite the old blocks along with the new one. This means that as time goes on the SSD performance degrades more and more, because for every write it has to go through a cycle of read-erase-modify-write. This is known as “write amplification”.

 

TRIM was invented for solving this problem, allowing the operating system to tell the SSD which blocks are free in the filesystem. The SSD uses this information to internally “defragment” the blocks and keep free pages available to be written quickly and efficiently.

 

- See more at: http://fcns.eu/2013/09/12/improve-ssd-performance-with-fstrim/#sthash.F96ibMjL.dpuf

0

Share this post


Link to post
Share on other sites

Posted · Report post

UPDATE...***

 

now you can disable all you active or vice versa by choosing the right flashable file....
 
and new script -> Fstrim.!
1

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Is it 'OK' if my cache partition is full when i use swaponV2?

Edit: Nevermind in my CM10.1 cache partitions is used by 75MB,when i look in that folder it showed dalvic cache is using that amount :huh:

Edited by MasterRck
0

Share this post


Link to post
Share on other sites

Posted · Report post

Is it 'OK' if my cache partition is full when i use swaponV2?

Edit: Nevermind in my CM10.1 cache partitions is used by 75MB,when i look in that folder it showed dalvic cache is using that amount :huh:

 

Yes, Dalvik Cache at /Cache partition is a CyanogenMod feature... 

0

Share this post


Link to post
Share on other sites

Posted · Report post

Thank you for this. My device's (7275R) stock rom (and there's not any other ROMs arounds, nobody has even built a kernel yet) has an issue where when its idle, the zRAM daemon (kcompcached) will start using a lot of CPU, resulting in less than 10 hours of standby (Samsung's quality software engineering is to blame), preventing the CPU from entering in deep sleep state. The init.d script resulted in noticable improvement in standby drain. Note the difference in discharge rate and CPU usage after the gap when I shut down the system and applied the patch.

post-1040208-0-70291000-1397906793_thumb

 

Re. the fstrim patch: How often is TRIM expected to run? After 4 or 5 hours I've yet to see a trim.log file in /data.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Thank you for this. My device's (7275R) stock rom (and there's not any other ROMs arounds, nobody has even built a kernel yet) has an issue where when its idle, the zRAM daemon (kcompcached) will start using a lot of CPU, resulting in less than 10 hours of standby (Samsung's quality software engineering is to blame), preventing the CPU from entering in deep sleep state. The init.d script resulted in noticable improvement in standby drain. Note the difference in discharge rate and CPU usage after the gap when I shut down the system and applied the patch.

attachicon.gifScreenshot_2014-04-19-14-02-061.png

 

Re. the fstrim patch: How often is TRIM expected to run? After 4 or 5 hours I've yet to see a trim.log file in /data.

 

Thanks for feedback!  ^_^

 

...and, partitions are trimmed every system boot. 

0

Share this post


Link to post
Share on other sites

Posted · Report post

Just a question: if I want a bigger swap files? For example 500mb in /system folder, what can I do?

0

Share this post


Link to post
Share on other sites

Posted · Report post

Just a question: if I want a bigger swap files? For example 500mb in /system folder, what can I do?

edit the script from 282000something like this to 500000

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

edit the script from 282000something like this to 500000
I can't find the value 282000 in any file of the script. Witch file I must modify? Edited by EmaGiampa
0

Share this post


Link to post
Share on other sites

Posted · Report post

I can't find the value 282000 in any file of the script. Witch file I must modify?

yeah your right sorry.

download the zip open it and go to bin folder and open the swap file with wordpad then modify this line:

 

system/swap.file bs=1048576 count=250   to>> system/swap.file bs=1048576 count=500

 

pay attention to your total system memory before doing this because if is less than 500mb i dont know what will happen :S

0

Share this post


Link to post
Share on other sites

Posted · Report post

How can I see my total system memory?

0

Share this post


Link to post
Share on other sites

Posted · Report post

Type "free" in a terminal.

 

Output is as such

127|u0_a181@android:/ $ free
             total         used         free       shared      buffers
Mem:        882696       871744        10952            0         1248
-/+ buffers:             870496        12200
Swap:            0            0            0
1

Share this post


Link to post
Share on other sites

Posted · Report post

u0_a55@u8833:/ $ free

total used free shared buffers

Mem: 401232 392372 8860 0 5544

-/+ buffers: 386828 14404

Swap: 255996 61484 194512

u0_a55@u8833:/ $

0

Share this post


Link to post
Share on other sites

Posted · Report post

Total 400mb... Well, I hoped for use 634mb for reach a 1gb with my 390mb of RAM real. Huawey Y300.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Is it posable to have more than one swap file? If so maybe we can add one to /cust partition as well. It's only 79 mb but it's wasted space with custom ROMs.

0

Share this post


Link to post
Share on other sites

Posted · Report post

I'd like to create a swap file on SD card.

0

Share this post


Link to post
Share on other sites

Posted · Report post

How can I check the fstrim state?

I flashed it, wipe dalvik/cache, and restart... but I want to know if that zip worked... :P

0

Share this post


Link to post
Share on other sites

Posted · Report post

How can I check the fstrim state?

I flashed it, wipe dalvik/cache, and restart... but I want to know if that zip worked... :P

 

Check log!  ;)

 

"/data/trim.log"

1

Share this post


Link to post
Share on other sites

Posted · Report post

Check log!  ;)

 

"/data/trim.log"

 

Thanks! ;)

 

And... the fstrim zip must be flashed only once, right?

 

And thanks again :)

0

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks! ;)

 

And... the fstrim zip must be flashed only once, right?

 

And thanks again :)

yes. it runs every boot ;)

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.