Posted
by
timothyon Wednesday January 14, 2009 @06:10PM
from the spurious-precision-is-2.6-times-better dept.

Pizzutz writes "Softpedia reports that Ubuntu 9.04 Boots in 21.4 Seconds using the current daily build and the newly supported EXT4 file system. From the article: 'There are only two days left until the third Alpha version of the upcoming Ubuntu 9.04 (Jaunty Jackalope) will be available
(for testing), and... we couldn't resist the temptation to take the current daily build for a test drive, before our usual screenshot tour, and taste the "sweetness" of that evolutionary EXT4 Linux filesystem. Announced on Christmas Eve, the EXT4 filesystem is now declared stable and it is distributed with version 2.6.28 of the Linux kernel and later. However, the good news is that the EXT4 filesystem was implemented in the upcoming Ubuntu 9.04 Alpha 3 a couple of days ago and it will be available in the Ubuntu Installer, if you choose manual partitioning.' I guess it's finally time to reformat my /home partition..."

I agree totally. 21.4 seconds is incredibly slow, and that's only to get to the login screen... which is typically only half way. I know that it is possible to boot Linux in 5 seconds for some special cases. However, the boot time should be even quicker.

For most users, no it will not work. One of the major features of ext4 is extents, which basically reserves space for a file to continue writing at a later date. This will decrease file fragmentation and improve performance.

If however, you disable extents, then yes you can mount it as ext3. And as you know, ext3 can be mounted as ext2 without the journaling.

I agree that the win32 ext2 drivers need updating. I would hate to lose access to ext partitions for dual boot systems.

However, the good news is that the EXT4 filesystem was implemented in the upcoming Ubuntu 9.04 Alpha 3 a couple of days ago and it will be available in the Ubuntu Installer, if you choose manual partitioning.' I guess it's finally time to reformat my/home partition..."

From what I understand, there's no need to reformat. Similar to how EXT3 was layered on top of EXT2, EXT4 should just be another mount option as long as the kernel supports it.

I have a couple EXT4 partitions I'm testing... It's been rock-solid so far...

The question is what do you want the computer (or appliance) to be able to do after that four second boot? All the supporting software to do all the whizbang stuff (games, graphics, etc) takes time to load.

I decided awhile back that I simply wanted a device that I could power up quickly, surf the web, check email, oh, and had to be portable. Just last month I got such a device. It powers on instantly, finds and connects to wi-fi rapidly, the browser opens quickly, etc. It does exactly what I needed it to do. It's an IPOD Touch. First Apple product I've ever owned, so I'm not exactly an Apple advocate, but it does the bloody job.

So, back to the OP, I'll ask the same question that I ask every person who comes up and asks me what kind of computer they should get. . . . . what do you want it to do?

This disk may be the problem, but there's lots of concurrency problems between the CPU and disk, though, too. Install bootchart and look at the comparison of disk usage to CPU sometime--there's a lot gaps where both under 50%.

Nvidia is notorious for awful drivers, especially for dual display. The screensaver issue is also probably from bad Nvidia drivers.

Adobe Flash is unstable in Firefox, especially on 64 bit systems. Open Source alternatives are also very outdated and slow.

Third party plugins like Java and Flash can make Firefox have to wait. The Mozilla team needs to design much less dependency on plugins and more of a sandbox model, so that a crash or hang of a plugin will not freeze all of Firefox.

Programs become unresponsive due to a lot of disk activity for reasons of speed; DiskIO has more priority. This is a GUI design problem and it should be decidable/configurable easily on or after install.

What good is the PC being 'at the desktop' if the search service still hasn't started, the network still hasn't obtained an ip-address, half my tray icons aren't up? and the hard drive is still madly churning to get everything else running

I never use any "search service" since I know what a computer is so I know where "internet" will download the files. I don't need an IP address until I need to go online, and my thinkpad does not have a harddrive that churns.

Seriously, how much stuff could you really -defer- to after seeing the desktop and have a useful system?

I like to get a terminal and a text editor up, for example. Maybe I'd like to play a game, start listening to some music or watch a movie. All of them things you don't need to initialize.

Even a fairly modest Ubuntu desktop requires several times that much RAM. If the hard drive started loading data at maximum speed you've got maybe 50MB you can load in that time, and probably far less in actual practice. That means your kernel, drivers, HAL, desktop environment, localization, firewall, network, background, theme, etc has to ALL fit in under 50MB.

A huge percentage of that data is not loaded from disk, but rather either calculated data (tables that are initiated, allocated buffers, structures for GTK/QT windows etc). Another big amount of this may be actual data, which is not read but mmapped, and yes, the kernel, drivers, localization, firewall, background image, will all fit under 50MB.

And you'd need some sort of impossible situation where the cpu could run all the initialization code for all that in parallel, without waiting.

Thats about the same amount of time it takes my machine, but I can type my password in ~1 second and a second later be at the desktop. Ie generally will start in another second or two. This is because I have disabled most of the crap that puts itself into the system tray. Everything continues to work, except when I want to change my desktop resolution I actually have to right click on the desktop instead of the system tray... anyway most of that crap that rattles your disk after login is probably useless and you won't notice if you disable it. Bottom line, my XP machine goes from power on to useful work in ~15 seconds, but it generally is at S3. From S3 to useful work is really more like ~2 seconds while the monitors come back on and the HD spins back up. The machine consumes ~6W in S3, but all the USB, networking, monitors etc running in standby bump it to ~13W. With everything running but idle its ~210W (monitors included).

The iPhone emphatically does NOT pull off a quick startup. I've just timed mine, it took 43 seconds to go from pushing the power button to having the springboard appear. It does, however, sleep and wake as quickly as any other mac computer.

The PCI spec also has required delays from power good to reset negated and then another required delay from reset negated to first configuration access. The second delay alone is about 1 sec (2^25 clock cycles).

The Linux BIOS replaces the normal BIOS found on PCs and other machines. The BIOS boot and setup is eliminated and replaced by a very simple initialization phase, followed by a gunzip of a Linux kernel. The Linux kernel is then started and from there on the boot proceeds as normal. Amongst many other things, it provides a very fast boot time: 3 seconds from power-on to Linux console

My local system would lock up and hang for MINUTES while it timed out on requests to the NFS server. I could never understand why the thing didn't just time out in seconds rather than minutes.

This was the default setting: hard mounts. If the server went away the NFS client was told to hang so that any program trying to access the export would block to minimize the chance of data corruption. Once the NFS server came back, things unblocked.

You can of course configure NFS clients to use soft mounts, so that an error is returned to the process that was calling read() or write(2), and you would simply hope that the application code did error checking.

It was possible to mix hard and soft mounts on one clients. Soft mounts were often used on read-only file systems (/usr/local), since you didn't have to worry about corruption of write()s.

The time it took for an NFS client to stop retrying and throw an error was also configurable per site policy (as were/are most Unix system things).

Use your common sense."Boot time" obviously refers to the time that the user is waiting for the machine and not the other way round.And "usable desktop" is obviously the point in time when the user can begin launching his applications without significant slowdowns from boot-tasks still grinding in the background.

This is obviously always an apples-to-oranges comparison but with just a tiny bit of common sense it can still be more meaningful than "OSX boots in 4 seconds".

I migrated some of my non-critical partitions over to EXT4 and hit a race condition that corrupted my filesystem and resulted in data loss (the bug has since been fixed). I'm waiting a little longer before converting my important partitions over.

Switching from EXT3 to EXT4 is as simple as a flag change and a remount. HOWEVER, your existing data will still be laid out without extents and thus you'll miss you on a lot of the improvements in EXT4. Eventually, an online defragmenter will be written to defrag your drive while mounted and convert the old data to use extents, but Ted T'so says there are problems with the existing implementations and a working one isn't on the near horizon. Your best bet would be to move the data to another partition and back to convert it to using extents in the meantime.

Also note that if you're using extents, you can no longer mount the partition as EXT3.

People who boot their laptops two or three times a day want it. (Suspend doesn't work in Linux on my laptop right now, and my battery is almost kaput anyway. Shutdown then boot later is my only option.)

You know how everyone wanted a Linux-based operating system that "just worked" on a wide variety of hardware with drivers for everything? And didn't throw a shit-fit if you moved the hard disk to a completely different machine and tried to boot it up?

Driver probing isn't really why it's slow. Even without Arjan van de Van's fastboot kernel work probing for hardware* and loading drivers is not usually not what takes the most time during boot.

Typically boot time is dominated by the time it takes to actually read data from the disk (so disk seek time is a factor - especially if you aren't using readahead). Secondary to that is the time to start services. Assuming you are booting something graphical desktop environments (GNOME/KDE) take a bit of time to start too followed by X itself (this might be fixed now if you have kernel mode setting).

The above is excluding the BIOS boot time by the way - those can vary dramatically too. I've seen some servers that take many times longer to boot from cold past the BIOS than a typical desktop system takes to finish booting from poweroff all the way to a started Firefox.

* So long as we aren't talking about servers which may have large numbers of spun down disks or a big SCSI bus that takes time to enumerate etc.

For cold boot to be as fast as hibernate, it would have to be able to run through the bootloader, do hardware detection, and generate a system image as fast as your system could copy one into ram. It's like trying to write a book versus trying to read one. Well parallelized init processes, cool hardware tricks, and bootloader shenanigans can get you pretty close to it, but its still not exactly a fair fight, and as another poster pointed out, the two have very little in common from a technical perspective.

No, it's a Network File System (hint, the initials). NFS supports filesystem primitive operations - see:
http://tools.ietf.org/html/rfc1094 [ietf.org]
Networked block devices are possible, but NFS isn't one of them.
However, some of the points are still valid - unix doesn't particularly like it when mounted filesystems go away unexpectedly.

It's talking about the bus's clock speed, not the computer's. PCI operates at 33 MHz.
Nowadays there's also PCI 2.2 (66 MHz) and PCI-X (133 MHz), for which the timeout would be lower, but I'm unsure if that means they can eliminate the legacy delay without removing legacy compatibility.