<---- template headericclude ----->
Speed up your boot time!
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Join Date
    Dec 2004
    Location
    Canada
    Age
    32
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Speed up your boot time!

    Hello,
    I've noticed that Fedora takes a long time to boot, and most of it can be disabled.
    A quote from justol'bob:
    Quote Originally Posted by justol'bob
    There have been several threads about how Fedora may take longer to boot than you're happy with. A couple of excellent threads already exist on ways to speed up the process:

    In-depth howto
    BootCharts
    Uber-startups!

    However, you may have wondered as all the startup processes speed by: 'Do I really need all of that? What ARE those things used for?'

    This 'How-to' is to answer some of those questions and to suggest which processes MIGHT be turned off and which ones MUST be left on.
    To start, let's learn a bit about the boot processes.

    Background Info

    init is what starts your computer -- It loads the services and determins which ones to start in what order.

    chkconfig sets the bool values (true / false) on the services to enable/disable them at startup.

    service controls currently running services by starting, stopping or restarting them.

    There are 7 runlevels to init, each will have a different configuration/do differnt things:
    configurable mean you can edit the daemons & services that start
    0 = shutdown (not configurable)
    1 = single-user (not configurable)
    2 = multi-user (configurable, full CLI functionality but no network, this one is usually ignored)
    3 = multi-user (one of the common ones, configurable, full CLI functionality)
    4 = Xen kernel (configurable, but ignored b/c not many people use it)
    5 = Runlevel 3 + X Windows (configurable, most used, full graphical functionallity)
    6 = reboot (not configurable)

    Note that, init, chkconfig and service are commands, and also that you'll need to be root first:
    Code:
    su -
    Now that you're root (make sure you add that space & dash after su...), you can execute the commands:
    Code:
    init [0-6]
    example
    init 1
    -------------------
    Code:
    chkconfig [service name] [ on | off ]
    examples
    chkconfig sendmail off
    chkconfig nvidia-glx on
    -------------------
    Code:
    service [service name] [ start | stop | restart ]
    examples
    service network restart
    service wpa_supplicant start
    service sendmail stop
    Next, let's go into the default runlevel: This is part of the /etc/inittab file:
    Code:
    # Default runlevel. The runlevels used by RHS are:
    ... - snip - ...
    #
    id:3:initdefault:
    Changing the number (in this case, 3 -> 5) will change your default runlevel.
    Now, let's move on.

    Changing your default services

    If you're in the GUI, you can install an easy tool to do so:
    Code:
    su -
    yum install system-config-services
    It can now be accessed under [System menu] > Administration > Server Settings > Services or by running
    Code:
    system-config-services
    from the menu. I like to [Edit Runlevel menu] > Runlevels All to let you edit runlevels 3, 4 and 5 all at once.

    If you're in the terminal, you're stuck with the manual chkconfig command. Sorry.
    Code:
    man init
    man chkconfig
    man service
    for more info on the commands.

    Last thing I'm going to say is don't be afraid to disable services; The worst that can happen is something won't work and on reboot you simply re-enable it.

    Priorities:
    L = Only laptops need this.
    D = Only Desktops need this.
    A = All need this! Keep it enabled.
    HR = Highly Recommended! But not absolutely needed. Better to keep enabled.
    R = Not needed at all but nice to have.
    NN = Not needed, disable at will. Keep enabled if you're using things itn it's description, though.

    [ service ] : [ Description ] : [ Priority ]

    NetworkManager : Best network selection : L
    acpid : Power managment : HR
    anacron : More Cron management : HR
    apmd : For laptop's battery monitoring : L
    atd : Similar to Cron's functions : NN
    autofs : Auto-detect/mount filesystems : HR
    ahavi-daemon : Zeroconf stuff : NN
    avavi-dnsconfd : DNS Zeroconf stuff : NN
    bluetooth : needed for bluetooth wireless devices to work : NN
    btseed : BitTorrent Seeding : NN
    bttrack : BitTorrent tracking : NN
    cpuspeed : dynamic CPU speed daemon : L
    crond : Automated tasks : A
    cups : Central Unix Printing System : HR
    cups-config-daemon: Central Unix Printing System through D-Bus : HR
    dc_client : SSL session cache client proxy : NN
    dc_server : SSL session server : NN
    dhcdbd : D-BUS control of ISC DHCP client : NN
    diskdump : Create Dump files if system crashes : NN
    firstboot : First-boot configuration utility : NN after your first boot
    gpm : Mouse support in terminals (runlevel 3) : NN
    haldaemon : Hardware Abstraction Layer : A
    hplip : HP Printer service : A for all that use HP Printers
    httpd : Apache's Web server : NN
    iptables : Firewall. Plain & Simple. : A
    isdn : Integrated Services Digital Network : NN
    kudzu : hardware probe at startup, only if you're changing hardware : NN
    lirc : Infrared controls : NN
    lisa : Similar to "Network Neighbourhood" : R
    lm_sensors : System sensor monitoring : A that have CPU / fan sensors
    mdnsresponder : Howl network : NN
    messagebus : The system-messenger dbus : A
    mysqld : MySQL's database server : NN
    named : BIND DNS server : NN
    netdump : netconsole & netcrashdump utility : NN
    netfs : Network filesystems : HR
    netplugd : Dynamic network managment : NN
    network : Network connectivity & services : A
    nifd : Network interface monitor daemon : NN
    nscd : Name service caching daemon : NN
    ntpd: Network Time Protol : NN
    nfs + nfslock : NFS servers : NN
    portmap : RPC connections, like NFS / NIS : NN
    pcmcia : Laptop PCMCIA : L
    redahead & readahead_early : Caches boot services & therefore decreases boot time : A
    rpcgssd : NFS v4 connection helper : NN
    rpcidmapd : NFS v4 connection helper : NN
    rpcsvcgssd : NFS v4 connection helper : NN
    saslauthd : plaintext auth in cyrus-sasl : NN
    sendmail : Mail server, although there are better ones out there I'd disable this one and install something like squirrelmail. Either way, it's enabled by default and can be disabled. : NN
    smb : The Samba or SMB server : NN
    snmpd : Simple Network Management Protocol : NN
    snmptrapd : Simple Network Management Protocol : NN
    sshd: remote SSH server : NN
    syslog : System & Kernel logger. VITAL!: A
    wpa_supplicant : Wireless auth helper : A who use wireless
    xfs : X font server. Vital to graphic functioning!: A
    xinetd : the replacement for inted, xinetd is a internet superdaemon. HR

    ati-fglrx / nvidia-glx : Livna graphics drivers services : HR

    Services you want to disable *should* be disabled in runlevels 3, 4 and 5 (the default for editing when using chkconfig [service] [ on | off ])

    Going further
    See the links provided below, you can also remove all instances of the
    Code:
    rhgb
    text in /etc/grub.conf:
    Code:
    su -
    editor /etc/grub.conf
    editor is gedit if you're in gnome, kedit if you're in KDE. For me, it's
    Code:
    su -
    gedit /etc/grub.conf
    Then simply remove any instance of the four letters "rhgb" and not the entire line!

    For more info (links, same as at the top):

    In-depth howto
    BootCharts
    Uber-startups!

    Enjoy the fast boot times
    Firewing1
    Last edited by Firewing1; 3rd May 2006 at 03:55 AM.
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  2. #2
    3006828 Guest
    thank you very much.. sythathised a lot of information clearly. Cheers.

  3. #3
    Join Date
    Jun 2004
    Location
    Chicago, IL, USA
    Age
    81
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Firewing1. I printed out the list of services that are required or can be disabled. Its going in my folder of Fedora referrence items. It joins things like how to make realplayer and java run and how to set up my printer and print services through my router. Very useful post.
    Linux Registered User #362558/ Three computers with AMD CPUs. One six core Phenom II 1090T and two eight core FX8350s

  4. #4
    Join Date
    Mar 2005
    Location
    Warrenville, IL (Chicago)
    Age
    46
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The one thing that I would like to see in bootup is DHCP backgrouned like Knoppix. DHCP can take a few seconds sometimes.

  5. #5
    Join Date
    Jun 2004
    Location
    Chicago, IL, USA
    Age
    81
    Posts
    233
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Firewing1 wrote: redahead & readahead_early : Caches boot services & increases boot time : A

    Just a thought, but wouldn't it be increases boot speed or improves boot time?

    readahead & readahead_early : Caches boot services & improves boot time : A
    Linux Registered User #362558/ Three computers with AMD CPUs. One six core Phenom II 1090T and two eight core FX8350s

  6. #6
    Join Date
    Dec 2004
    Location
    Canada
    Age
    32
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops, that's true! I mean increases bootup performance... I'll change it
    Firewing1
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  7. #7
    Scytale Guest
    the HAL in haldaemon stands for Hardware Abstraction Layer.

    From Wikipedia

    "Its function is to hide differences in hardware from most of the operating system kernel, so that most of the kernel-mode code does not need to be changed to run on systems with different hardware"

  8. #8
    Join Date
    Dec 2004
    Location
    Canada
    Age
    32
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I changed it
    Firewing1
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  9. #9
    Join Date
    Dec 2004
    Location
    Canada
    Age
    32
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If anyone knows how to get Init-NG working properly, please PM me! I'd like to get it working and add it here...
    Firewing1
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  10. #10
    Join Date
    Aug 2005
    Location
    Anaheim/Fullerton, CA (USA)
    Age
    38
    Posts
    388
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing I did is to set the services to startup and immediately put themselves in the background so that other services can start. This seems to help a lot with things like NTP and MySQL which like to pause for a few moments (I/O blocking perhaps?). Open the /etc/init.d/functions file with your favorite editor as root:
    Code:
    $ su -
    <enter password>
    # gedit /etc/init.d/functions
    Then add an ampersand to the end of lines 179 and 181 (the daemon function):
    Code:
    	# And start it up.
    	if [ -z "$user" ]; then
    	   $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*" &
    	else
    	   $nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*" &TCP 
    	fi
    Please note that you do this AT YOUR OWN RISK. It may break things or cause things not to function properly (perhaps due to service dependencies or the like). However, I've had no such problems yet.

    @Firewing1: xinetd is not "XineTD" . It's the Internet Super Daemon. Basically (according to my computer science professor) before TCP became the de facto communication protocol for the various servers in use, they would all run under xinetd, so that the server daemons would merely need to worry about the basic receiving/processing/sending data, and xinetd would do the hard work of the TCP socket code as needed. This was so that in case another standard arose (such as UDP or the like), then xinetd would be modified and all server daemons would run as normal, benefitting from the new protocol without any rewriting. Now, however, TCP is the commonly used protocol, so most servers implement their own internal socket code and the like, or use a networking library such as SDL's networking stack.
    ~~ Peter ~~ :: ( Who am I? ) :: ( My Blog: A day (or more) in the life of a CS & Language student... ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki )

  11. #11
    stevea Guest
    OK this is long-dead-thread, but for the record your CS professor's explanation is WRONG.

    Xinetd starts external daemons by opening the socket as fd=0,1,2 and fork/exec'ing the external daemons. Xinetd and hands a few daemon functions (chargen, daytime, echo) with just a fork. Xinetd also does something beyond scope w/ tcpmux.

    Before xinetd was inetd which treated all daemons almost the same way as xinetd treats external daemons.

    Before inetd, Unix systems would just start up a dozen or so separate daemons (tftpd, telnetd, ... and each of these would do ALL the socket connect code.

    The reason to have the "super server" open the socket and do the connection code is that this is necessary if it is going recognize the connection port and then spawn the correct daemon. It's not due to code complexity or protocol changes.

  12. #12
    Join Date
    Dec 2004
    Location
    Canada
    Age
    32
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, let's just leave it at a 'Internet super-daemon'... Much simpler
    Firewing1
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  13. #13
    Join Date
    Nov 2005
    Location
    In My Head (I Think)
    Posts
    932
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In CLI you cou use
    Code:
    setup
    there you can configure alot of things from the CLI on of them being services
    other include network, printers, and a few other just cannot think of off the top of my head
    Just though you may like to know
    If you know how to do something in Fedora or how to do it better, please help us at Fedora Wiki.

    Registered Linux user number 433760

  14. #14
    Join Date
    Dec 2004
    Location
    Canada
    Age
    32
    Posts
    9,221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good news - InitNG seems to be in Extras, it didn't work that badly for me - Anybody else willing to try it out?
    Firewing1
    [+] My open source software and blog
    [+] Some of my howtos: (for full list, click here)

  15. #15
    Join Date
    Oct 2006
    Posts
    4,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried it and didn't notice any difference at all, until I realized that you had to select it from the grub menu that is.
    While it did seem maybe a hair faster it wasn't enough for me to want to give up graphical boot, also my machine already boots pretty fast anyways <30 seconds.

Page 1 of 2 12 LastLast

Similar Threads

  1. Speed up boot...
    By icanfly0307 in forum Using Fedora
    Replies: 17
    Last Post: 24th January 2009, 02:51 PM
  2. Replies: 5
    Last Post: 23rd March 2008, 11:48 AM
  3. F8: initng to speed up boot time advised?
    By stefan1975 in forum Using Fedora
    Replies: 1
    Last Post: 4th December 2007, 11:01 PM
  4. Mouse speed different on every re-boot | Annoying
    By d-kam in forum Using Fedora
    Replies: 0
    Last Post: 29th July 2005, 06:28 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]