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:

84018

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-03-26
dist-kernel - 6.1.167
Ebuild name:

virtual/dist-kernel-6.1.167

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-03-26

dist-kernel - 6.12.78
Ebuild name:

virtual/dist-kernel-6.12.78

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-03-26

dist-kernel - 6.18.20
Ebuild name:

virtual/dist-kernel-6.18.20

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-03-26

dist-kernel - 6.19.10
Ebuild name:

virtual/dist-kernel-6.19.10

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-03-26

dist-kernel - 6.6.130
Ebuild name:

virtual/dist-kernel-6.6.130

Description

Virtual to depend on any Distribution Kernel

Added to portage

2026-03-26

gentoo-kernel - 6.1.167
Ebuild name:

sys-kernel/gentoo-kernel-6.1.167

Description

Linux kernel built with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel - 6.12.78
Ebuild name:

sys-kernel/gentoo-kernel-6.12.78

Description

Linux kernel built with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel - 6.18.20
Ebuild name:

sys-kernel/gentoo-kernel-6.18.20

Description

Linux kernel built with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel - 6.19.10
Ebuild name:

sys-kernel/gentoo-kernel-6.19.10

Description

Linux kernel built with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel - 6.6.130
Ebuild name:

sys-kernel/gentoo-kernel-6.6.130

Description

Linux kernel built with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel-bin - 6.1.167
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.1.167

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel-bin - 6.12.78
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.12.78

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel-bin - 6.18.20
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.18.20

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel-bin - 6.19.10
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.19.10

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-03-26

gentoo-kernel-bin - 6.6.130
Ebuild name:

sys-kernel/gentoo-kernel-bin-6.6.130

Description

Pre-built Linux kernel with Gentoo patches

Added to portage

2026-03-26

rumpkernel - 0_p20250111_p6
Ebuild name:

sys-kernel/rumpkernel-0_p20250111_p6

Description

NetBSD's rumpkernel for the Hurd

Added to portage

2026-03-26

rumpkernel - 9999
Ebuild name:

sys-kernel/rumpkernel-9999

Description

NetBSD's rumpkernel for the Hurd

Added to portage

2026-03-26

sonarr-bin - 4.0.17.2953
Ebuild name:

www-apps/sonarr-bin-4.0.17.2953

Description

Sonarr is a Smart PVR for newsgroup and bittorrent users

Added to portage

2026-03-26

tor - 0.4.9.6
Ebuild name:

net-vpn/tor-0.4.9.6

Description

Anonymizing overlay network for TCP

Added to portage

2026-03-26

vanilla-kernel - 6.1.167
Ebuild name:

sys-kernel/vanilla-kernel-6.1.167

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-03-26

vanilla-kernel - 6.12.78
Ebuild name:

sys-kernel/vanilla-kernel-6.12.78

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-03-26

vanilla-kernel - 6.18.20
Ebuild name:

sys-kernel/vanilla-kernel-6.18.20

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-03-26

vanilla-kernel - 6.19.10
Ebuild name:

sys-kernel/vanilla-kernel-6.19.10

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-03-26

vanilla-kernel - 6.6.130
Ebuild name:

sys-kernel/vanilla-kernel-6.6.130

Description

Linux kernel built from vanilla upstream sources

Added to portage

2026-03-26

2026-03-25
anyio - 4.13.0
Ebuild name:

dev-python/anyio-4.13.0

Description

Compatibility layer for multiple asynchronous event loop implementations

Added to portage

2026-03-25

awscli - 1.44.65
Ebuild name:

app-admin/awscli-1.44.65

Description

Universal Command Line Environment for AWS

Added to portage

2026-03-25

bitcoin-core - 31.0_rc1
Ebuild name:

net-p2p/bitcoin-core-31.0_rc1

Description

Reference implementation of the Bitcoin cryptocurrency

Added to portage

2026-03-25

boto3 - 1.42.75
Ebuild name:

dev-python/boto3-1.42.75

Description

The AWS SDK for Python

Added to portage

2026-03-25

botocore - 1.42.75
Ebuild name:

dev-python/botocore-1.42.75

Description

Low-level, data-driven core of boto 3

Added to portage

2026-03-25

build - 1.4.1
Ebuild name:

dev-python/build-1.4.1

Description

A simple, correct PEP517 package builder

Added to portage

2026-03-25

cfn-lint - 1.47.1
Ebuild name:

dev-python/cfn-lint-1.47.1

Description

CloudFormation Linter

Added to portage

2026-03-25

clang - 22.1.2
Ebuild name:

dev-python/clang-22.1.2

Description

Python bindings for llvm-core/clang

Added to portage

2026-03-25

clang - 22.1.2
Ebuild name:

llvm-core/clang-22.1.2

Description

C language family frontend for LLVM

Added to portage

2026-03-25

clang-common - 22.1.2
Ebuild name:

llvm-core/clang-common-22.1.2

Description

Common files shared between multiple slots of clang

Added to portage

2026-03-25

claude-code - 2.1.83
Ebuild name:

dev-util/claude-code-2.1.83

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-03-25

compiler-rt - 22.1.2
Ebuild name:

llvm-runtimes/compiler-rt-22.1.2

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-03-25

compiler-rt-sanitizers - 22.1.2
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-22.1.2

Description

Compiler runtime libraries for clang (sanitizers & xray

Added to portage

2026-03-25

dash - 0.5.13.2
Ebuild name:

app-shells/dash-0.5.13.2

Description

Debian Almquist Shell

Added to portage

2026-03-25

debtcollector - 3.1.0
Ebuild name:

dev-python/debtcollector-3.1.0

Description

Python deprecation patterns and strategies that collect technical de

Added to portage

2026-03-25

discord - 0.0.130
Ebuild name:

net-im/discord-0.0.130

Description

All-in-one voice and text chat for gamers

Added to portage

2026-03-25

djangorestframework - 3.17.1
Ebuild name:

dev-python/djangorestframework-3.17.1

Description

Web APIs with django made easy

Added to portage

2026-03-25

duckdb - 1.5.1
Ebuild name:

dev-db/duckdb-1.5.1

Description

high-performance analytical database system

Added to portage

2026-03-25

firefox-l10n - 149.0-r1
Ebuild name:

www-client/firefox-l10n-149.0-r1

Description

Firefox Web Browser's translation files

Added to portage

2026-03-25

flang - 22.1.2
Ebuild name:

llvm-core/flang-22.1.2

Description

LLVM's Fortran frontend

Added to portage

2026-03-25

flang-rt - 22.1.2
Ebuild name:

llvm-runtimes/flang-rt-22.1.2

Description

LLVM's Fortran runtime

Added to portage

2026-03-25

fotocx - 26.3
Ebuild name:

media-gfx/fotocx-26.3

Description

Program for improving image files made with a digital camera

Added to portage

2026-03-25

fs - 2.4.16-r2
Ebuild name:

dev-python/fs-2.4.16-r2

Description

Filesystem abstraction layer

Added to portage

2026-03-25

genshi - 0.7.10-r1
Ebuild name:

dev-python/genshi-0.7.10-r1

Description

Python toolkit for stream-based generation of output for the web

Added to portage

2026-03-25

gentoo-sources - 6.1.167
Ebuild name:

sys-kernel/gentoo-sources-6.1.167

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-03-25

gentoo-sources - 6.12.78
Ebuild name:

sys-kernel/gentoo-sources-6.12.78

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-03-25

gentoo-sources - 6.18.20
Ebuild name:

sys-kernel/gentoo-sources-6.18.20

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-03-25

gentoo-sources - 6.19.10
Ebuild name:

sys-kernel/gentoo-sources-6.19.10

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-03-25

gentoo-sources - 6.6.130
Ebuild name:

sys-kernel/gentoo-sources-6.6.130

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-03-25

glib - 2.84.4-r3
Ebuild name:

dev-libs/glib-2.84.4-r3

Description

The GLib library of C routines

Added to portage

2026-03-25

glib - 2.86.4-r1
Ebuild name:

dev-libs/glib-2.86.4-r1

Description

The GLib library of C routines

Added to portage

2026-03-25

gpredict - 2.5.1
Ebuild name:

media-radio/gpredict-2.5.1

Description

Real-time satellite tracking and orbit prediction application

Added to portage

2026-03-25

gst-plugins-libnice - 0.1.23
Ebuild name:

media-plugins/gst-plugins-libnice-0.1.23

Description

GStreamer plugin for ICE (RFC 5245) support

Added to portage

2026-03-25

gunicorn - 25.2.0
Ebuild name:

www-servers/gunicorn-25.2.0

Description

A WSGI HTTP Server for UNIX

Added to portage

2026-03-25

libclc - 22.1.2
Ebuild name:

llvm-core/libclc-22.1.2

Description

OpenCL C library

Added to portage

2026-03-25

libcxx - 22.1.2
Ebuild name:

llvm-runtimes/libcxx-22.1.2

Description

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

Added to portage

2026-03-25

libcxxabi - 22.1.2
Ebuild name:

llvm-runtimes/libcxxabi-22.1.2

Description

Low level support for a standard C++ library

Added to portage

2026-03-25

libgcc - 22.1.2
Ebuild name:

llvm-runtimes/libgcc-22.1.2

Description

Compiler runtime library for clang, compatible with libgcc_s

Added to portage

2026-03-25

libnice - 0.1.23-r1
Ebuild name:

net-libs/libnice-0.1.23-r1

Description

Implementation of the Interactive Connectivity Establishment standard (I

Added to portage

2026-03-25

libunwind - 22.1.2
Ebuild name:

llvm-runtimes/libunwind-22.1.2

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-03-25

lit - 22.1.2
Ebuild name:

dev-python/lit-22.1.2

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-03-25

lld - 22.1.2
Ebuild name:

llvm-core/lld-22.1.2

Description

The LLVM linker (link editor)

Added to portage

2026-03-25

lldb - 22.1.2
Ebuild name:

llvm-core/lldb-22.1.2

Description

The LLVM debugger

Added to portage

2026-03-25

llvm - 22.1.2
Ebuild name:

dev-ml/llvm-22.1.2

Description

OCaml bindings for LLVM

Added to portage

2026-03-25

llvm - 22.1.2
Ebuild name:

llvm-core/llvm-22.1.2

Description

Low Level Virtual Machine

Added to portage

2026-03-25

llvm-common - 22.1.2
Ebuild name:

llvm-core/llvm-common-22.1.2

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-03-25

marknote - 1.5.2
Ebuild name:

app-text/marknote-1.5.2

Description

Markdown editor with a wide range of formating options for everyday notes

Added to portage

2026-03-25

mlir - 22.1.2
Ebuild name:

llvm-core/mlir-22.1.2

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-03-25

mocker - 0.5.0
Ebuild name:

app-emacs/mocker-0.5.0

Description

Simple mocking framework for Emacs

Added to portage

2026-03-25

modus-themes - 5.1.0
Ebuild name:

app-emacs/modus-themes-5.1.0

Description

Highly accessible themes for GNU Emacs

Added to portage

2026-03-25

narwhals - 2.18.1
Ebuild name:

dev-python/narwhals-2.18.1

Description

Extremely lightweight compatibility layer between dataframe libraries

Added to portage

2026-03-25

nuitka - 4.0.7
Ebuild name:

dev-python/nuitka-4.0.7

Description

Python to native compiler

Added to portage

2026-03-25

offload - 22.1.2
Ebuild name:

llvm-runtimes/offload-22.1.2

Description

OpenMP offloading support

Added to portage

2026-03-25

openmp - 22.1.2
Ebuild name:

llvm-runtimes/openmp-22.1.2

Description

OpenMP runtime library for LLVM/clang compiler

Added to portage

2026-03-25

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

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

Description

OpenMP target library for amdgcn devices

Added to portage

2026-03-25

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

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

Description

OpenMP target library for nvptx64 devices

Added to portage

2026-03-25

oslotest - 6.1.0
Ebuild name:

dev-python/oslotest-6.1.0

Description

Oslo test framework

Added to portage

2026-03-25

passlib - 1.7.4-r5
Ebuild name:

dev-python/passlib-1.7.4-r5

Description

Password hashing framework supporting over 20 schemes

Added to portage

2026-03-25

pbs-installer - 2026.3.24
Ebuild name:

dev-python/pbs-installer-2026.3.24

Description

Installer for Python Build Standalone

Added to portage

2026-03-25

pdm - 2.26.7
Ebuild name:

dev-python/pdm-2.26.7

Description

Python package and dependency manager supporting the latest PEP standards

Added to portage

2026-03-25

pkg-resources - 0
Ebuild name:

dev-python/pkg-resources-0

Description

pkg_resources compatibility shim

Added to portage

2026-03-25

pkg-resources - 81.0.0
Ebuild name:

dev-python/pkg-resources-81.0.0

Description

pkg_resources package split form old setuptools

Added to portage

2026-03-25

polly - 22.1.2
Ebuild name:

llvm-core/polly-22.1.2

Description

Polyhedral optimizations for LLVM

Added to portage

2026-03-25

qrca - 25.12.3-r1
Ebuild name:

media-gfx/qrca-25.12.3-r1

Description

Simple barcode scanner and QR code generator

Added to portage

2026-03-25

qtconsole - 5.7.2
Ebuild name:

dev-python/qtconsole-5.7.2

Description

Qt-based console for Jupyter with support for rich media output

Added to portage

2026-03-25

redis - 7.4.0
Ebuild name:

dev-python/redis-7.4.0

Description

Python client for Redis key-value store

Added to portage

2026-03-25

sphinx-autodoc-typehints - 3.9.11
Ebuild name:

dev-python/sphinx-autodoc-typehints-3.9.11

Description

Type hints support for the Sphinx autodoc extension

Added to portage

2026-03-25

sssd - 2.12.0-r2
Ebuild name:

sys-auth/sssd-2.12.0-r2

Description

System Security Services Daemon provides access to identity and authenticat

Added to portage

2026-03-25

thunderbird - 149.0
Ebuild name:

mail-client/thunderbird-149.0

Description

Thunderbird Mail Client

Added to portage

2026-03-25

thunderbird-bin - 149.0
Ebuild name:

mail-client/thunderbird-bin-149.0

Description

Thunderbird Mail Client

Added to portage

2026-03-25

trimesh - 4.11.5
Ebuild name:

dev-python/trimesh-4.11.5

Description

Python library for loading and using triangular meshes

Added to portage

2026-03-25

uv - 0.11.1
Ebuild name:

dev-python/uv-0.11.1

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-03-25

uv-build - 0.11.1
Ebuild name:

dev-python/uv-build-0.11.1

Description

PEP517 uv build backend

Added to portage

2026-03-25

vanilla-sources - 6.1.167
Ebuild name:

sys-kernel/vanilla-sources-6.1.167

Description

Full sources for the Linux kernel

Added to portage

2026-03-25

vanilla-sources - 6.12.78
Ebuild name:

sys-kernel/vanilla-sources-6.12.78

Description

Full sources for the Linux kernel

Added to portage

2026-03-25

vanilla-sources - 6.18.20
Ebuild name:

sys-kernel/vanilla-sources-6.18.20

Description

Full sources for the Linux kernel

Added to portage

2026-03-25

vanilla-sources - 6.19.10
Ebuild name:

sys-kernel/vanilla-sources-6.19.10

Description

Full sources for the Linux kernel

Added to portage

2026-03-25

vanilla-sources - 6.6.130
Ebuild name:

sys-kernel/vanilla-sources-6.6.130

Description

Full sources for the Linux kernel

Added to portage

2026-03-25

xpadneo - 0.10.1
Ebuild name:

games-util/xpadneo-0.10.1

Description

Advanced Linux Driver for Xbox One Wireless Controller

Added to portage

2026-03-25

zen-sources - 6.19.9
Ebuild name:

sys-kernel/zen-sources-6.19.9

Description

The Zen Kernel Live Sources

Added to portage

2026-03-25

zookeeper-bin - 3.8.6
Ebuild name:

sys-cluster/zookeeper-bin-3.8.6

Description

A high-performance coordination service for distributed application

Added to portage

2026-03-25

zookeeper-bin - 3.9.5
Ebuild name:

sys-cluster/zookeeper-bin-3.9.5

Description

A high-performance coordination service for distributed application

Added to portage

2026-03-25

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