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:

83805

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-18
Dist-Zilla-Plugin-Test-Compile - 2.59.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Test-Compile-2.59.0

Description

Common tests to check syntax of your modules, using

Added to portage

2026-03-18

Dist-Zilla-Plugin-Test-MinimumVersion - 2.0.11
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Test-MinimumVersion-2.0.11

Description

Release tests for minimum required versions

Added to portage

2026-03-18

Dist-Zilla-Plugin-Test-Perl-Critic - 3.5.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Test-Perl-Critic-3.5.0

Description

Tests to check your code against best practices

Added to portage

2026-03-18

EV - 4.370.0
Ebuild name:

dev-perl/EV-4.370.0

Description

Perl interface to libev, a high performance full-featured event loop

Added to portage

2026-03-18

Exporter-Tiny - 1.6.3
Ebuild name:

dev-perl/Exporter-Tiny-1.6.3

Description

An exporter with the features of Sub but only core dependencies

Added to portage

2026-03-18

File-DesktopEntry - 0.230.0
Ebuild name:

dev-perl/File-DesktopEntry-0.230.0

Description

Object to handle .desktop files

Added to portage

2026-03-18

File-MimeInfo - 0.360.0
Ebuild name:

dev-perl/File-MimeInfo-0.360.0

Description

Determine file type

Added to portage

2026-03-18

File-Scan-ClamAV - 1.960.0
Ebuild name:

dev-perl/File-Scan-ClamAV-1.960.0

Description

Connect to a local Clam Anti-Virus clamd service and send command

Added to portage

2026-03-18

Graphics-Toolkit-Color - 1.972.0
Ebuild name:

dev-perl/Graphics-Toolkit-Color-1.972.0

Description

Color palette constructor

Added to portage

2026-03-18

HTML-HTMLDoc - 0.250.0
Ebuild name:

dev-perl/HTML-HTMLDoc-0.250.0

Description

Perl interface to the htmldoc program for producing PDF-Files from HT

Added to portage

2026-03-18

aurorae - 6.6.3
Ebuild name:

kde-plasma/aurorae-6.6.3

Description

Themeable window decoration for KWin

Added to portage

2026-03-18

bluedevil - 6.6.3
Ebuild name:

kde-plasma/bluedevil-6.6.3

Description

Bluetooth stack for KDE Plasma

Added to portage

2026-03-18

breeze - 6.6.3
Ebuild name:

kde-plasma/breeze-6.6.3

Description

Breeze visual style for the Plasma desktop

Added to portage

2026-03-18

breeze-grub - 6.6.3
Ebuild name:

kde-plasma/breeze-grub-6.6.3

Description

Breeze theme for GRUB

Added to portage

2026-03-18

breeze-gtk - 6.6.3
Ebuild name:

kde-plasma/breeze-gtk-6.6.3

Description

Official GTK+ port of Plasma's Breeze widget style

Added to portage

2026-03-18

breeze-plymouth - 6.6.3
Ebuild name:

kde-plasma/breeze-plymouth-6.6.3

Description

Breeze theme for Plymouth

Added to portage

2026-03-18

discover - 6.6.3
Ebuild name:

kde-plasma/discover-6.6.3

Description

KDE Plasma resources management GUI

Added to portage

2026-03-18

drkonqi - 6.6.3
Ebuild name:

kde-plasma/drkonqi-6.6.3

Description

Plasma crash handler, gives the user feedback if a program crashed

Added to portage

2026-03-18

expat - 2.7.5
Ebuild name:

dev-libs/expat-2.7.5

Description

Stream-oriented XML parser library

Added to portage

2026-03-18

flatpak-kcm - 6.6.3
Ebuild name:

kde-plasma/flatpak-kcm-6.6.3

Description

Flatpak Permissions Management KCM

Added to portage

2026-03-18

kactivitymanagerd - 6.6.3
Ebuild name:

kde-plasma/kactivitymanagerd-6.6.3

Description

System service to manage user's activities, track the usage patt

Added to portage

2026-03-18

kde-cli-tools - 6.6.3
Ebuild name:

kde-plasma/kde-cli-tools-6.6.3

Description

Tools based on KDE Frameworks 6 to better interact with the system

Added to portage

2026-03-18

kde-cli-tools-common - 6.6.3
Ebuild name:

kde-plasma/kde-cli-tools-common-6.6.3

Description

Added to portage

2026-03-18

kde-gtk-config - 6.6.3
Ebuild name:

kde-plasma/kde-gtk-config-6.6.3

Description

Syncs KDE Plasma theme settings to GTK applications

Added to portage

2026-03-18

kdecoration - 6.6.3
Ebuild name:

kde-plasma/kdecoration-6.6.3

Description

Plugin based library to create window decorations

Added to portage

2026-03-18

kdeplasma-addons - 6.6.3
Ebuild name:

kde-plasma/kdeplasma-addons-6.6.3

Description

Extra Plasma applets and engines

Added to portage

2026-03-18

kdesu-gui - 6.6.3
Ebuild name:

kde-plasma/kdesu-gui-6.6.3

Description

Graphical frontend for KDE Frameworks' kdesu

Added to portage

2026-03-18

keditfiletype - 6.6.3
Ebuild name:

kde-plasma/keditfiletype-6.6.3

Description

File Type Editor

Added to portage

2026-03-18

kgamma - 6.6.3
Ebuild name:

kde-plasma/kgamma-6.6.3

Description

Screen gamma values kcontrol module

Added to portage

2026-03-18

kglobalacceld - 6.6.3
Ebuild name:

kde-plasma/kglobalacceld-6.6.3

Description

Daemon providing Global Keyboard Shortcut (Accelerator) functionalit

Added to portage

2026-03-18

kinfocenter - 6.6.3
Ebuild name:

kde-plasma/kinfocenter-6.6.3

Description

Utility providing information about the computer hardware

Added to portage

2026-03-18

kmenuedit - 6.6.3
Ebuild name:

kde-plasma/kmenuedit-6.6.3

Description

KDE Plasma menu editor

Added to portage

2026-03-18

knighttime - 6.6.3
Ebuild name:

kde-plasma/knighttime-6.6.3

Description

Helpers for scheduling the dark-light cycle

Added to portage

2026-03-18

kpipewire - 6.6.3
Ebuild name:

kde-plasma/kpipewire-6.6.3

Description

Components relating to Flatpak pipewire use in Plasma

Added to portage

2026-03-18

krdp - 6.6.3
Ebuild name:

kde-plasma/krdp-6.6.3

Description

Library and examples for creating an RDP server

Added to portage

2026-03-18

kscreen - 6.6.3
Ebuild name:

kde-plasma/kscreen-6.6.3

Description

KDE Plasma screen management

Added to portage

2026-03-18

kscreenlocker - 6.6.3
Ebuild name:

kde-plasma/kscreenlocker-6.6.3

Description

Library and components for secure lock screen architecture

Added to portage

2026-03-18

ksshaskpass - 6.6.3
Ebuild name:

kde-plasma/ksshaskpass-6.6.3

Description

Implementation of ssh-askpass with KDE Wallet integration

Added to portage

2026-03-18

ksystemstats - 6.6.3
Ebuild name:

kde-plasma/ksystemstats-6.6.3

Description

Plugin-based system monitoring daemon

Added to portage

2026-03-18

kwallet-pam - 6.6.3
Ebuild name:

kde-plasma/kwallet-pam-6.6.3

Description

PAM module to not enter KWallet password again after login

Added to portage

2026-03-18

kwayland - 6.6.3
Ebuild name:

kde-plasma/kwayland-6.6.3

Description

Qt-style API to interact with the wayland-client API

Added to portage

2026-03-18

kwin - 6.6.3
Ebuild name:

kde-plasma/kwin-6.6.3

Description

Flexible, composited Window Manager for windowing systems on Linux

Added to portage

2026-03-18

kwin-x11 - 6.6.3
Ebuild name:

kde-plasma/kwin-x11-6.6.3

Description

Flexible, composited X window manager

Added to portage

2026-03-18

kwrited - 6.6.3
Ebuild name:

kde-plasma/kwrited-6.6.3

Description

KDE Plasma daemon listening for wall and write messages

Added to portage

2026-03-18

layer-shell-qt - 6.6.3
Ebuild name:

kde-plasma/layer-shell-qt-6.6.3

Description

Qt component to allow applications make use of Wayland wl-layer-she

Added to portage

2026-03-18

libpciaccess - 0.19
Ebuild name:

x11-libs/libpciaccess-0.19

Description

Library providing generic access to the PCI bus and devices

Added to portage

2026-03-18

marknote - 1.5.0-r1
Ebuild name:

app-text/marknote-1.5.0-r1

Description

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

Added to portage

2026-03-18

plasma-pass - 1.3.1
Ebuild name:

kde-misc/plasma-pass-1.3.1

Description

Plasma applet to access password from pass

Added to portage

2026-03-18

systemd-initctl - 3
Ebuild name:

sys-apps/systemd-initctl-3

Description

initctl Compatibility Daemon

Added to portage

2026-03-18

yt-dlp-ejs - 0.8.0
Ebuild name:

dev-python/yt-dlp-ejs-0.8.0

Description

External JavaScript for yt-dlp supporting many runtimes

Added to portage

2026-03-18

2026-03-17
Dist-Zilla-Plugin-ContributorsFile - 0.4.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-ContributorsFile-0.4.0

Description

Add a file listing all contributors

Added to portage

2026-03-17

Dist-Zilla-Plugin-Git - 2.52.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Git-2.52.0

Description

Update your git repository after release

Added to portage

2026-03-17

Dist-Zilla-Plugin-ModuleBuildTiny - 0.20.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-ModuleBuildTiny-0.20.0

Description

Build a Build.PL that uses Module

Added to portage

2026-03-17

Dist-Zilla-Plugin-PodWeaver - 4.10.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-PodWeaver-4.10.0

Description

Weave your Pod together from configuration and Dist

Added to portage

2026-03-17

Dist-Zilla-Plugin-ReadmeFromPod - 0.400.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-ReadmeFromPod-0.400.0

Description

dzil plugin to generate README from POD

Added to portage

2026-03-17

ansible-pylibssh - 1.4.0
Ebuild name:

dev-python/ansible-pylibssh-1.4.0

Description

Python bindings for libssh client specific to Ansible use case

Added to portage

2026-03-17

awscli - 1.44.59
Ebuild name:

app-admin/awscli-1.44.59

Description

Universal Command Line Environment for AWS

Added to portage

2026-03-17

boto3 - 1.42.69
Ebuild name:

dev-python/boto3-1.42.69

Description

The AWS SDK for Python

Added to portage

2026-03-17

botocore - 1.42.69
Ebuild name:

dev-python/botocore-1.42.69

Description

Low-level, data-driven core of boto 3

Added to portage

2026-03-17

claude-code - 2.1.77
Ebuild name:

dev-util/claude-code-2.1.77

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-03-17

clzip - 1.16
Ebuild name:

app-arch/clzip-1.16

Description

C language version of lzip

Added to portage

2026-03-17

difftastic - 0.68.0
Ebuild name:

dev-util/difftastic-0.68.0

Description

A structural diff that understands syntax.

Added to portage

2026-03-17

dovecot - 2.4.2-r3
Ebuild name:

net-mail/dovecot-2.4.2-r3

Description

An IMAP and POP3 server written with security primarily in mind

Added to portage

2026-03-17

elfutils - 0.193-r2
Ebuild name:

dev-libs/elfutils-0.193-r2

Description

Libraries/utilities to handle ELF objects (drop in replacement for libel

Added to portage

2026-03-17

elfutils - 0.194-r1
Ebuild name:

dev-libs/elfutils-0.194-r1

Description

Libraries/utilities to handle ELF objects (drop in replacement for libel

Added to portage

2026-03-17

evisum - 1.0.0
Ebuild name:

sys-process/evisum-1.0.0

Description

System and process monitor written with EFL

Added to portage

2026-03-17

ffmpeg - 8.1
Ebuild name:

media-video/ffmpeg-8.1

Description

Complete solution to record/convert/stream audio and video

Added to portage

2026-03-17

hiredis - 3.3.1
Ebuild name:

dev-python/hiredis-3.3.1

Description

Python extension that wraps hiredis

Added to portage

2026-03-17

libbpf - 1.7.0
Ebuild name:

dev-libs/libbpf-1.7.0

Description

Stand-alone build of libbpf from the Linux kernel

Added to portage

2026-03-17

navi2ch - 1.8.4-r2
Ebuild name:

app-emacs/navi2ch-1.8.4-r2

Description

A navigator for the Japanese textboard 2ch

Added to portage

2026-03-17

nerd-icons - 0.1.0
Ebuild name:

app-emacs/nerd-icons-0.1.0

Description

Emacs Nerd Font Icons Library

Added to portage

2026-03-17

obs-studio - 32.1.0
Ebuild name:

media-video/obs-studio-32.1.0

Description

Software for Recording and Streaming Live Video Content

Added to portage

2026-03-17

openfortivpn - 1.24.1
Ebuild name:

net-vpn/openfortivpn-1.24.1

Description

Fortinet compatible VPN client

Added to portage

2026-03-17

pipx - 1.9.0
Ebuild name:

dev-python/pipx-1.9.0

Description

Install and Run Python Applications in Isolated Environments

Added to portage

2026-03-17

plasma-pass - 1.3.0-r1
Ebuild name:

kde-misc/plasma-pass-1.3.0-r1

Description

Plasma applet to access password from pass

Added to portage

2026-03-17

postfix - 3.12_pre20260316
Ebuild name:

mail-mta/postfix-3.12_pre20260316

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2026-03-17

prek - 0.3.6
Ebuild name:

dev-util/prek-0.3.6

Description

Better `pre-commit`, re-engineered in Rust

Added to portage

2026-03-17

pyasn1 - 0.6.3
Ebuild name:

dev-python/pyasn1-0.6.3

Description

ASN.1 library for Python

Added to portage

2026-03-17

pyproject-fmt - 2.19.0
Ebuild name:

dev-python/pyproject-fmt-2.19.0

Description

Format your pyproject.toml file

Added to portage

2026-03-17

signal-desktop-bin - 8.2.1
Ebuild name:

net-im/signal-desktop-bin-8.2.1

Description

Allows you to send and receive messages of Signal Messenger on your

Added to portage

2026-03-17

simdjson - 4.4.1
Ebuild name:

dev-libs/simdjson-4.4.1

Description

SIMD accelerated C++ JSON library

Added to portage

2026-03-17

simpleeval - 1.0.7
Ebuild name:

dev-python/simpleeval-1.0.7

Description

A simple, safe single expression evaluator library

Added to portage

2026-03-17

solarus-quest-editor - 2.0.3-r1
Ebuild name:

games-misc/solarus-quest-editor-2.0.3-r1

Description

Quest editor for Solarus game engine

Added to portage

2026-03-17

telegram-desktop - 6.6.2
Ebuild name:

net-im/telegram-desktop-6.6.2

Description

Official desktop client for Telegram

Added to portage

2026-03-17

tg_owt - 0_pre20260309
Ebuild name:

media-libs/tg_owt-0_pre20260309

Description

WebRTC build for Telegram

Added to portage

2026-03-17

types-docutils - 0.22.3.20260316
Ebuild name:

dev-python/types-docutils-0.22.3.20260316

Description

Typing stubs for docutils

Added to portage

2026-03-17

util-linux - 2.41.3-r1
Ebuild name:

sys-apps/util-linux-2.41.3-r1

Description

Various useful Linux utilities

Added to portage

2026-03-17

uv - 0.10.11
Ebuild name:

dev-python/uv-0.10.11

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-03-17

uv-build - 0.10.11
Ebuild name:

dev-python/uv-build-0.10.11

Description

PEP517 uv build backend

Added to portage

2026-03-17

uvicorn - 0.42.0
Ebuild name:

dev-python/uvicorn-0.42.0

Description

Lightning-fast ASGI server implementation

Added to portage

2026-03-17

xfconf - 4.21.2
Ebuild name:

xfce-base/xfconf-4.21.2

Description

A configuration management system for Xfce

Added to portage

2026-03-17

xmms2 - 0.9.7
Ebuild name:

media-sound/xmms2-0.9.7

Description

X(cross)platform Music Multiplexing System, next generation of the XMMS pla

Added to portage

2026-03-17

zen-sources - 6.19.8
Ebuild name:

sys-kernel/zen-sources-6.19.8

Description

The Zen Kernel Live Sources

Added to portage

2026-03-17

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