Results 1 to 8 of 8

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Speed up iPhone without crippling it (launchdaemon editing)

  1. #1
    Smile Speed up iPhone without crippling it (launchdaemon editing)
    Hi all

    First post here. I have been trying to free up memory and cpu cycles on my old 3G for months now, following different guides I found on the internet, and I have concluded, that most tweaks hardly do anything without taking away some functionality that I actually want - like spotlight search. Then it dawned on me, that launchd doesn't just start processes and keep them running. It also provides the possibility of starting and stopping processes on demand. By tweaking KeepAlive and ExitTimeOut settings in different launchdaemon plists I have got a device that for the most part is faster, have more ram available, and doesn't loose any functionality whatsoever. The daemons that responds best to this kind of tweaking seems to be:
    searchd (spotlight)
    installd
    accessoryd
    dataaccessd
    locationd

    These daemons now start when needed and quits again after being idle for a few seconds. when I'm not seaching with spotlight, using location services, syncing or installing my 3G is only running 17 processes, and has approximately 50 Mb free memory. Oh - and it drastically improved my batterylife - probably mostly due to locationd not running when not in use.
    Last edited by djustiz; 09-19-2011 at 08:33 AM.

  2. #2
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,023
    Thanks
    102
    Thanked 788 Times in 731 Posts

    Take a look at this old thread. Lots of information on the subject. Much of it still valid.
    Speed Up Your iPhone/iPod by Removing Launch Daemons

  3. #3
    but removing launchdaemons removes the functionality. Editing them to make them run only when they are needed are two very different things to me.

  4. #4
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,023
    Thanks
    102
    Thanked 788 Times in 731 Posts

    The link was for 'Information Purposes' only.

  5. #5
    Quote Originally Posted by djustiz View Post
    but removing launchdaemons removes the functionality. Editing them to make them run only when they are needed are two very different things to me.
    Can you make a guide or just tell us how this moding works?
    I'm very interessted.

  6. #6
    The Mod works like this; launchd does NOT work like a DOS/windows batch file that simply loads everything and keeps it in memory - it has very sophisticated process control functions - like a combination of init.d and watchdog on*NIX. In short - it is able to monitor when certain daemons are needed, and when they are not. Thus searchd can be configured to start up once you enter the spotlight page, and exit again after being idle for a set time.

    For the listed daemons I set the KeepAlive option to 'false' (boolean), and I've set ExitTimeOut to 3 (integer). Currently restoring after getting a little too creative with the springboard.app - but when I'm done I could post the edited daemons, or write a guide. I recommend reading the man-page for launcd. :-)
    Last edited by djustiz; 09-19-2011 at 04:00 PM.

  7. #7
    Here's an example of an edited com.apple.accessoryd.plist

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>ExitTimeOut</key>
    <integer>3</integer>

    <key>JetsamProperties</key>
    <dict>
    <key>JetsamPriority</key>
    <integer>-49</integer>
    </dict>
    <key>KeepAlive</key>
    <false/>

    <key>Label</key>
    <string>com.apple.accessoryd</string>
    <key>MachServices</key>
    <dict>
    <key>com.apple.accessoryd</key>
    <dict>
    <key>ResetAtClose</key>
    <true/>
    </dict>
    </dict>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/sbin/accessoryd</string>
    </array>
    <key>RunAtLoad</key>
    <false/>

    <key>UserName</key>
    <string>mobile</string>
    </dict>
    </plist>

    The ExitTimeOut value defines the idle time in seconds before launchd terminates the process. (the default is 30 seconds)
    KeepAlive defines whether the process needs to be running continuously, or if launchd is allowed to shut it down when its idle. KeepAlive has a lot of different parameters to define under what circumstances the process should be running, but if you want it to shut down as much as possible, the key needs to be a simple boolean false.
    The RunAtLoad key specifies if the daemon is to start running immediately (during boot), or if launchd should wait and launch it on demand. The default launchd value is false, I only set it in accesoryd because it was set to true by apple.

    Most of the daemons (even most of the ones on the "Speed Up Your iPhone/iPod by Removing Launch Daemons"-list/thread) is already configured by apple to be launched when needed, and killed off when idle - and removing them will not free up additional ram on your device - perhaps during the first few minutes after startup since many of them has the RunAtLoad flag set to true - but after launchd has killed them off after the default ExitTimeOut period they will not take up any precious ram unless you use those specific features. Deleting them may however speed up the booting process. The daemons I chose to manipulate was the ones that was continuously running on my system - even after several minutes of idling. Only I do not know if this is also true for the "safe" daemons (crashreporting etc.) - since I deleted those from my system, and have not yet tried to reenable them to see what is actually running.

    Here's a zip of the aforementioned plists. I'd recommend backing up your original files before you start to edit/swap any plist-files.
    http://dl.dropbox.com/u/4407752/edit...n%20plists.zip

  8. #8

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •