[PERFORMANCE FINDING] Disabling FSYNC Greatly Improve OPO Speed - ONE General

So,
I believe many of us here already know about fsync,
Basically this is the description :
fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other permanent storage device) so that all changed information can be retrieved even after the system crashed or was rebooted. This includes writing through or flushing a disk cache if present.*The call blocks until the device reports that the transfer has completed.*It also flushes metadata information associated with the file (see stat(2))
Click to expand...
Click to collapse
.
So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data.
Now, we all know that there's advantage and risk in doing it,
But what bring me into a conclusion to do this is :
The data inconsistency and lose might only happen if the system crash. Or random reboot happen.
Meanwhile, from what i see n feel, my system is pretty (if not rock hard) stable.
Never have system crash in months or so.
So i decide to see how far disabling FSYNC can improve the device speed.
Well, as you can see in attached image,
Before :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After :
Disabling it alone can increase write speed up to 30-40%
So, if you think your system is stable enough or very stable, i think disabling FSYNC will bring more good than bad for our OPO
And, as how to actually disable it :
There's few ways to do that,
Code:
If your kernel support Synapse, then u can turn it OFF from Synapse in MISC option
or
Code:
Open terminal emulator on your phone and give the command: su
Then give the command: echo 1 > /sys/class/ misc /fsynccontrol/fsync_enabled

Seems Boeffla CM12 alpha 6 kernel disabled it by default.

Boeffla disable it only when the screen off .
The feature called Dynamic Fsync,
But i think the real time effect only can be feel if u use it when screen on

As stated in the OP, this should only be applied on a rock solid build and certainly not Lollipop.
I try to avoid this mod since my SD card got wiped on my S2 with this enabled. It was a test, KitKat build and I should have known better.
Not trying to discourage anyone, just stating my experience for a more objective view on the subject.

What about "Dynamic Fsync"??
I never understood or felt the difference when enabling or disabling the two.

OmegaBlaze said:
What about "Dynamic Fsync"??
I never understood or felt the difference when enabling or disabling the two.
View attachment 3069431
Click to expand...
Click to collapse
It's the same concept.
Disabling it would increase I/O speeds, however in occurrence of a system crash or random reboot, there is a high chance of losing data - like how in Note 3 AOSP when you get a random reboot, Swiftkey loses it's configuration and you have to reconfigure it.

Not a great idea if you value your data, way too unstable.
Transmitted via Bacon

Related

Multitasking the Android Way

My apologies if this is a repost but I came across this yesterday and thought people here might be interested. Anyone that has ever been confused by the way Android multitasks (let's be honest, we all have) should read this.
http://android-developers.blogspot.com/2010/04/multitasking-android-way.html
Interesting. And the author certainly has a cool last name.
Definitely a good read. Thanks.
I'm still TOTALLY confused between what a process vs service is and how everything works together. what's the difference between an app I just sent to the background vs its associated service or process? are they one and the same?
RogerPodacter said:
I'm still TOTALLY confused between what a process vs service is and how everything works together. what's the difference between an app I just sent to the background vs its associated service or process? are they one and the same?
Click to expand...
Click to collapse
A process is any task that the CPU has to perform. For example, say you open a text file. That's a process. Once the file is opened, the process is done.
A service is a long-running task, often launched by a process. More specifically, services are A) for tasks need to run in the background, B) usually for long-periods of time (or indefinitely), and C) most importantly, independent of user-input. Instead, services usually respond to changes in the system (ie Battery Indicator, see below), or periodically checking the internet for something.
- For example, the Battery Indicator app, which puts the battery percentage in the status bar (see picture below). Whenever the battery changes in the system, the Battery Indicator service is alerted, and the percentage in the status bar is changed.
- Another example is the Google Talk service, which is running whether or not you launched the app. That's because it needs to stay open in case someone messages you.
Without services, nothing could run in the background for long periods of time. For example, without the Google Talk service, if you wanted to receive a message, you'd have to have the app open and in the foreground 24/7. Once you opened another app, you'd go offline. (coughiPhonecoughcough )
You can view your services in Settings -> Applications (on Sense UI anyway).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Very informative, thanks for that.
Excellent blog post! Thanks!
This would definitely seem to support the "No task killer" philosophy.
Good stuff to see...thanks
aujbman said:
This would definitely seem to support the "No task killer" philosophy.
Click to expand...
Click to collapse
I wish I could agree with that but without some type of task manager, my N1 does not run smooth at all. =\

[JB] 9/20/2012 11am EDT Modem Fast Dormancy Service on Atrix 4G

CAUTION: The attachment was tested on JB with epinter's CM10.
USE AT YOUR OWN RISK!
The purpose of this thread is to discuss Fast Dormancy, which is a fairly hot topic, discussed at length on the Galaxy S3 with respects to being enabled or disabled in order to improve battery life.
The article here http://www.faqs.org/patents/app/20120120799 details AT&T patent application "DATA BUNDLING AND FAST DORMANCY BASED UPON INTERACTIVITY - Data flow congestion prevention or control control of data admission to the network end-to-end flow control" and is worth reading when you can't sleep. It won't help with this post other than to acknowledge that it's more than just talk.
AT&T have implemented Fast Dormancy as discussed here (this is worth a watch): http://www.youtube.com/watch?v=2VhwQ04IXJM.
In brief, if your provider has implemented Fast Dormancy, then you should enable on your device ( http://www.androidnz.net/2012/06/at-your-own-risk-how-to-disable-fast.html?m=1 ).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Yes, Fast Dormancy is carrier dependent, and that is the primary factor that should influence the use.
On the phone, Fast Dormancy is implemented via the Modem Fast Dormancy Service (Fastdormacy.apk). I have found that this should be installed under /system/app, i.e. copy in using Root Explorer and set permissions to root:root 644 (rw-r--r--). At this stage I do not recommend installing like a traditional user apk. If you don't know what this means, then you should not be attempting to implement this.
The Modem Fast Dormancy Service works in conjunction with a setting in either of the following two files:
Code:
/data/local.prop
/system/build.prop
The entry that controls the Modem Fast Dormancy Service is as follows:
Enabled:
Code:
ro.ril.fast.dormancy.rule=1
Disabled:
Code:
ro.ril.fast.dormancy.rule=0
It appears that the Modem Fast Dormancy Service can be seen in action on the Atrix 4G after a reboot.
This is what I observed in my tests. The phone will show H on the status bar, when data is in use and you'll see the 3G logo a lot more, as it will become the default idle state. Upon data being used, H will quickly display on the status bar for the duration of the data transfer and then revert back to 3G upon completion.
Another method to watch the radio state on the Atrix, is under System Settings, About, Status.
Here you can see the Mobile network type and see the changes as they occur:
UMTS:3
HSDPA:8
HSPA:10
It is worth investigating this further and understanding how to best implement on the Atrix. My suggestion to the CM team would be to incorporate as a check box, so that like many other features, Fast Dormancy can be toggled by the user.
At this time there is no deep sleep with Fastdormacy.apk with the configuration described above. This is not ready for general use. Expect high battery drain and I suggest not to implement unless testing an updated configuration.
Here's a link that might be worth looking through http://forum.xda-developers.com/showthread.php?t=1712141
CAUTION: The attachment was tested on JB with epinter's CM10.
USE AT YOUR OWN RISK!
Chronological Updates
Watch this space for chronological updates:
9/20/2012 4am initial post with first attempt
9/20/2012 11am discovered no deep sleep with Fastdormacy.apk in this configuration. Not ready for general use. Expect high battery drain and suggest not to implement unless testing an updated configuration.
Sent from my MB860 using Tapatalk 2

[mini Guide] Solving Performance and battery issues in XXLSA Stock Jelly Bean ROM

Most of us have experienced performance issues with increased upgrades on the N7000. Here is what I figured out so far. Please share your knowledge for that we all may get the best User Experience! :silly:
- Set the mouse pointer speed to a maximum
- Get rid of touchwiz
- turn off Multi-window mode (e.g. Notification Settings Buttons)
- regularly do a soft-reboot ( https://play.google.com/store/apps/details?id=com.greatbytes.fastreboot&hl=en )
- use the JB 4.2 Android keyboard and not the Samsung Keyboard
- turn off background monitoring apps (performance meters etc...)
-Install only software you really need in the first place
-Reboot your phone if you haven't seen in go into Deep Sleep (System-Settings> Battery> Bluebar indicator for "Awake")
- Awaking from Deep Sleep takes a bit - there isn't much you can do. ( e.g. see this thread: http://forum.xda-developers.com/showthread.php?t=1136223&page=20 )
- By using Apex Launcher, I have around 50% of ca 700Mb in total RAM free after a fresh boot, with various software already installed.
PS: Note that since yesterday ( http://www.gsmarena.com/galaxy_s_iii_gets_android_412_update_brings_note_ii_experience-news-5166.php ) when using the internal OTA update command I get an error that I modified my OS. In other words, Samsung has now flagged its leaked ROM.
Can others confirm this?
The official JB ROM release for the N7000 is probably very imminent, yet will likely not improve much in terms of memory consumption
if you turn off all the animation using Developer Options -> it increases the performance to an extent
Make sure that ALL monitoring software is turned off, when the device is not needed. If you see regular, periodic activity in your battery stats that is a good indicator that some monitoring, or "similar functionality application" is running. Before turning the device to sleep, I do a soft-reboot, kill all running apps and set it to flight mode.
You can get a gouvernor to do this for you - on rooted ROMs. See xda for more information. All experiments were done on the official stock, unrooted JB ROM.
Before (already after some "optimization tinkering"):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After:
PS: I generally halfed the animation transition time (i.e. set it to 0.5)
GPS was on (but not utilized).
just quick a question, can any current JB (or even ICS) ROMs give a good battery drain on 2G and standby?
Like the 1 I had during GB, without going into airplane mode:

Tip for JB stock ROM users.

I am far from being an Android power user. I don't use mods, skins or launchers and prefer to stick to stock ROMs.
The farthest I go is to root my device, given the fact that some apps I need either work better with it or won't work at all without it.
So you have an idea, just the other day I posted I couldn't figure what "Greenify" was good for since, as I understood it, If we have to enter the app to hibernate/de-hibernate the target apps we might as well just launch and kill them, as needed, only to be kindly enlightened by another user about the fact of life that some apps do still run in the background, even after we've killed them.
...Pretty "tech challanged", right?
...but, coming from this "restricted" background, I do have a tip to share with you guys after having tried some online suggestions to deal with the relative "sluggishseness" and low Quadrant benchmarks I was faced with, after having migrated to JB XSP.
Apps took up to 3 seconds to launch and I was having this kind of values in Quadrant:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I tried a bunch of stuff to improve things up. I removed a series of apps I rarely used, even some system ones, using SystemApp Remover and inhibited others like MacroDroid. Still, no improvements.
Until...
Today, acting on tip read online, I went to "Settings" ---> "Developer Options" ---> (Activate) ---> "Drawing" and changed "Window animation Scale", "Transition Animation Scale" and "Animation Duration Scale" from the default values to 0.5x.
I got definite improvement in launch response, general "sluggishseness" with Quadrant values jumping to this:
Happy Puppy now
Hope this helps!
XK
I tried your suggestion and here are my results
Before change
4488
After change
3446
Restored to original settings
4146
Sorry for lack of images but I am unable to attach them.
In my case those settings did not improved the performance it actually decreased it. This might be on a case by case scenario but a good tip nonetheless
Sent from my GT-P6800 using xda premium
Note the huge jump in the I/O score. Seems out of character with the other devices.
"media" app. is consuming too much battery n running constantly even after force stopped. How to solve this issue..?
aries8 said:
"media" app. is consuming too much battery n running constantly even after force stopped. How to solve this issue..?
Click to expand...
Click to collapse
use this https://play.google.com/store/apps/...SwxLDEsImNvbS5hZGR6Lm1lZGlhc2Nhbm5lcnJvb3QiXQ..
or
https://play.google.com/store/apps/details?id=com.addz.mediascanner&feature=more_from_developer
to stop the media scanner

Fix for 4.4.2 kernel core throttling with Pegasusq governor

OK, this is an update that goes beyond my general discussion on 4.4.2 vs 4.2.2 differences,
I have completely figured out how to make Pegasusq properly throttle cores, and tweaked it to be more like ondemand in fast upscaling of core speeds.
3
It matches what I have with 4.2.2 and allows a stable read ahead cache of 768. Anything higher will cause a dirty shutdown.
Here are my screen captures of a 3 minute time frame of the frequencies used after and during boot, and my settings. Please be sure to copy your settings down before changing them.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I knot iced that my screenshots are not public, so you must be logged in to view them.... Here is a link to my tweaks' it may help.
http://forum.xda-developers.com/album.php?albumid=11644
Update
After a bit of testing further with newly updated apps along with some that I rarely check, as their startup interfaces are more gimmick over their function, I realized that I needed to push my settings further. So, I have made further optimizations that have replaced some of the original screenshots. There are a few changes that were not done previously, thst are now incorporated to allow for better throttling.
My final settings
OK, I am finally done with this! A lot of issues were with xposed. To remedy strange CPU throttling, ended up using the beta test version with my odd mix of modules. Not sure which module does not play well with others but did find it interesting that wanam allowed customizations to the status and notification bars when my CPU throttling was bad. So bad it would not go into power save mode with CPU throttling. Once I removed xposed and installed the test version, wanam would not do much custom changes to the status and notification bars.
Obviously one of the new modules I am using blocks such changes.
Well any way, I can safely use 2048 read ahead cache, and build.prop mods with my tweaks.
So now kitkak is kickass,.
Wanam xposed modules cause core throttlng issues
Well after a lengthy bout of hunting issues with apps causing throttling issues, I was thwarted by Wanam and xposed. First of when I uninstalled exposed, my tablets ability to throttle 300 and 400 went out the door and never came back. Though by some odd instance in testing I managed to get 300 and 400 to be utilized. Primary concern is nnow with wanam, as it is a battery sucker... Tests have shown all wanam modules will throttle the CPU cores when no loads are being put on the system. I am now pushing 8% drain per hour with browsing and switching to apps. Had a few reboots after making system tweaks, 4 ttotal. Each one takes about 1% of battery.
Not happy at all, as I expected better compatibility with 4.4.x
So now I am wondering if throttling is effected by disabling DVFS, if that can be done? Seems like the wanam DVFS Disabler also has issues like its bigger counterparts. I stopped using wanam now on the 4.4.2 tablet. As it is flaky with power consumption,.

Categories

Resources