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:

84551

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-04-22
android-studio - 2025.3.4.6
Ebuild name:

dev-util/android-studio-2025.3.4.6

Description

Android development environment based on IntelliJ IDEA

Added to portage

2026-04-22

apache-arrow - 24.0.0
Ebuild name:

dev-libs/apache-arrow-24.0.0

Description

A cross-language development platform for in-memory data

Added to portage

2026-04-22

apache-libcloud - 3.9.1
Ebuild name:

dev-python/apache-libcloud-3.9.1

Description

Unified Interface to the Cloud - python support libs

Added to portage

2026-04-22

claude-code - 2.1.116
Ebuild name:

dev-util/claude-code-2.1.116

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-04-22

hplip - 3.25.8-r1
Ebuild name:

net-print/hplip-3.25.8-r1

Description

HP Linux Imaging and Printing - Print, scan, fax drivers and service tool

Added to portage

2026-04-22

idna - 3.12
Ebuild name:

dev-python/idna-3.12

Description

Internationalized Domain Names in Applications (IDNA)

Added to portage

2026-04-22

libpwquality - 1.4.5-r3
Ebuild name:

dev-libs/libpwquality-1.4.5-r3

Description

Library for password quality checking and generating random password

Added to portage

2026-04-22

mhash - 0.9.9.9-r4
Ebuild name:

app-crypt/mhash-0.9.9.9-r4

Description

Library providing a uniform interface to a large number of hash algorith

Added to portage

2026-04-22

mypy - 1.20.2
Ebuild name:

dev-python/mypy-1.20.2

Description

Optional static typing for Python

Added to portage

2026-04-22

pyarrow - 24.0.0
Ebuild name:

dev-python/pyarrow-24.0.0

Description

Python library for Apache Arrow

Added to portage

2026-04-22

pydata-sphinx-theme - 0.17.1
Ebuild name:

dev-python/pydata-sphinx-theme-0.17.1

Description

Bootstrap-based Sphinx theme from the PyData community

Added to portage

2026-04-22

ruby - 4.0.3
Ebuild name:

dev-lang/ruby-4.0.3

Description

An object-oriented scripting language

Added to portage

2026-04-22

skanpage - 25.12.3-r1
Ebuild name:

media-gfx/skanpage-25.12.3-r1

Description

Multi-page scanning application supporting image and pdf files

Added to portage

2026-04-22

skanpage - 26.04.0-r1
Ebuild name:

media-gfx/skanpage-26.04.0-r1

Description

Multi-page scanning application supporting image and pdf files

Added to portage

2026-04-22

uvicorn - 0.45.0
Ebuild name:

dev-python/uvicorn-0.45.0

Description

Lightning-fast ASGI server implementation

Added to portage

2026-04-22

webkit-gtk - 2.52.3-r410
Ebuild name:

net-libs/webkit-gtk-2.52.3-r410

Description

Open source web browser engine

Added to portage

2026-04-22

webkit-gtk - 2.52.3-r600
Ebuild name:

net-libs/webkit-gtk-2.52.3-r600

Description

Open source web browser engine

Added to portage

2026-04-22

2026-04-21
awscli - 1.44.82
Ebuild name:

app-admin/awscli-1.44.82

Description

Universal Command Line Environment for AWS

Added to portage

2026-04-21

boto3 - 1.42.92
Ebuild name:

dev-python/boto3-1.42.92

Description

The AWS SDK for Python

Added to portage

2026-04-21

botocore - 1.42.92
Ebuild name:

dev-python/botocore-1.42.92

Description

Low-level, data-driven core of boto 3

Added to portage

2026-04-21

cachetools - 7.0.6
Ebuild name:

dev-python/cachetools-7.0.6

Description

Extensible memoizing collections and decorators

Added to portage

2026-04-21

cfn-lint - 1.49.0
Ebuild name:

dev-python/cfn-lint-1.49.0

Description

CloudFormation Linter

Added to portage

2026-04-21

chirp - 20260417
Ebuild name:

media-radio/chirp-20260417

Description

A free, open-source tool for programming your radio

Added to portage

2026-04-21

clang - 22.1.4
Ebuild name:

dev-python/clang-22.1.4

Description

Python bindings for llvm-core/clang

Added to portage

2026-04-21

clang - 22.1.4
Ebuild name:

llvm-core/clang-22.1.4

Description

C language family frontend for LLVM

Added to portage

2026-04-21

clang-common - 22.1.4
Ebuild name:

llvm-core/clang-common-22.1.4

Description

Common files shared between multiple slots of clang

Added to portage

2026-04-21

compiler-rt - 22.1.4
Ebuild name:

llvm-runtimes/compiler-rt-22.1.4

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-04-21

compiler-rt-sanitizers - 22.1.4
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-22.1.4

Description

Compiler runtime libraries for clang (sanitizers & xray

Added to portage

2026-04-21

ddcutil - 2.2.6
Ebuild name:

app-misc/ddcutil-2.2.6

Description

Program for querying and changing monitor settings

Added to portage

2026-04-21

firefox - 140.10.0
Ebuild name:

www-client/firefox-140.10.0

Description

Firefox Web Browser

Added to portage

2026-04-21

firefox - 150.0
Ebuild name:

www-client/firefox-150.0

Description

Firefox Web Browser

Added to portage

2026-04-21

firefox-bin - 140.10.0
Ebuild name:

www-client/firefox-bin-140.10.0

Description

Firefox Web Browser

Added to portage

2026-04-21

firefox-l10n - 150.0
Ebuild name:

www-client/firefox-l10n-150.0

Description

Firefox Web Browser's translation files

Added to portage

2026-04-21

flang - 22.1.4
Ebuild name:

llvm-core/flang-22.1.4

Description

LLVM's Fortran frontend

Added to portage

2026-04-21

flang-rt - 22.1.4
Ebuild name:

llvm-runtimes/flang-rt-22.1.4

Description

LLVM's Fortran runtime

Added to portage

2026-04-21

git - 2.54.0
Ebuild name:

dev-vcs/git-2.54.0

Description

Stupid content tracker distributed VCS designed for speed and efficiency

Added to portage

2026-04-21

htmlcxx - 0.87-r1
Ebuild name:

dev-cpp/htmlcxx-0.87-r1

Description

A simple non-validating CSS 1 and HTML parser for C++

Added to portage

2026-04-21

jupyter-events - 0.12.1
Ebuild name:

dev-python/jupyter-events-0.12.1

Description

Jupyter Event System library

Added to portage

2026-04-21

libclc - 22.1.4
Ebuild name:

llvm-core/libclc-22.1.4

Description

OpenCL C library

Added to portage

2026-04-21

libcxx - 22.1.4
Ebuild name:

llvm-runtimes/libcxx-22.1.4

Description

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

Added to portage

2026-04-21

libcxxabi - 22.1.4
Ebuild name:

llvm-runtimes/libcxxabi-22.1.4

Description

Low level support for a standard C++ library

Added to portage

2026-04-21

libdbusmenu-lxqt - 0.4.0
Ebuild name:

dev-libs/libdbusmenu-lxqt-0.4.0

Description

LXQt DBusMenu Implementation

Added to portage

2026-04-21

libfm-qt - 2.4.0
Ebuild name:

x11-libs/libfm-qt-2.4.0

Description

Qt Library for Building File Managers

Added to portage

2026-04-21

libgcc - 22.1.4
Ebuild name:

llvm-runtimes/libgcc-22.1.4

Description

Compiler runtime library for clang, compatible with libgcc_s

Added to portage

2026-04-21

liblouis - 3.37.0-r1
Ebuild name:

dev-libs/liblouis-3.37.0-r1

Description

An open-source braille translator and back-translator

Added to portage

2026-04-21

liblxqt - 2.4.0
Ebuild name:

lxqt-base/liblxqt-2.4.0

Description

Common base library for the LXQt desktop environment

Added to portage

2026-04-21

libqtxdg - 4.4.0
Ebuild name:

dev-libs/libqtxdg-4.4.0

Description

Qt Implementation of XDG Standards

Added to portage

2026-04-21

libquo - 1.4
Ebuild name:

sys-cluster/libquo-1.4

Description

Run-time tuning of process binding policies made easy

Added to portage

2026-04-21

libunwind - 22.1.4
Ebuild name:

llvm-runtimes/libunwind-22.1.4

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-04-21

lit - 22.1.4
Ebuild name:

dev-python/lit-22.1.4

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-04-21

lld - 22.1.4
Ebuild name:

llvm-core/lld-22.1.4

Description

The LLVM linker (link editor)

Added to portage

2026-04-21

lldb - 22.1.4
Ebuild name:

llvm-core/lldb-22.1.4

Description

The LLVM debugger

Added to portage

2026-04-21

llvm - 22.1.4
Ebuild name:

dev-ml/llvm-22.1.4

Description

OCaml bindings for LLVM

Added to portage

2026-04-21

llvm - 22.1.4
Ebuild name:

llvm-core/llvm-22.1.4

Description

Low Level Virtual Machine

Added to portage

2026-04-21

llvm-common - 22.1.4
Ebuild name:

llvm-core/llvm-common-22.1.4

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-04-21

lximage-qt - 2.4.0
Ebuild name:

media-gfx/lximage-qt-2.4.0

Description

Qt Image Viewer

Added to portage

2026-04-21

lxqt-about - 2.4.0
Ebuild name:

lxqt-base/lxqt-about-2.4.0

Description

LXQt about dialog

Added to portage

2026-04-21

lxqt-admin - 2.4.0
Ebuild name:

lxqt-base/lxqt-admin-2.4.0

Description

LXQt system administration tool

Added to portage

2026-04-21

lxqt-archiver - 1.4.0
Ebuild name:

app-arch/lxqt-archiver-1.4.0

Description

Qt GUI File Archiver

Added to portage

2026-04-21

lxqt-build-tools - 2.4.0
Ebuild name:

dev-util/lxqt-build-tools-2.4.0

Description

LXQt Build Tools

Added to portage

2026-04-21

lxqt-config - 2.4.0
Ebuild name:

lxqt-base/lxqt-config-2.4.0

Description

LXQt system configuration control center

Added to portage

2026-04-21

lxqt-globalkeys - 2.4.0
Ebuild name:

lxqt-base/lxqt-globalkeys-2.4.0

Description

Daemon and library for global keyboard shortcuts registration

Added to portage

2026-04-21

lxqt-menu-data - 2.4.0
Ebuild name:

lxqt-base/lxqt-menu-data-2.4.0

Description

LXQt Menu Files and Translations for Menu Categories

Added to portage

2026-04-21

lxqt-meta - 2.4.0
Ebuild name:

lxqt-base/lxqt-meta-2.4.0

Description

Meta ebuild for LXQt, the Lightweight Desktop Environment

Added to portage

2026-04-21

lxqt-notificationd - 2.4.0
Ebuild name:

lxqt-base/lxqt-notificationd-2.4.0

Description

LXQt notification daemon and library

Added to portage

2026-04-21

lxqt-openssh-askpass - 2.4.0
Ebuild name:

lxqt-base/lxqt-openssh-askpass-2.4.0

Description

LXQt OpenSSH user password prompt tool

Added to portage

2026-04-21

lxqt-panel - 2.4.0
Ebuild name:

lxqt-base/lxqt-panel-2.4.0

Description

LXQt desktop panel and plugins

Added to portage

2026-04-21

lxqt-policykit - 2.4.0
Ebuild name:

lxqt-base/lxqt-policykit-2.4.0

Description

LXQt PolKit authentication agent

Added to portage

2026-04-21

lxqt-powermanagement - 2.4.0
Ebuild name:

lxqt-base/lxqt-powermanagement-2.4.0

Description

LXQt daemon for power management and auto-suspend

Added to portage

2026-04-21

lxqt-qtplugin - 2.4.0
Ebuild name:

lxqt-base/lxqt-qtplugin-2.4.0

Description

LXQt system integration plugin for Qt

Added to portage

2026-04-21

lxqt-runner - 2.4.0
Ebuild name:

lxqt-base/lxqt-runner-2.4.0

Description

LXQt quick launcher

Added to portage

2026-04-21

lxqt-session - 2.4.0
Ebuild name:

lxqt-base/lxqt-session-2.4.0

Description

LXQt Session Manager

Added to portage

2026-04-21

lxqt-sudo - 2.4.0
Ebuild name:

lxqt-base/lxqt-sudo-2.4.0

Description

LXQt GUI frontend for sudo

Added to portage

2026-04-21

lxqt-themes - 2.4.0
Ebuild name:

x11-themes/lxqt-themes-2.4.0

Description

LXQt Themes

Added to portage

2026-04-21

lxqt-wayland-session - 0.4.0
Ebuild name:

lxqt-base/lxqt-wayland-session-0.4.0

Description

LXQt Wayland Session Support

Added to portage

2026-04-21

meson - 1.11.1
Ebuild name:

dev-build/meson-1.11.1

Description

Open source build system

Added to portage

2026-04-21

mlir - 22.1.4
Ebuild name:

llvm-core/mlir-22.1.4

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-04-21

narwhals - 2.20.0
Ebuild name:

dev-python/narwhals-2.20.0

Description

Extremely lightweight compatibility layer between dataframe libraries

Added to portage

2026-04-21

nxml-libvirt-schemas - 12.0.0
Ebuild name:

app-emacs/nxml-libvirt-schemas-12.0.0

Description

Extension for nxml-mode with libvirt schemas

Added to portage

2026-04-21

offload - 22.1.4
Ebuild name:

llvm-runtimes/offload-22.1.4

Description

OpenMP offloading support

Added to portage

2026-04-21

openhab-bin - 5.1.4
Ebuild name:

app-misc/openhab-bin-5.1.4

Description

An open-source automation software for your home

Added to portage

2026-04-21

openmp - 22.1.4
Ebuild name:

llvm-runtimes/openmp-22.1.4

Description

OpenMP runtime library for LLVM/clang compiler

Added to portage

2026-04-21

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

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

Description

OpenMP target library for amdgcn devices

Added to portage

2026-04-21

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

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

Description

OpenMP target library for nvptx64 devices

Added to portage

2026-04-21

oslotest - 6.1.1
Ebuild name:

dev-python/oslotest-6.1.1

Description

Oslo test framework

Added to portage

2026-04-21

pavucontrol-qt - 2.4.0
Ebuild name:

media-sound/pavucontrol-qt-2.4.0

Description

Qt GUI Pulseaudio Mixer

Added to portage

2026-04-21

pcmanfm-qt - 2.4.0
Ebuild name:

x11-misc/pcmanfm-qt-2.4.0

Description

Qt GUI Tabbed Filemanager

Added to portage

2026-04-21

pdm - 2.26.8
Ebuild name:

dev-python/pdm-2.26.8

Description

Python package and dependency manager supporting the latest PEP standards

Added to portage

2026-04-21

pelican - 4.12.0
Ebuild name:

app-text/pelican-4.12.0

Description

A tool to generate a static blog, with restructured text or markdown input

Added to portage

2026-04-21

pixi - 0.67.1
Ebuild name:

dev-util/pixi-0.67.1

Description

A package management and workflow tool

Added to portage

2026-04-21

polly - 22.1.4
Ebuild name:

llvm-core/polly-22.1.4

Description

Polyhedral optimizations for LLVM

Added to portage

2026-04-21

psycopg - 2.9.12
Ebuild name:

dev-python/psycopg-2.9.12

Description

PostgreSQL database adapter for Python

Added to portage

2026-04-21

pydantic - 2.13.3
Ebuild name:

dev-python/pydantic-2.13.3

Description

Data parsing and validation using Python type hints

Added to portage

2026-04-21

pydantic-settings - 2.14.0
Ebuild name:

dev-python/pydantic-settings-2.14.0

Description

Settings management using Pydantic

Added to portage

2026-04-21

pymongo - 4.17.0
Ebuild name:

dev-python/pymongo-4.17.0

Description

Python driver for MongoDB

Added to portage

2026-04-21

qps - 2.13.0
Ebuild name:

x11-misc/qps-2.13.0

Description

Qt GUI Process Manager

Added to portage

2026-04-21

qterminal - 2.4.0
Ebuild name:

x11-terms/qterminal-2.4.0

Description

Qt-based multitab terminal emulator

Added to portage

2026-04-21

qtermwidget - 2.4.0
Ebuild name:

x11-libs/qtermwidget-2.4.0

Description

Qt terminal emulator widget

Added to portage

2026-04-21

qtxdg-tools - 4.4.0
Ebuild name:

app-misc/qtxdg-tools-4.4.0

Description

User Tools from libqtxdg

Added to portage

2026-04-21

radarr-bin - 6.2.0.10390
Ebuild name:

www-apps/radarr-bin-6.2.0.10390

Description

A fork of Sonarr to work with movies a la Couchpotato

Added to portage

2026-04-21

rpi-eeprom - 28.15_p1
Ebuild name:

dev-embedded/rpi-eeprom-28.15_p1

Description

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

Added to portage

2026-04-21

rutorrent - 5.3.0
Ebuild name:

www-apps/rutorrent-5.3.0

Description

ruTorrent is a front-end for the popular Bittorrent client rTorrent

Added to portage

2026-04-21

screengrab - 3.2.0
Ebuild name:

x11-misc/screengrab-3.2.0

Description

Qt GUI Screenshot Utility

Added to portage

2026-04-21

sed - 4.9_p20260420
Ebuild name:

sys-apps/sed-4.9_p20260420

Description

Super-useful stream editor

Added to portage

2026-04-21

spectre-meltdown-checker - 26.33.0420460
Ebuild name:

app-admin/spectre-meltdown-checker-26.33.0420460

Description

Spectre & Meltdown vulnerability/mitigation checke

Added to portage

2026-04-21

sqlglot - 30.6.0
Ebuild name:

dev-python/sqlglot-30.6.0

Description

An easily customizable SQL parser and transpiler

Added to portage

2026-04-21

uutils-coreutils - 0.8.0
Ebuild name:

sys-apps/uutils-coreutils-0.8.0

Description

GNU coreutils rewritten in Rust

Added to portage

2026-04-21

valgrind - 3.27.0
Ebuild name:

dev-debug/valgrind-3.27.0

Description

An open-source memory debugger for GNU/Linux

Added to portage

2026-04-21

xdg-desktop-portal-lxqt - 1.4.0
Ebuild name:

gui-libs/xdg-desktop-portal-lxqt-1.4.0

Description

Backend implementation for xdg-desktop-portal using Qt/KF5/l

Added to portage

2026-04-21

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