Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: even a blind chicken sometimes gets the corn

  1. #1
    Join Date
    Jul 2008
    Location
    Germany
    Beans
    461
    Distro
    Ubuntu 13.10 Saucy Salamander

    even a blind chicken sometimes gets the corn

    So there I was feeling very sorry for myself. I recently bought a brand new Thinkpad X230 with "overkill specs". A i7 cpu, very fast Samsung 840 pro ssd and 16 gigs of ram on which I then installed Ubuntu 13.10. I was expecting a very fast boot time and was somewhat disappointed when it clocked 31 seconds. My son who is an Apple fan laughed at this boot time and showed me that his MacBook air with i5 cpu booted in 7 seconds. So I sulked. Then yesterday I broke my system. Was running a live disk of Mint "debian edition" and then the machine would not shut down. I had to "pull the plug" and afterwards it would not boot again. Started in "save mode" did a "repair broken packages" and "update grub". Had no idea what I was doing realy but hoped for the best. This worked and the machine then booted again, only now it boots in 14 seconds flat. So I guess sometimes you have to break things to fix things. Ok, still not as fast as my sons Air, but then I am running a superior OS

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: even a blind chicken sometimes gets the corn

    Best never to force shutdown. Only if this does not work.

    Holding down Alt and SysRq (which is the Print Screen key) while slowly typing REISUB
    R-E-I-S-U-B to force shutdown
    A good way to remember it is.
    Raising Skinny Elephants Is Utterly Boring ...or
    Reboot System Even If Ultimately Broken ...LOL.
    http://kember.net/articles/reisub-th...linux-restart/
    http://ubuntuforums.org/showthread.p...4#post12543274

    I think system does tune itself after every reboot, so after several it may be faster. With my 7 year old dual core system, but with a newer SSD says it boots in 9 sec. But BIOS and grub take 15 sec so it is 25 sec or so total.
    Supposedly new UEFI is a lot quicker booting than old BIOS, did you install in UEFI or BIOS mode with your system?
    You can also check log files for boot process like /var/log/dmesg and see what may be slow. Longer times between entries or a process that repeats or gives errors is worth further investigation. You also may be able to turn off some things not needed.
    For info on UEFI boot install & repair - Updated Mar 2015:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #3
    Join Date
    Jul 2008
    Location
    Germany
    Beans
    461
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: even a blind chicken sometimes gets the corn

    Hi oldfred, thank you for the info. Not sure I have such an SysRq button on my keybord. I do have one button called "druck" which is german for print, I could try that. UEFI is not activated in the bios settings. I bought this machine without any OS installed and am running linux only. One of the first things that I did after installation was to turn off some stuff in "start-up" hat I do not require. Anyway I think 15 seconds for boot is just fine, so I am not complaining.

  4. #4
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    1,433
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: even a blind chicken sometimes gets the corn

    My experience has been that Linux never boots up as fast as Mac because, as an open system, it must anticipate vastly more HW variety than Apple's jailware and therefore includes far more drivers in its kernel. It's easy to optimize the kernel for a Mac because the OS is designed to run on a strictly limited set of HW, all with which the developers are thoroughly familiar and guaranteed to be exactly alike on every device. If you want to see this same dynamic at work in Linux, then I recommend the following. Install Gentoo on a VM and build two different kernels: the first one using genkernel (which pulls in absolutely everything), and the second by painstakingly using the kernel build tool to choose absolutely nothing but the minimal drivers needed for your VM. The difference is so amazing that it really has to be seen to be believed. My genkernel takes about 40 seconds to load. I swear that my custom kernel loads in less than 3 seconds. That beats your son's MAC by more than 200%.

    Aside from custom kernels though, in general use Linux will never load faster than Macs. That's the price of freedom. However, in defence of Linux, ask your son to try compiling an Apple kernel.
    Newb: How far must I jump to clear the ledge halfway down?
    Guru: It's bad to jump off cliffs. Let's look at better options.
    Newb: Stop harping about "best practices" and just let me jump.


  5. #5
    Join Date
    Feb 2013
    Location
    Highway to hell
    Beans
    50
    Distro
    Ubuntu Development Release

    Re: even a blind chicken sometimes gets the corn

    Quote Originally Posted by DuckHook View Post
    Aside from custom kernels though, in general use Linux will never load faster than Macs.
    Actually, Linux can match the boot time of OS X, but the BIOS post will last longer than it does on Apple platforms. That's a pretty much stock Ubuntu there and it loads Unity in 5 seconds after the BIOS post (which last for 5 seconds as well), no compiling a custom kernel and no stripping of the OS down of all that stuff that gets loaded upon boot, I actually added a few services myself by the time that boot chart was made (like sensorsd, etc).

  6. #6
    Join Date
    Aug 2005
    Beans
    6,028

    Re: even a blind chicken sometimes gets the corn

    Quote Originally Posted by germanix View Post
    This worked and the machine then booted again, only now it boots in 14 seconds flat.
    That's still pretty slow for a ssd, my old desktop boot in about 10s on 7200rpm hdd but then again I use openbox.

  7. #7
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    1,433
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: even a blind chicken sometimes gets the corn

    Quote Originally Posted by Werne View Post
    ...That's a pretty much stock Ubuntu there and it loads Unity in 5 seconds after the BIOS post...
    That's a pretty snazzy box you have that booted so quickly. Have you measured it in older HW? I believe that Linux boot processes will take advantage of multi-threading, so 8 threads will boot up much faster than 2. The difference on my HW between my shiny brand-new desktop and my older dual-core is considerable. Surprisingly, even an ancient single-core is marginally faster than the dual-core, but that may be due to the difference between Lubuntu and Ubuntu.

    A few years ago, I had the chance to measure the boot speeds of Apples and PCs (on various OSes) that had roughly the same HW specs. No default configurations were faster than Apple boxes. The rankings were roughly as follows:

    1. Linux with minimalized kernel
    2. Apple
    3. Linux with standard kernel
    4. Windows

    Windows was always dead last by a large margin. Standard configuration Linux had a wide range depending on the distro. Among the "full" distros, Arch was usually the fastest, Ubuntu in the middle and both Fedora and Sabayon were relatively slow. I'm not counting special distros like Tiny, Damn Small or Slitaz because that would be comparing apples to oranges (okay, okay... feeble joke). I don't claim that these results were in any way scientific or even thorough. They're completely anecdotal. They are also a couple of years old and a lot changes in that time.
    Newb: How far must I jump to clear the ledge halfway down?
    Guru: It's bad to jump off cliffs. Let's look at better options.
    Newb: Stop harping about "best practices" and just let me jump.


  8. #8
    Join Date
    Feb 2013
    Location
    Highway to hell
    Beans
    50
    Distro
    Ubuntu Development Release

    Re: even a blind chicken sometimes gets the corn

    Quote Originally Posted by DuckHook View Post
    That's a pretty snazzy box you have that booted so quickly. Have you measured it in older HW?
    AMD FX 8320 @4.2GHz, 8GB DDR3-1066 CL7 RAM and a 120GB Kingston SSDNow V300+, it's a budget build. I did measure it on older hardware (Intel Core 2 Duo E4500 @2.92GHz, 2GB DDR2-800 CL6 @1066GHz, same SSD and OS) and the result is 6 seconds. Not a 6 seconds difference, a 6 seconds boot time. The biggest time-consuming task drive seek time, the transfer time of an SSD is quite high (it was connected to a SATA II controller), and boot doesn't really need that much processing power at all on a standard PC.

    Quote Originally Posted by DuckHook View Post
    I believe that Linux boot processes will take advantage of multi-threading, so 8 threads will boot up much faster than 2.
    Yes, Linux features parallel boot (insserv) which allows using makefile-style boot sequence, that way it'll boot faster by using multiple cores for initializing services. It's enabled out-of-the-box on Ubuntu. If it isn't, running the following will configure it:
    Code:
    sudo dpkg-reconfigure insserv
    I personally can't see the use for it, difference between parallel boot and single-core boot on a standard system is marginal, the biggest performance impact is dealt by the storage drive.

    By the way, those 14 seconds OP mentioned is incredibly slow for an SSD, especially one like the Samsung 840 Pro since it has an even faster seek time than my V300+. On my PC, Debian boots in 14 seconds, but it has /var and /home located on a SATA II hard drive so it takes time to load user configuration and stuff, and Debian's initscripts is slower than upstart on Ubuntu. Ubuntu also has only one 66GB partition located on the SSD, so there is no HDD seek time bottleneck, which is the reason it boots in 5s. Plus, my SSD is a SandForce and it suffers a performance penalty with TRIM, it would be faster if I were to disable it (~230-270MB/s with TRIM enabled, ~320-380MB/s with TRIM disabled).

    Quote Originally Posted by DuckHook View Post
    Windows was always dead last by a large margin.
    Have you tried benching Win8? From what I understand, that thing uses some kind of hybrid boot which uses hibernation to boot faster. Don't know how that one would compare against Linux and OS X, my guess is that it would either be slower or on-par, judging by it's HDD boot time and processing power dependency (Windows is different than Linux, it relies heavily on both CPU power and storage speed).

  9. #9
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    1,433
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: even a blind chicken sometimes gets the corn

    Quote Originally Posted by Werne View Post
    Have you tried benching Win8? From what I understand, that thing uses some kind of hybrid boot which uses hibernation to boot faster. Don't know how that one would compare against Linux and OS X, my guess is that it would either be slower or on-par, judging by it's HDD boot time and processing power dependency (Windows is different than Linux, it relies heavily on both CPU power and storage speed).
    Have never tried Windows 8 and am happy that I will likely never have to. This was about two and a half years ago, so it was XP, Vista and W7. Not much difference between them actually, but if I recall, in descending order, it was W7, XP, then Vista as slowest of the slowpokes. I read somewhere that W8 takes advantage of hybrid boot only when there is a SSD acting as cache, but frankly don't know anything about it, so it's just a passing rumour to me. Actually, if there is one thing I don't fault Windows with, it is slow boot times. They have to take into account even more HW variety than Linux does, and one of the drawbacks of a micro-kernel is that each driver must be mapped to the kernel and loaded individually (at least, that's my understanding--maybe I'm just spouting nonsense).
    On my PC, Debian boots in 14 seconds, but it has /var and /home located on a SATA II hard drive so it takes time to load user configuration and stuff...
    I'm curious... have you ever tried bcache? I would think that leaving everything on the HDD but enabling intelligent caching of absolutely everything from the SSD would load just as fast as a pure SSD install. I have an SSD/HDD combo on my main box and just like you, I leave /home /var /tmp and /swap on the HDD. It Loads plenty fast enough for me so I've never tried bcache, but it sounds fascinating. What I've read about it leads me to believe that I would have to compile bcache into the kernel, which seems to be too much trouble for too little gain.
    Plus, my SSD is a SandForce and it suffers a performance penalty with TRIM, it would be faster if I were to disable it (~230-270MB/s with TRIM enabled, ~320-380MB/s with TRIM disabled).
    If you want to squeeze out the very last iota of performance, then consider nixing "discard" and setting up trimming as a cron job. I've only read about it, have no personal experience with it myself, so use at your own risk.
    Newb: How far must I jump to clear the ledge halfway down?
    Guru: It's bad to jump off cliffs. Let's look at better options.
    Newb: Stop harping about "best practices" and just let me jump.


  10. #10
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: even a blind chicken sometimes gets the corn

    I originally used discard, but after reading several of the opposing view points changed to the cron task.

    Shows both discard & fstrim methods for trim
    http://www.webupd8.org/2013/01/enabl...te-drives.html

    gksu gedit /etc/cron.daily/trim
    sudo chmod +x /etc/cron.daily/trim

    Code:
    #!/bin/sh
    # trim
    LOG=/var/log/trim.log
    echo "* $(date -R) *" >> $LOG
    fstrim -v / >> $LOG
    # if separate partition on SSD
    # fstrim -v /home >> $LOG
    last few entries in my log
    *** Sun, 24 Nov 2013 08:03:45 -0600 ***
    /: 2017529856 bytes were trimmed
    *** Mon, 25 Nov 2013 07:45:44 -0600 ***
    /: 2018480128 bytes were trimmed
    *** Tue, 26 Nov 2013 07:48:11 -0600 ***
    /: 18846908416 bytes were trimmed
    For info on UEFI boot install & repair - Updated Mar 2015:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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