Readahead in KNOPPIX
[CAUTION] The home pages related to KNOPPIX Japanese Edition, VMKnoppix,
etc moved to http://www.rcis.aist.go.jp/project/knoppix/index-en.html
Please visit the new home page for latest information.
"readahead" populates the page cache with data from files so that subsequent reads from these files will not block on disk I/O. /etc/init.d/readahead is a script to cache files which is reburied at KNOPPIX boot process. We made KNOPPIX with readahead to make quick boot on KNOPPIX. The performance is measured by bootchart.
"bootchart" is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart.
"readahead" shortened CD boot time by 60sec on our machine (Celeron
2.0 Ghz, 768MB, 24X CD).
How To Use
We made a knoppix 3.7 iso image which includes readahead and bootchart.
download file: knoppix_v3.7_20041208-20050107+bootchart.iso (667MB MD5: a3cfefa67873ff4f798906028499026e
)
The file is downloadable form RING servers http://www.ring.gr.jp/index.html.en at "/archives/linux/knoppix/iso/
When you can find the file on a server, please search other server because
sometimes mirroring problem is occurred.
CAUTION: This is an experimental KNOPPIX. It is changed boot sequence. It will not work well when it is installed on hard disk. Please use to check readahead from CD boot only.
boot:
Add "readahead" option to enable readahead. Please use "lang=us" option when you want to use English.
"bootchart" process starts just before /etc/knoppix-autoconfig and is stopped after KDE..
You get a "bootchart" result file "/var/log/bootchart.log.tar.gz".
You can make a graph with "Renderer Web Form". Upload the bootchart
log tarball (/var/log/bootchart.log.tar.gz)..
http://www.bootchart.org/download.html
Result
We measured the effect of readahead with bootchart. The result is shown
at the following figures.
Target Machine: NotePC Sharp Mebius PC-GP-D7E
CPU: Celeron 2.0 Ghz
Memory: 768MB
CD Drive: Matsushita DVD-RAM UJ-810
We measured boot time of KNOPPIX for kernel2.6, kernel2.6+readahead, kernel2.4,
and kernel2.4+readahead. The behavior of boot processes is watched by bootchart.
The following figures show the results.
The I/O status is not logged on kernel2.4 because "iostat -dktw"
doesn't work well on kernel2.4.
-------------------------------------
kernel2.6 result
Table1: CD boot time with or without readahead.
The memory size is changed by "mem=" boot option.
Boot time is indecated by (minutes):(seconds). Red number means slower case.
| Memory | kernel2.6 | kernel2.6+readahead |
| 128MB | 7:18 | 8:14 |
| 160MB | 4:55 | 6:00 |
| 192MB | 4:04 | 4:34 |
| 256MB | 3:48 | 4:07 |
| 384MB | 3:49 | 3:16 |
| 512MB | 3:48 | 2:45 |
| 768MB | 3:33 | 2:33 |
"Normal KNOPPIX" with less than 256MB memory was faster than
"KNOPPIX + readahead".
"KNOPPIX + readahead" became faster if there was more than 384MB
memory.
These results don't show the feature of "readahead". The performance
depends on the files which are cached by "readahead". In this
case we designate most files which is required till KDE
kernel2.6 (128MB, BootTime 7:18)
Original full size figure (click here)
kernel2.6 + readahead(128MB, BootTime 8:14)
Original full size figure (click here)
kernel2.6 (160M, BootTime 4:55)
Original full size figure (click here)
kernel2.6+ readahead (160M, BootTime 6:00)
Original full size figure (click here)
kernel2.6 (192M, BootTime 4:04)
Original full size figure (click here)
kernel2.6 + readahead (192MB, BootTime 4:34)
Original full size figure (click here)
kernel2.6 (256MB, BootTime 3:48)
Original full size figure (click here)
kernel2.6 + readahead(256MB, BootTime 4:07)
Original full size figure (click here)
kernel2.6 (384MB, BootTime 3:49)
Original full size figure (click here)
kernel2.6 + readahead (384MB, BootTime 3:19)
Original full size figure (click here)
kernel2.6 (512MB, BootTime 3:48)
Original full size figure (click here)
kernel2.6 + readahead (512MB, BootTime 2:45)
Original full size figure (click here)
kernel 2.6 (768MB, BootTime 3:33)
Original full size figure(click here)
kernel2.6 + readahead (768MB, BootTime 2:33)
Original full size figure (click here)
-------------------------------------
kernel2.4 result
kernel 2.4 (768MB, time: 220sec)
Original full size figure (click here)
kernel 2.4 + readahead (768MB, time: 155sec)
Original full size figure (click here)
Discussions
Related Links
| Count from Jan/14/2005 |