webOS Nation Forums >  Homebrew >  webOS patches > [webOS patch] System Control Optimization patch
[webOS patch] System Control Optimization patch

  Reply
Like Tree8Likes

 
LinkBack Thread Tools Display Modes
Old 12/01/2011, 01:37 AM   #1 (permalink)
Member
 
Join Date: Sep 2011
Location: US
Posts: 32
Likes Received: 4
Thanks: 3
Thanked 3 Times in 3 Posts
Default [webOS patch] System Control Optimization patch

Thought I'd start up a thread on the new System Control Optimization patch that just came out from mau. I for one wanted to understand what this patch was doing before taking the plunge. Any ideas (oh and happy birthday mau) and maybe more importantly what tangible improvements are made when applying this patch?
polaris_silvertree is offline   Reply With Quote
Liked by netwrkr9 likes this.
Thanked By: Saijin_Naib
Old 12/01/2011, 01:56 AM   #2 (permalink)
Member
 
Join Date: Sep 2009
Posts: 32
Likes Received: 2
Thanks: 4
Thanked 5 Times in 4 Posts
Default

Quote:
Originally Posted by polaris_silvertree View Post
Thought I'd start up a thread on the new System Control Optimization patch that just came out from mau. I for one wanted to understand what this patch was doing before taking the plunge. Any ideas (oh and happy birthday mau) and maybe more importantly what tangible improvements are made when applying this patch?
X 2
Techy is offline   Reply With Quote
Old 12/01/2011, 09:01 AM   #3 (permalink)
Member
 
Join Date: Nov 2011
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'd be interested in finding out more about this patch as well.
ran347 is offline   Reply With Quote
Old 12/01/2011, 09:18 AM   #4 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

This patch creates a 'sysctl.conf' file on your device.

Sysctl.conf is a linux file that makes modifications to how the linux kernel deals with what are called 'pages.'

Pages are like bits of data that are used by applications and loaded into RAM.

When you open an app, the app is stored in RAM, along with other disk data, for quick loading.

When you close an app, the kernel decides what page clusters stay in ram and for how long, and what goes.

This was never optimised for webOS, the kernel still deals with pages and cache like any other linux distribution.

But, webos IS different: it runs on a solid state drive and runs uncompiled html5 and javascript, which tend to leave memory leaks.

So, I spent 4 months optimising the memory managment for webos to run faster with less memory leaks.

Here's what I changed.


vm.swappiness = 10

This tells the kernel to favor RAM over swap.


vm.vfs_cache_pressure = 20


This leaves less ram for the kernel itself, which is smaller than normal kernels.


vm.dirty_expire_centisecs = 1200


This is the time in ms for how often the kernel considers pages to be expired

vm.dirty_writeback_centisecs = 500

Same as above but how often it writes pages back to the disk.

vm.dirty_background_ratio = 30


What % of ram is reserved for pages after swap back

vm.dirty_ratio = 50

What % of ram in total can be used for pages

vm.min_free_kbytes = 1024

The minimum amount of kilobytes that must be free in memory

vm.max_map_count = 65536


How many kb a single program can take up in memory

vm.overcommit_memory = 1

If the kernel is allowed to overcommit more memory than an application needs in ram.

vm.overcommit_ratio = 10

What % of the total memory the application is using can be overcomitted.

vm.zone_reclaim_mode = 2

What method the kernel uses to reclaim memory

kernel.shmax = 268435456
kernel.shmall = 16777216
kernel.shmmni = 65576


Kernel stuff :P

sched_compat_yield = 1

How the kernel deals with clusters of pages.

vm.lowmem_reserve_ratio = 1024

How much ram in total must be reserved for low memory situations.

What does this mean in lamens terms? A smoother running system with less lags and hiccups.

Basically webOS will be forced by the kernel to run lean, and any memory leaks will be swept away by the kernel more aggresively and more often.





-- Sent from my Palm Pre3 using Forums
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Liked by Rnp and Eigan like this.
Old 12/01/2011, 10:30 AM   #5 (permalink)
Member
 
The Bard's Avatar
 
Join Date: Jul 2007
Location: 泗水 , 印度尼西亚
Posts: 684
Likes Received: 48
Thanks: 137
Thanked 30 Times in 27 Posts
Default

Well I got TMC error which I never got before. I open 6 webpages. And run Preware to install some patches. Pre3 freeze several times several seconds, then TMC error pop up. I uninstalled this patch, and I'll test again if TMC will happen again.
The Bard is offline   Reply With Quote
Old 12/01/2011, 10:32 AM   #6 (permalink)
Member
 
Join Date: Nov 2009
Posts: 96
Likes Received: 1
Thanks: 9
Thanked 8 Times in 7 Posts
Default

willl not install on my pre- running F104 kernel 1 of 1 hunks failed, saving rejects to etc/sysctl.conf.rej.
any ideas? And yes I did try to install the legacy device version. Also running 1.4.5.

Last edited by dballew; 12/01/2011 at 01:18 PM.
dballew is offline   Reply With Quote
Old 12/01/2011, 10:33 AM   #7 (permalink)
Member
 
Join Date: Feb 2008
Posts: 3,239
Likes Received: 306
Thanks: 391
Thanked 579 Times in 357 Posts
Default

Holy cow.
Installed it on the TouchPad as I assume it would help there as well as phones, is that right?
bluenote is offline   Reply With Quote
Old 12/01/2011, 10:37 AM   #8 (permalink)
Member
 
The Bard's Avatar
 
Join Date: Jul 2007
Location: 泗水 , 印度尼西亚
Posts: 684
Likes Received: 48
Thanks: 137
Thanked 30 Times in 27 Posts
Default

Quote:
Originally Posted by bluenote View Post
Holy cow.
Installed it on the TouchPad as I assume it would help there as well as phones, is that right?
I haven't got TMC error on TP yet. I installed this patch both on my Pre3 & TP today. So I will test more on TP.
The Bard is offline   Reply With Quote
Old 12/01/2011, 11:08 AM   #9 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

Quote:
Originally Posted by dballew View Post
willl not install on my pre- running F104 kernel 1 of 1 hunks failed, saving rejects to etc/sysctl.conf.rej.
any ideas? And yes I did try to install the legacy device version. Also running 1.4.5.
If you installed my "touch sensitivity" patch, I recommend removing it, installing the newest version, and then installing the sysctl patch
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Old 12/01/2011, 11:09 AM   #10 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

Quote:
Originally Posted by The Bard View Post
Well I got TMC error which I never got before. I open 6 webpages. And run Preware to install some patches. Pre3 freeze several times several seconds, then TMC error pop up. I uninstalled this patch, and I'll test again if TMC will happen again.
I have never run a webOS device without uberkernel, which disables the TMC errors entirely so I wouldnt know.
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Old 12/01/2011, 11:26 AM   #11 (permalink)
Member
 
Join Date: Aug 2011
Posts: 1,923
Likes Received: 205
Thanks: 21
Thanked 196 Times in 143 Posts
Default

As an aside, I'd like to mention that a centiseconds is 1/100th of a second, and a millisecond is 1/1000th.
__________________
GVoice for all webOS devices - for PlayBook - GVoiceA for Android
XO - The Subsonic Media Commander - webOS Demo and Full version and PlayBook full version available
- Ask500, the webOS polling app


(1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
eblade is offline   Reply With Quote
Old 12/01/2011, 11:28 AM   #12 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

I might change Overcommit ratio to 70 for the Touchpad.

It can afford the RAM, and the nice thing about overcommit is that it makes everything run fluidly because LUNA is given a huge chunk of ram to quickly expand into. IE: a bunch of ram is "committed" to LUNA, which means that it can be compiled very quickly without jitteryness.

IN lamens terms: overcommit uses more RAM but allows apps to quickly run, and the 1gb on the touchpad allows for this.

Gonna test it out, I think by keeping dirty data and memory leaks at bay it wont cause a situation where you quickly run out of memory. hopefully.
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Old 12/01/2011, 11:29 AM   #13 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

Quote:
Originally Posted by bluenote View Post
Holy cow.
Installed it on the TouchPad as I assume it would help there as well as phones, is that right?
Yes, but i have had the touchpad significantly less, so im still optimizing for it. It appears to like a bigger overcommit ratio.

Too little and Luna gets grumpy on it. WHERES MY RAM B****?
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Liked by Vistaus likes this.
Old 12/01/2011, 11:43 AM   #14 (permalink)
Member
 
Join Date: Feb 2008
Posts: 3,239
Likes Received: 306
Thanks: 391
Thanked 579 Times in 357 Posts
Default

Did you test with Veer and/or Pre 2 or just Pre3?
bluenote is offline   Reply With Quote
Old 12/01/2011, 11:47 AM   #15 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

I've tested with a pre minus (for legacy) preplus, veer, pre3 and touchpad

-- Sent from my Palm Pre3 using Forums
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Thanked By: bluenote
Old 12/01/2011, 04:27 PM   #16 (permalink)
Member
 
Join Date: Sep 2011
Posts: 6
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if this is modifying the kernel then would it cause any problems with homebrew kernels like phantom or uberkernel?
PMartinez527 is offline   Reply With Quote
Old 12/01/2011, 04:39 PM   #17 (permalink)
Member
 
Join Date: Feb 2011
Posts: 80
Likes Received: 1
Thanks: 2
Thanked 1 Time in 1 Post
Default

Getting the error:
"The patch would create the file etc/sysctl.con, which already exists..." I am running webos 2.1 on a pre- with uberkernel. Had increase touch responiveness and smothness patch installed. Deleted it and tried again, but still the same fault... May I delete the sysctl.conf and try installing again?

EDIT: CAN BE IGNORED!!!

I had installed the sysctl patch from this site:
http://www.webos-internals.org/wiki/...rade_Pre_Minus

There is a sysctl patch that does similar things with I think less agressive values. I don't really know if that is right, but the values in the old sysctl.conf seemed to be less agressive (for example swappiness 90)...

Last edited by k4llle; 12/01/2011 at 05:33 PM.
k4llle is offline   Reply With Quote
Old 12/01/2011, 05:59 PM   #18 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

Quote:
Originally Posted by k4llle View Post
Getting the error:
"The patch would create the file etc/sysctl.con, which already exists..." I am running webos 2.1 on a pre- with uberkernel. Had increase touch responiveness and smothness patch installed. Deleted it and tried again, but still the same fault... May I delete the sysctl.conf and try installing again?

EDIT: CAN BE IGNORED!!!

I had installed the sysctl patch from this site:
http://www.webos-internals.org/wiki/...rade_Pre_Minus

There is a sysctl patch that does similar things with I think less agressive values. I don't really know if that is right, but the values in the old sysctl.conf seemed to be less agressive (for example swappiness 90)...
I wrote that entire page in the summer.

That is my patch on the site.

That version is for legacy phones ONLY (pre minus, pixi, pixi plus)

DO NOT INSTALL IT ON ANY OTHER PHONE.

Do not install the non legacy patch in prepare on those phones!!!

Use the right patch for the right phone.


-- Sent from my Palm Pre3 using Forums
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Old 12/01/2011, 06:00 PM   #19 (permalink)
Member
 
Join Date: Sep 2009
Location: Canada
Posts: 1,488
Likes Received: 311
Thanks: 64
Thanked 660 Times in 214 Posts
Default

Quote:
Originally Posted by PMartinez527 View Post
if this is modifying the kernel then would it cause any problems with homebrew kernels like phantom or uberkernel?
No.

-- Sent from my Palm Pre3 using Forums
__________________
Please Donate if you like my patches and work. Thanks
rmausser is offline   Reply With Quote
Old 12/01/2011, 06:14 PM   #20 (permalink)
Member
 
Join Date: Feb 2011
Posts: 80
Likes Received: 1
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
I wrote that entire page in the summer.

That is my patch on the site.

That version is for legacy phones ONLY (pre minus, pixi, pixi plus)

DO NOT INSTALL IT ON ANY OTHER PHONE.

Do not install the non legacy patch in prepare on those phones!!!

Use the right patch for the right phone.
It's a great guide. So your new patch is better / more aggressive than the old one?
k4llle is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0