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:

88977

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-10-07
ceph - 20.2.4-r2
Ebuild name:

sys-cluster/ceph-20.2.4-r2

Description

Ceph distributed filesystem

Added to portage

2026-10-07

clang - 23.1.3
Ebuild name:

dev-python/clang-23.1.3

Description

Python bindings for llvm-core/clang

Added to portage

2026-10-07

clang - 23.1.3
Ebuild name:

llvm-core/clang-23.1.3

Description

C language family frontend for LLVM

Added to portage

2026-10-07

clang-common - 23.1.3
Ebuild name:

llvm-core/clang-common-23.1.3

Description

Common files shared between multiple slots of clang

Added to portage

2026-10-07

compiler-rt - 23.1.3
Ebuild name:

llvm-runtimes/compiler-rt-23.1.3

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-10-07

compiler-rt-sanitizers - 23.1.3
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-23.1.3

Description

Compiler runtime libraries for clang (sanitizers &

Added to portage

2026-10-07

django - 5.2.18
Ebuild name:

dev-python/django-5.2.18

Description

High-level Python web framework

Added to portage

2026-10-07

django - 6.0.9
Ebuild name:

dev-python/django-6.0.9

Description

High-level Python web framework

Added to portage

2026-10-07

django - 6.1.2
Ebuild name:

dev-python/django-6.1.2

Description

High-level Python web framework

Added to portage

2026-10-07

ezgb - 0.2.1
Ebuild name:

dev-python/ezgb-0.2.1

Description

A standalone Python library for working with git-bug repositories

Added to portage

2026-10-07

flang - 23.1.3
Ebuild name:

llvm-core/flang-23.1.3

Description

LLVM's Fortran frontend

Added to portage

2026-10-07

flang-rt - 23.1.3
Ebuild name:

llvm-runtimes/flang-rt-23.1.3

Description

LLVM's Fortran runtime

Added to portage

2026-10-07

glycin-loaders - 2.2.2
Ebuild name:

media-libs/glycin-loaders-2.2.2

Description

Loaders for glycin clients (glycin crate or libglycin)

Added to portage

2026-10-07

ipset - 7.24-r1
Ebuild name:

net-firewall/ipset-7.24-r1

Description

IPset tool for iptables, successor to ippool

Added to portage

2026-10-07

jsonpath-ng - 1.9.1
Ebuild name:

dev-python/jsonpath-ng-1.9.1

Description

Python JSONPath Next-Generation

Added to portage

2026-10-07

koleo-cli - 0.2.137.40
Ebuild name:

app-misc/koleo-cli-0.2.137.40

Description

A simple CLI for koleo.pl railway planner

Added to portage

2026-10-07

libclc - 23.1.3
Ebuild name:

llvm-runtimes/libclc-23.1.3

Description

OpenCL C library

Added to portage

2026-10-07

libcxx - 23.1.3
Ebuild name:

llvm-runtimes/libcxx-23.1.3

Description

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

Added to portage

2026-10-07

libcxxabi - 23.1.3
Ebuild name:

llvm-runtimes/libcxxabi-23.1.3

Description

Low level support for a standard C++ library

Added to portage

2026-10-07

libgcc - 23.1.3
Ebuild name:

llvm-runtimes/libgcc-23.1.3

Description

Compiler runtime library for clang, compatible with libgcc_s

Added to portage

2026-10-07

libunwind - 23.1.3-r1
Ebuild name:

llvm-runtimes/libunwind-23.1.3-r1

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-10-07

lit - 23.1.3
Ebuild name:

dev-python/lit-23.1.3

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-10-07

lld - 23.1.3
Ebuild name:

llvm-core/lld-23.1.3

Description

The LLVM linker (link editor)

Added to portage

2026-10-07

lldb - 23.1.3
Ebuild name:

llvm-core/lldb-23.1.3

Description

The LLVM debugger

Added to portage

2026-10-07

llvm - 23.1.3
Ebuild name:

dev-ml/llvm-23.1.3

Description

OCaml bindings for LLVM

Added to portage

2026-10-07

llvm - 23.1.3
Ebuild name:

llvm-core/llvm-23.1.3

Description

Low Level Virtual Machine

Added to portage

2026-10-07

llvm-common - 23.1.3
Ebuild name:

llvm-core/llvm-common-23.1.3

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-10-07

mirrorselect - 2.8.1
Ebuild name:

app-portage/mirrorselect-2.8.1

Description

Tool to help select distfiles mirrors for Gentoo

Added to portage

2026-10-07

mlir - 23.1.3
Ebuild name:

llvm-core/mlir-23.1.3

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-10-07

munkres - 2.0.0
Ebuild name:

dev-python/munkres-2.0.0

Description

Module implementing munkres algorithm for the Assignment Problem

Added to portage

2026-10-07

openmp - 23.1.3
Ebuild name:

llvm-runtimes/openmp-23.1.3

Description

OpenMP runtime libraries for LLVM/clang compiler

Added to portage

2026-10-07

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

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

Description

OpenMP target library for amdgcn devices

Added to portage

2026-10-07

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

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

Description

OpenMP target library for nvptx64 devices

Added to portage

2026-10-07

openmp-spirv64-intel - 23.1.3
Ebuild name:

llvm-runtimes/openmp-spirv64-intel-23.1.3

Description

OpenMP target library for spirv64 Intel devices

Added to portage

2026-10-07

polars - 2.0.0
Ebuild name:

dev-python/polars-2.0.0

Description

Extremely fast Query Engine for DataFrames, written in Rust

Added to portage

2026-10-07

polly - 23.1.3
Ebuild name:

llvm-core/polly-23.1.3

Description

Polyhedral optimizations for LLVM

Added to portage

2026-10-07

pyspnego - 0.12.4
Ebuild name:

dev-python/pyspnego-0.12.4

Description

Library to handle SPNEGO and CredSSP authentication

Added to portage

2026-10-07

sphinx-autodoc-typehints - 3.13.9
Ebuild name:

dev-python/sphinx-autodoc-typehints-3.13.9

Description

Type hints support for the Sphinx autodoc extension

Added to portage

2026-10-07

thin-provisioning-tools - 1.3.4
Ebuild name:

sys-block/thin-provisioning-tools-1.3.4

Description

A suite of tools for thin provisioning on Linux

Added to portage

2026-10-07

tibs - 2.0.2
Ebuild name:

dev-python/tibs-2.0.2

Description

A sleek Python library for your binary data

Added to portage

2026-10-07

typer - 0.27.3
Ebuild name:

dev-python/typer-0.27.3

Description

Build great CLIs. Easy to code. Based on Python type hints

Added to portage

2026-10-07

types-setuptools - 84.0.0.20261006
Ebuild name:

dev-python/types-setuptools-84.0.0.20261006

Description

Typing stubs for setuptools

Added to portage

2026-10-07

wordpress - 6.4.13
Ebuild name:

www-apps/wordpress-6.4.13

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

wordpress - 6.5.13
Ebuild name:

www-apps/wordpress-6.5.13

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

wordpress - 6.6.10
Ebuild name:

www-apps/wordpress-6.6.10

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

wordpress - 6.7.10
Ebuild name:

www-apps/wordpress-6.7.10

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

wordpress - 6.8.11
Ebuild name:

www-apps/wordpress-6.8.11

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

wordpress - 6.9.10
Ebuild name:

www-apps/wordpress-6.9.10

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

wordpress - 7.0.7
Ebuild name:

www-apps/wordpress-7.0.7

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2026-10-07

yle-dl - 20261002
Ebuild name:

media-video/yle-dl-20261002

Description

Download media files from Yle Areena

Added to portage

2026-10-07

2026-10-06
aiohttp - 3.14.4
Ebuild name:

dev-python/aiohttp-3.14.4

Description

HTTP client/server for asyncio

Added to portage

2026-10-06

amqp - 5.4.1
Ebuild name:

dev-python/amqp-5.4.1

Description

Low-level AMQP client for Python (fork of amqplib)

Added to portage

2026-10-06

aws-c-s3 - 1.3.1
Ebuild name:

dev-libs/aws-c-s3-1.3.1

Description

AWS C S3 async library

Added to portage

2026-10-06

borgmatic - 2.1.10
Ebuild name:

app-backup/borgmatic-2.1.10

Description

Automatically create, prune and verify backups with borgbackup

Added to portage

2026-10-06

cachetools - 7.2.1
Ebuild name:

dev-python/cachetools-7.2.1

Description

Extensible memoizing collections and decorators

Added to portage

2026-10-06

cloudflare - 5.9.0
Ebuild name:

dev-python/cloudflare-5.9.0

Description

The official Python library for the Cloudflare API

Added to portage

2026-10-06

conky - 1.25.3
Ebuild name:

app-admin/conky-1.25.3

Description

An advanced, highly configurable system monitor for X

Added to portage

2026-10-06

dkms - 3.4.4
Ebuild name:

sys-kernel/dkms-3.4.4

Description

Dynamic Kernel Module Support

Added to portage

2026-10-06

faker - 40.41.0
Ebuild name:

dev-python/faker-40.41.0

Description

A Python package that generates fake data for you

Added to portage

2026-10-06

filelock - 4.0.12
Ebuild name:

dev-python/filelock-4.0.12

Description

A platform independent file lock for Python

Added to portage

2026-10-06

ggml - 0.26.0
Ebuild name:

sci-ml/ggml-0.26.0

Description

Tensor library for machine learning

Added to portage

2026-10-06

git-bug - 0.11.0
Ebuild name:

dev-util/git-bug-0.11.0

Description

Distributed, offline-first bug tracker embedded in git

Added to portage

2026-10-06

git-credential-manager - 3.0.1
Ebuild name:

dev-vcs/git-credential-manager-3.0.1

Description

Secure Git credential storage supporing GitHub, Azure Repos, a

Added to portage

2026-10-06

google-api-core - 2.41.0
Ebuild name:

dev-python/google-api-core-2.41.0

Description

Core Library for Google Client Libraries

Added to portage

2026-10-06

google-auth - 2.60.0
Ebuild name:

dev-python/google-auth-2.60.0

Description

Google Authentication Library

Added to portage

2026-10-06

gromacs - 2025.5
Ebuild name:

sci-chemistry/gromacs-2025.5

Description

The ultimate molecular dynamics simulation package

Added to portage

2026-10-06

gromacs - 2026.4
Ebuild name:

sci-chemistry/gromacs-2026.4

Description

The ultimate molecular dynamics simulation package

Added to portage

2026-10-06

gst-plugin-gtk4 - 0.13.4-r1
Ebuild name:

media-plugins/gst-plugin-gtk4-0.13.4-r1

Description

GStreamer GTK 4 sink element

Added to portage

2026-10-06

hcloud - 2.27.0
Ebuild name:

dev-python/hcloud-2.27.0

Description

Official Hetzner Cloud python library

Added to portage

2026-10-06

httpx-aiohttp - 0.2.0
Ebuild name:

dev-python/httpx-aiohttp-0.2.0

Description

Aiohttp transport for HTTPX

Added to portage

2026-10-06

hypothesis - 6.168.4
Ebuild name:

dev-python/hypothesis-6.168.4

Description

A library for property based testing

Added to portage

2026-10-06

hypothesis - 6.168.5
Ebuild name:

dev-python/hypothesis-6.168.5

Description

A library for property based testing

Added to portage

2026-10-06

ig - 0.57.0
Ebuild name:

app-admin/ig-0.57.0

Description

Tools and framework for data collection and system inspection using eBPF

Added to portage

2026-10-06

intune-portal - 1.2609.5
Ebuild name:

sys-apps/intune-portal-1.2609.5

Description

Microsoft Intune Company Portal to access a corporate environment

Added to portage

2026-10-06

jellyfin-bin - 12.2
Ebuild name:

www-apps/jellyfin-bin-12.2

Description

Jellyfin puts you in control of managing and streaming your media

Added to portage

2026-10-06

jitterentropy-rngd - 1.2.8
Ebuild name:

app-crypt/jitterentropy-rngd-1.2.8

Description

Jitter RNG daemon

Added to portage

2026-10-06

johntheripper - 1.8.0-r2
Ebuild name:

app-crypt/johntheripper-1.8.0-r2

Description

fast password cracker

Added to portage

2026-10-06

jsonpath-ng - 1.9.0
Ebuild name:

dev-python/jsonpath-ng-1.9.0

Description

Python JSONPath Next-Generation

Added to portage

2026-10-06

libcap-ng - 0.9.6
Ebuild name:

sys-libs/libcap-ng-0.9.6

Description

POSIX 1003.1e capabilities

Added to portage

2026-10-06

libfabric - 2.3.1-r1
Ebuild name:

sys-block/libfabric-2.3.1-r1

Description

The Open Fabrics Interfaces (OFI) framework

Added to portage

2026-10-06

mariadb-connector-odbc - 3.1.24
Ebuild name:

dev-db/mariadb-connector-odbc-3.1.24

Description

MariaDB Connector/ODBC

Added to portage

2026-10-06

mariadb-connector-odbc - 3.2.10
Ebuild name:

dev-db/mariadb-connector-odbc-3.2.10

Description

MariaDB Connector/ODBC

Added to portage

2026-10-06

mumps - 5.3.5-r2
Ebuild name:

sci-libs/mumps-5.3.5-r2

Description

MUltifrontal Massively Parallel sparse direct matrix Solver

Added to portage

2026-10-06

nodejs - 26.10.0-r3
Ebuild name:

net-libs/nodejs-26.10.0-r3

Description

A JavaScript runtime built on Chrome's V8 JavaScript engine

Added to portage

2026-10-06

notebook - 7.5.8
Ebuild name:

dev-python/notebook-7.5.8

Description

Jupyter Interactive Notebook

Added to portage

2026-10-06

portage - 3.0.82.2-r1
Ebuild name:

sys-apps/portage-3.0.82.2-r1

Description

The package management and distribution system for Gentoo

Added to portage

2026-10-06

prismlauncher - 11.1.1
Ebuild name:

games-action/prismlauncher-11.1.1

Description

Custom, open source Minecraft launcher

Added to portage

2026-10-06

protontricks - 1.15.0
Ebuild name:

app-emulation/protontricks-1.15.0

Description

app-emulation/winetricks wrapper for Proton (Steam Play) games

Added to portage

2026-10-06

pycares - 5.1.0
Ebuild name:

dev-python/pycares-5.1.0

Description

Python interface for c-ares

Added to portage

2026-10-06

pytest-httpserver - 1.2.0
Ebuild name:

dev-python/pytest-httpserver-1.2.0

Description

HTTP server for pytest to test HTTP clients

Added to portage

2026-10-06

sphinxcontrib-httpdomain - 2.1.0
Ebuild name:

dev-python/sphinxcontrib-httpdomain-2.1.0

Description

Sphinx domain for documenting HTTP APIs

Added to portage

2026-10-06

svglib - 2.3.0
Ebuild name:

dev-python/svglib-2.3.0

Description

Pure-Python library for reading and converting SVG

Added to portage

2026-10-06

tox - 4.64.9
Ebuild name:

dev-python/tox-4.64.9

Description

virtualenv-based automation of test activities

Added to portage

2026-10-06

urwid - 4.2.5
Ebuild name:

dev-python/urwid-4.2.5

Description

Curses-based user interface library for Python

Added to portage

2026-10-06

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