Fedora 10 - Disk IO
by
Harald Hoyer
—
last modified
Dec 02, 2008 16:54
Identifying heavy disk IO tasks and reducing IO helps to shorten the boot time on e.g. a Asus EeePC.
Identifying heavy disk IO tasks and reducing IO helps to shorten the boot time on e.g. a Asus EeePC.
To measure IO, I installed a systemtap script to run as soon as rc.sysinit starts.
#! /usr/bin/env stap
# modified traceio.stp
# Copyright (C) 2007 Red Hat, Inc., Eugene Teo <eteo@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
global device_of_interest, dev, reads, writes, total_io
probe begin {
/* Hack! Insert your MAJOR, MINOR of the
device you are interested in */
device_of_interest = MKDEV(253, 1)
}
probe vfs.read.return {
if (dev == device_of_interest)
reads[execname()] += $return
}
probe vfs.write.return {
if (dev == device_of_interest)
writes[execname()] += $return
}
probe timer.s(1) {
foreach (p in reads)
total_io[p] = 0
foreach (p in writes)
total_io[p] = 0
foreach (p in reads)
total_io[p] += reads[p]
foreach (p in writes)
total_io[p] += 5 * writes[p]
foreach(p in total_io- limit 10)
printf("%15s r: %8d KiB w: %8d KiB\n",
p, reads[p]/1024,
writes[p]/1024)
printf("\n")
# Note we don't zero out reads, writes,
# so the values are cumulative since the script started.
}
Because on a EeePC disk writes are very slow (5 times slower than reading) they are weighted with factor 5.
From rc.sysinit start to the gdm login screen, the top 5 IO tasks are on my Live-CD standard installation:
| Name | Read KiB | Write KiB |
|---|---|---|
| modprobe | 5900 | 0 |
| gconfd-2 | 4827 | 47 |
| setroubleshootd | 4187 | 0 |
| xkbcomp | 2961 | 81 |
| rpcbind | 3248 | 0 |
- modprobe: I wonder what happened to Jakub's modprobe speedup patches.
- setroubleshootd: should really be more lightweight and needs a cleanup.
- gconfd-2, xkbcomp: Behdad has currently been looking at the login process, which hopefully improved the situation a bit.
- rpcbind: will have to investigate, why it reads so much.
Now, if you want to improve Fedora's boot speed, here is a starting point.
Harald Hoyer

boot times
Keep up the good work!