from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

90918

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Misc

Speeding up the boot process (next generation)

The idea is to preload the useful files into kernel buffer cache before they are needed. Since I/O can happen parallel to the other CPU intensive tasks during bootup, this leads to faster bootup and faster startup time for your chosen applications. Other projects use static lists to preload the files.

This tutorial uses an automated process of generating the "useful" prefetch database.

This is /etc/init.d/my-readahead.
Code:

#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

depend() {
        before syslog-ng
}

start() {
        ebegin "Starting readahead ROYALE"
        cat /etc/conf.d/* > /dev/null 2>&1 &
        cat /usr/lib/gconv/gconv-modules.cache > /dev/null 2>&1 &
        cat /usr/share/icons/gnome/icon-theme.cache > /dev/null 2>&1 &
        cat /usr/share/icons/hicolor/icon-theme.cache > /dev/null 2>&1 &
        cat `cat /etc/conf.d/sofile-list.load` > /dev/null 2>&1 &
        if [ -f /forcesampler ];then
                /usr/sbin/sample-init-process /etc/conf.d/sofile-list.load &
                rm -f /forcesampler
        fi 
        eend 0
}

stop() {
        eend 0
}

The executable shell script /usr/sbin/sample-init-process:
Code:

 #!/bin/bash
final_db="$1"

# total number of lists to keep in /etc/conf.d/
total_to_keep=4

# total number of samples to make in /forcesampler boot.
# It will take twice this amount of seconds to finish sampling.
total_samples_per_boot=200

# touch empty file if not there
[ ! -f "$final_db" ] && touch "$final_db"

let i=0
while [ "$i" -ne "$total_to_keep" ] ; do
        if [ ! -f "$final_db$i" ] ; then
                break;
        else
                j=$((i+1))
                if [ "$j" = "$total_to_keep" ] ;then
                        j=0
                fi
                if [ -f "$final_db$j" -a "$final_db$i" -nt "$final_db$j" ];then
                        i=$((j))
                        break;
                fi
        fi
        i=$((i+1))
done
if [ "$i" = "$total_to_keep" ] ;then
        i=0
fi

slot="$i"
cp "$final_db" "$final_db$i"

function collect_sample()
{
        lsof | awk '{if ($5=="REG") {if (match($9,".so") || match($9,".conf") \
        || match($9,"/bin/") || match($9,"ttf") || match($9,"libexec")) \
        print $9}}' | sort | uniq >> $1
}

collect_sample /tmp/init_sample1

i=0 
while [ "$i" -ne "$total_samples_per_boot" ] ; do
        collect_sample /tmp/init_sample2
        cat /tmp/init_sample1 /tmp/init_sample2 | sort | uniq > /tmp/init_sample3
        mv /tmp/init_sample3 /tmp/init_sample1
        sleep 1
        i=$((i+1))
done

cat /tmp/init_sample1 "$final_db$slot" | sort | uniq > "$final_db"

rm -f /tmp/init_sample[123]
And then do this:
Code:
chmod +x /usr/sbin/sample-init-process
rc-update add my-readahead default
touch /forcesampler

What you have done is asked my-readahead to create a sampler process which samples what files (fonts, binaries, libraries, configs) are in use, every second. It collects 200 samples (will be busy for at least 10 minutes after boot) and keeps updating the database with a list of useful files.

Once you boot after this the first time, you will probably see a slow down because its collecting samples for use on the next and subsequent boots. Use your system as you normally would. Open firefox, gaim, OO or whatever. Once the sampler script has finished ('ps -aef|grep sample-init-process' will tell you if its running), reboot. Now this and all subsequent boots will be much faster.

If it takes too long for the sample-init-process to finish, reduce the total_samples_per_boot variable in the sampler script to 100 and try again by touching /forcesampler.

In future, whenever you feel like updating the prefetch database, just 'touch /forcesampler' and database will be updated on next reboot.

based on http://forums.gentoo.org/viewtopic-t-478491.html, some script modifications done.

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-12-03
escapevelocity - 1.1-r1
Ebuild name:

dev-java/escapevelocity-1.1-r1

Description

A reimplementation of a subset of the Apache Velocity templating sys

Added to portage

2026-12-03

graphicsmagick - 1.3.50
Ebuild name:

media-gfx/graphicsmagick-1.3.50

Description

Collection of tools and libraries for many image formats

Added to portage

2026-12-03

guava - 33.4.8
Ebuild name:

dev-java/guava-33.4.8

Description

A collection of Google's core Java libraries

Added to portage

2026-12-03

guava-testlib - 33.4.8
Ebuild name:

dev-java/guava-testlib-33.4.8

Description

A set of java classes to assist the tests for Guava itself

Added to portage

2026-12-03

highline - 7.2.2
Ebuild name:

app-emacs/highline-7.2.2

Description

Minor mode to highlight current line in buffer

Added to portage

2026-12-03

kotlin-bin - 2.5.0
Ebuild name:

dev-lang/kotlin-bin-2.5.0

Description

Statically typed language that targets the JVM and JavaScript

Added to portage

2026-12-03

mastodon - 2.1.9
Ebuild name:

app-emacs/mastodon-2.1.9

Description

Emacs client for Mastodon, federated microblogging social network

Added to portage

2026-12-03

picolisp - 26.9
Ebuild name:

dev-lang/picolisp-26.9

Description

Open source Lisp dialect based on LLVM

Added to portage

2026-12-03

racket-mode - 1_p20261128
Ebuild name:

app-emacs/racket-mode-1_p20261128

Description

Emacs modes for Racket edit, REPL, check-syntax, debug, profile,

Added to portage

2026-12-03

tor - 0.4.9.18
Ebuild name:

net-vpn/tor-0.4.9.18

Description

Anonymizing overlay network for TCP

Added to portage

2026-12-03

2026-12-02
at-spi2-core - 2.60.8
Ebuild name:

app-accessibility/at-spi2-core-2.60.8

Description

D-Bus accessibility specifications and registration daemon

Added to portage

2026-12-02

bcrypt - 5.1.0
Ebuild name:

dev-python/bcrypt-5.1.0

Description

Modern password hashing for software and servers

Added to portage

2026-12-02

bitarray - 3.12.5
Ebuild name:

dev-python/bitarray-3.12.5

Description

Efficient arrays of booleans -- C extension

Added to portage

2026-12-02

cachetools - 8.0.5
Ebuild name:

dev-python/cachetools-8.0.5

Description

Extensible memoizing collections and decorators

Added to portage

2026-12-02

clang - 23.1.7
Ebuild name:

dev-python/clang-23.1.7

Description

Python bindings for llvm-core/clang

Added to portage

2026-12-02

clang - 23.1.7-r1
Ebuild name:

llvm-core/clang-23.1.7-r1

Description

C language family frontend for LLVM

Added to portage

2026-12-02

clang-common - 23.1.7
Ebuild name:

llvm-core/clang-common-23.1.7

Description

Common files shared between multiple slots of clang

Added to portage

2026-12-02

cli-helpers - 2.15.6
Ebuild name:

dev-python/cli-helpers-2.15.6

Description

Python helpers for common CLI tasks

Added to portage

2026-12-02

cloudflare - 5.11.0
Ebuild name:

dev-python/cloudflare-5.11.0

Description

The official Python library for the Cloudflare API

Added to portage

2026-12-02

cnrdrvcups-lb - 6.40
Ebuild name:

net-print/cnrdrvcups-lb-6.40

Description

Canon UFR II / LIPSLX Printer Driver for Linux

Added to portage

2026-12-02

compiler-rt - 23.1.7
Ebuild name:

llvm-runtimes/compiler-rt-23.1.7

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-12-02

compiler-rt-sanitizers - 23.1.7
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-23.1.7

Description

Compiler runtime libraries for clang (sanitizers & xray

Added to portage

2026-12-02

cryptography - 51.0.0
Ebuild name:

dev-python/cryptography-51.0.0

Description

Library providing cryptographic recipes and primitives

Added to portage

2026-12-02

csharp-language-server - 0.29.0
Ebuild name:

dev-dotnet/csharp-language-server-0.29.0

Description

Roslyn-based LSP language server for C

Added to portage

2026-12-02

dd-rescue - 1.99.26
Ebuild name:

sys-fs/dd-rescue-1.99.26

Description

Similar to dd but can copy from source with errors

Added to portage

2026-12-02

docutils - 0.23.1
Ebuild name:

dev-python/docutils-0.23.1

Description

Python Documentation Utilities (reference reStructuredText impl.)

Added to portage

2026-12-02

droidcam - 2.2.0
Ebuild name:

media-video/droidcam-2.2.0

Description

Use your phone or tablet as webcam with a v4l device driver and app

Added to portage

2026-12-02

enchant - 2.8.21
Ebuild name:

app-text/enchant-2.8.21

Description

Spellchecker wrapping library

Added to portage

2026-12-02

evince - 48.5
Ebuild name:

app-text/evince-48.5

Description

Simple document viewer for GNOME

Added to portage

2026-12-02

evisum - 2.0.19
Ebuild name:

sys-process/evisum-2.0.19

Description

System and process monitor written with EFL

Added to portage

2026-12-02

firefox-bin - 161.0.1
Ebuild name:

www-client/firefox-bin-161.0.1

Description

Firefox Web Browser

Added to portage

2026-12-02

flang - 23.1.7
Ebuild name:

llvm-core/flang-23.1.7

Description

LLVM's Fortran frontend

Added to portage

2026-12-02

flang-rt - 23.1.7
Ebuild name:

llvm-runtimes/flang-rt-23.1.7

Description

LLVM's Fortran runtime

Added to portage

2026-12-02

freenet - 0.7.5_p1507-r1
Ebuild name:

net-p2p/freenet-0.7.5_p1507-r1

Description

Freenet REference Daemon

Added to portage

2026-12-02

game-music-emu - 0.6.5
Ebuild name:

media-libs/game-music-emu-0.6.5

Description

Video game music file emulators

Added to portage

2026-12-02

gherkin-official - 43.1.0
Ebuild name:

dev-python/gherkin-official-43.1.0

Description

Gherkin parser/compiler for Python

Added to portage

2026-12-02

haproxy - 3.5.0
Ebuild name:

net-proxy/haproxy-3.5.0

Description

A TCP/HTTP reverse proxy for high availability environments

Added to portage

2026-12-02

haproxy - 3.5.9999
Ebuild name:

net-proxy/haproxy-3.5.9999

Description

A TCP/HTTP reverse proxy for high availability environments

Added to portage

2026-12-02

janet - 1.32.1-r1
Ebuild name:

dev-lang/janet-1.32.1-r1

Description

A dynamic Lisp dialect and bytecode vm

Added to portage

2026-12-02

janet - 1.42.1
Ebuild name:

dev-lang/janet-1.42.1

Description

A dynamic Lisp dialect and bytecode vm

Added to portage

2026-12-02

johntheripper-jumbo - 1.9.0_p20250703
Ebuild name:

app-crypt/johntheripper-jumbo-1.9.0_p20250703

Description

Fast password cracker, community enhanced version

Added to portage

2026-12-02

johntheripper-jumbo - 9999
Ebuild name:

app-crypt/johntheripper-jumbo-9999

Description

Fast password cracker, community enhanced version

Added to portage

2026-12-02

kali-archive-keyring - 2020.2
Ebuild name:

app-crypt/kali-archive-keyring-2020.2

Description

GnuPG archive keys of the Kali archive

Added to portage

2026-12-02

kbfs - 6.0.2
Ebuild name:

app-crypt/kbfs-6.0.2

Description

Keybase Filesystem (KBFS)

Added to portage

2026-12-02

kbfs - 6.2.4
Ebuild name:

app-crypt/kbfs-6.2.4

Description

Keybase Filesystem (KBFS)

Added to portage

2026-12-02

kbfs - 9999
Ebuild name:

app-crypt/kbfs-9999

Description

Keybase Filesystem (KBFS)

Added to portage

2026-12-02

keepsecret - 26.08.3
Ebuild name:

app-crypt/keepsecret-26.08.3

Description

Password manager GUI for SecretService providers

Added to portage

2026-12-02

levenshtein - 0.27.6
Ebuild name:

dev-python/levenshtein-0.27.6

Description

Functions for fast computation of Levenshtein distance, and edit oper

Added to portage

2026-12-02

libclc - 23.1.7
Ebuild name:

llvm-runtimes/libclc-23.1.7

Description

OpenCL C library

Added to portage

2026-12-02

libcxx - 23.1.7
Ebuild name:

llvm-runtimes/libcxx-23.1.7

Description

New implementation of the C++ standard library, targeting C++11

Added to portage

2026-12-02

libcxxabi - 23.1.7
Ebuild name:

llvm-runtimes/libcxxabi-23.1.7

Description

Low level support for a standard C++ library

Added to portage

2026-12-02

libgcc - 23.1.7
Ebuild name:

llvm-runtimes/libgcc-23.1.7

Description

Compiler runtime library for clang, compatible with libgcc_s

Added to portage

2026-12-02

libnvidia-container - 1.20.2
Ebuild name:

sys-libs/libnvidia-container-1.20.2

Description

NVIDIA container runtime library

Added to portage

2026-12-02

libunwind - 23.1.7-r1
Ebuild name:

llvm-runtimes/libunwind-23.1.7-r1

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-12-02

lit - 23.1.7
Ebuild name:

dev-python/lit-23.1.7

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-12-02

lld - 23.1.7
Ebuild name:

llvm-core/lld-23.1.7

Description

The LLVM linker (link editor)

Added to portage

2026-12-02

lldb - 23.1.7-r1
Ebuild name:

llvm-core/lldb-23.1.7-r1

Description

The LLVM debugger

Added to portage

2026-12-02

llvm - 23.1.7
Ebuild name:

dev-ml/llvm-23.1.7

Description

OCaml bindings for LLVM

Added to portage

2026-12-02

llvm - 23.1.7
Ebuild name:

llvm-core/llvm-23.1.7

Description

Low Level Virtual Machine

Added to portage

2026-12-02

llvm-common - 23.1.7
Ebuild name:

llvm-core/llvm-common-23.1.7

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-12-02

lyrebird - 0.10.1
Ebuild name:

net-proxy/lyrebird-0.10.1

Description

An obfuscating proxy supporting Tor's pluggable transport protocol obfs4

Added to portage

2026-12-02

markdown2 - 2.5.6
Ebuild name:

dev-python/markdown2-2.5.6

Description

Python Markdown language reimplementation

Added to portage

2026-12-02

meson - 1.13.0_rc2
Ebuild name:

dev-build/meson-1.13.0_rc2

Description

Open source build system

Added to portage

2026-12-02

mlir - 23.1.7
Ebuild name:

llvm-core/mlir-23.1.7

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-12-02

nautilus - 50.3.1-r1
Ebuild name:

gnome-base/nautilus-50.3.1-r1

Description

Default file manager for the GNOME desktop

Added to portage

2026-12-02

nautilus - 50.4-r1
Ebuild name:

gnome-base/nautilus-50.4-r1

Description

Default file manager for the GNOME desktop

Added to portage

2026-12-02

nodejs - 24.23.0
Ebuild name:

net-libs/nodejs-24.23.0

Description

A JavaScript runtime built on Chrome's V8 JavaScript engine

Added to portage

2026-12-02

nodejs - 26.14.0
Ebuild name:

net-libs/nodejs-26.14.0

Description

A JavaScript runtime built on Chrome's V8 JavaScript engine

Added to portage

2026-12-02

nodejs - 26.14.0-r1
Ebuild name:

net-libs/nodejs-26.14.0-r1

Description

A JavaScript runtime built on Chrome's V8 JavaScript engine

Added to portage

2026-12-02

noto - 20261201
Ebuild name:

media-fonts/noto-20261201

Description

Google's font family that aims to support all the world's languages

Added to portage

2026-12-02

nuitka - 4.4.1
Ebuild name:

dev-python/nuitka-4.4.1

Description

Python to native compiler

Added to portage

2026-12-02

nvidia-container-toolkit - 1.20.2
Ebuild name:

app-containers/nvidia-container-toolkit-1.20.2

Description

NVIDIA container runtime toolkit

Added to portage

2026-12-02

ollama - 0.40.19-r1
Ebuild name:

sci-ml/ollama-0.40.19-r1

Description

Get up and running with Llama 3, Mistral, Gemma, and other language models

Added to portage

2026-12-02

openmp - 23.1.7
Ebuild name:

llvm-runtimes/openmp-23.1.7

Description

OpenMP runtime libraries for LLVM/clang compiler

Added to portage

2026-12-02

openmp-amdgcn-amd-amdhsa - 23.1.7
Ebuild name:

llvm-runtimes/openmp-amdgcn-amd-amdhsa-23.1.7

Description

OpenMP target library for amdgcn devices

Added to portage

2026-12-02

openmp-nvptx64-nvidia-cuda - 23.1.7
Ebuild name:

llvm-runtimes/openmp-nvptx64-nvidia-cuda-23.1.7

Description

OpenMP target library for nvptx64 devices

Added to portage

2026-12-02

openmp-spirv64-intel - 23.1.7
Ebuild name:

llvm-runtimes/openmp-spirv64-intel-23.1.7

Description

OpenMP target library for spirv64 Intel devices

Added to portage

2026-12-02

pam - 1.7.4
Ebuild name:

sys-libs/pam-1.7.4

Description

Linux-PAM (Pluggable Authentication Modules)

Added to portage

2026-12-02

pbs-installer - 2026.12.1
Ebuild name:

dev-python/pbs-installer-2026.12.1

Description

Installer for Python Build Standalone

Added to portage

2026-12-02

pdfio - 1.6.7
Ebuild name:

app-text/pdfio-1.6.7

Description

Simple C library for reading and writing PDFs

Added to portage

2026-12-02

pebble - 3.1.6-r1
Ebuild name:

dev-java/pebble-3.1.6-r1

Description

Templating engine for Java

Added to portage

2026-12-02

pebble - 4.1.3
Ebuild name:

dev-java/pebble-4.1.3

Description

Templating engine for Java

Added to portage

2026-12-02

polly - 23.1.7
Ebuild name:

llvm-core/polly-23.1.7

Description

Polyhedral optimizations for LLVM

Added to portage

2026-12-02

psutils - 3.3.17
Ebuild name:

app-text/psutils-3.3.17

Description

Utilities for manipulating PostScript documents

Added to portage

2026-12-02

pyopenssl - 26.5.1
Ebuild name:

dev-python/pyopenssl-26.5.1

Description

Python interface to the OpenSSL library

Added to portage

2026-12-02

pyshp - 3.1.10
Ebuild name:

sci-libs/pyshp-3.1.10

Description

Pure Python read/write support for ESRI Shapefile format

Added to portage

2026-12-02

pytoolconfig - 1.4.0
Ebuild name:

dev-python/pytoolconfig-1.4.0

Description

Python tool configuration

Added to portage

2026-12-02

pyzotero - 1.17.1
Ebuild name:

dev-python/pyzotero-1.17.1

Description

A Python client for the Zotero API

Added to portage

2026-12-02

rapidfuzz - 3.14.7
Ebuild name:

dev-python/rapidfuzz-3.14.7

Description

Rapid fuzzy string matching in Python using various string metrics

Added to portage

2026-12-02

raspberrypi-sources - 6.18.65_p20261127
Ebuild name:

sys-kernel/raspberrypi-sources-6.18.65_p20261127

Description

Raspberry Pi kernel sources

Added to portage

2026-12-02

re2c - 4.6
Ebuild name:

dev-util/re2c-4.6

Description

Tool for generating C-based recognizers from regular expressions

Added to portage

2026-12-02

rpi-eeprom - 28.41
Ebuild name:

dev-embedded/rpi-eeprom-28.41

Description

Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller

Added to portage

2026-12-02

samba - 4.24.8-r1
Ebuild name:

net-fs/samba-4.24.8-r1

Description

Samba Suite Version 4

Added to portage

2026-12-02

samba - 4.24.9-r1
Ebuild name:

net-fs/samba-4.24.9-r1

Description

Samba Suite Version 4

Added to portage

2026-12-02

sitecopy - 0.17-r1
Ebuild name:

net-misc/sitecopy-0.17-r1

Description

Maintain remote web sites with ease

Added to portage

2026-12-02

snowballstemmer - 3.2.1
Ebuild name:

dev-python/snowballstemmer-3.2.1

Description

Stemmer algorithms generated from Snowball algorithms

Added to portage

2026-12-02

soju - 0.10.1-r1
Ebuild name:

net-irc/soju-0.10.1-r1

Description

soju is a user-friendly IRC bouncer

Added to portage

2026-12-02

soju - 0.11.1-r1
Ebuild name:

net-irc/soju-0.11.1-r1

Description

soju is a user-friendly IRC bouncer

Added to portage

2026-12-02

soupsieve - 4.1.4
Ebuild name:

dev-python/soupsieve-4.1.4

Description

A modern CSS selector implementation for BeautifulSoup

Added to portage

2026-12-02

sqlglot - 30.36.0
Ebuild name:

dev-python/sqlglot-30.36.0

Description

An easily customizable SQL parser and transpiler

Added to portage

2026-12-02

texmaker - 6.0.2
Ebuild name:

app-office/texmaker-6.0.2

Description

Powerful LaTeX-IDE

Added to portage

2026-12-02

tox - 4.67.19
Ebuild name:

dev-python/tox-4.67.19

Description

virtualenv-based automation of test activities

Added to portage

2026-12-02

ttyrec - 1.2.0.1
Ebuild name:

app-misc/ttyrec-1.2.0.1

Description

ttyrec provides tools to record and replay a terminal session

Added to portage

2026-12-02

unbescape - 1.1.8
Ebuild name:

dev-java/unbescape-1.1.8

Description

Advanced yet easy-to-use escape/unescape library for Java

Added to portage

2026-12-02

untrunc - 0_pre20261101
Ebuild name:

media-video/untrunc-0_pre20261101

Description

Restore truncated mp4/mov files

Added to portage

2026-12-02

wcmatch - 13.0
Ebuild name:

dev-python/wcmatch-13.0

Description

Wildcard/glob file name matcher

Added to portage

2026-12-02

xastir - 2.2.4
Ebuild name:

media-radio/xastir-2.2.4

Description

X Amateur Station Tracking and Information Reporting

Added to portage

2026-12-02

zen-sources - 7.3.6
Ebuild name:

sys-kernel/zen-sources-7.3.6

Description

The Zen Kernel Live Sources

Added to portage

2026-12-02

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 55.0 ms