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:

82264

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
2025-12-01
amdsmi - 7.1.0
Ebuild name:

dev-util/amdsmi-7.1.0

Description

AMD System Management Interface for managing and monitoring GPUs

Added to portage

2025-12-01

apispec - 6.9.0
Ebuild name:

dev-python/apispec-6.9.0

Description

A pluggable API specification generator

Added to portage

2025-12-01

asterisk - 20.17.0
Ebuild name:

net-misc/asterisk-20.17.0

Description

Asterisk A Modular Open Source PBX System

Added to portage

2025-12-01

asterisk - 21.12.0
Ebuild name:

net-misc/asterisk-21.12.0

Description

Asterisk A Modular Open Source PBX System

Added to portage

2025-12-01

asterisk - 22.7.0
Ebuild name:

net-misc/asterisk-22.7.0

Description

Asterisk A Modular Open Source PBX System

Added to portage

2025-12-01

aws-sam-translator - 1.104.0
Ebuild name:

dev-python/aws-sam-translator-1.104.0

Description

A library that transform SAM templates into AWS CloudFormatio

Added to portage

2025-12-01

beautifulsoup4 - 4.14.3
Ebuild name:

dev-python/beautifulsoup4-4.14.3

Description

Pythonic idioms for iterating, searching, and modifying an HTML/XM

Added to portage

2025-12-01

beniget - 0.5.0
Ebuild name:

dev-python/beniget-0.5.0

Description

Extract semantic information about static Python code

Added to portage

2025-12-01

buffer - 1.19-r5
Ebuild name:

sys-block/buffer-1.19-r5

Description

A tapedrive tool for speeding up reading from and writing to tape

Added to portage

2025-12-01

cfn-lint - 1.42.0
Ebuild name:

dev-python/cfn-lint-1.42.0

Description

CloudFormation Linter

Added to portage

2025-12-01

cinnamon-screensaver - 6.4.0-r2
Ebuild name:

gnome-extra/cinnamon-screensaver-6.4.0-r2

Description

Screensaver for Cinnamon

Added to portage

2025-12-01

cinnamon-screensaver - 6.4.1-r1
Ebuild name:

gnome-extra/cinnamon-screensaver-6.4.1-r1

Description

Screensaver for Cinnamon

Added to portage

2025-12-01

coverage - 7.12.1_beta1
Ebuild name:

dev-python/coverage-7.12.1_beta1

Description

Code coverage measurement for Python

Added to portage

2025-12-01

cryptodev - 1.14
Ebuild name:

sys-kernel/cryptodev-1.14

Description

device that allows access to Linux kernel cryptographic drivers

Added to portage

2025-12-01

cython - 3.2.2
Ebuild name:

dev-python/cython-3.2.2

Description

A Python to C compiler

Added to portage

2025-12-01

gcc - 16.0.0_p20251130
Ebuild name:

sys-devel/gcc-16.0.0_p20251130

Description

The GNU Compiler Collection

Added to portage

2025-12-01

genshi - 0.7.10
Ebuild name:

dev-python/genshi-0.7.10

Description

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

Added to portage

2025-12-01

gpa - 0.11.0-r2
Ebuild name:

app-crypt/gpa-0.11.0-r2

Description

GNU Privacy Assistant (GPA) a graphical user interface for GnuPG

Added to portage

2025-12-01

grass - 8.4.1-r2
Ebuild name:

sci-geosciences/grass-8.4.1-r2

Description

Free GIS with raster and vector functionality, as well as 3D vizuali

Added to portage

2025-12-01

ig - 0.47.0
Ebuild name:

app-admin/ig-0.47.0

Description

Tools and framework for data collection and system inspection using eBPF

Added to portage

2025-12-01

inspectrum - 0.3.1_p20251130
Ebuild name:

net-wireless/inspectrum-0.3.1_p20251130

Description

Tool for analysing captured signals from software-defined r

Added to portage

2025-12-01

irqbalance - 1.9.4-r3
Ebuild name:

sys-apps/irqbalance-1.9.4-r3

Description

Distribute hardware interrupts across processors on a multiprocessor s

Added to portage

2025-12-01

jellyfin-bin - 10.11.4
Ebuild name:

www-apps/jellyfin-bin-10.11.4

Description

Jellyfin puts you in control of managing and streaming your media

Added to portage

2025-12-01

libtmux - 0.50.0
Ebuild name:

dev-python/libtmux-0.50.0

Description

Typed library that provides an ORM wrapper for tmux, a terminal multiplex

Added to portage

2025-12-01

libvirt - 11.9.0
Ebuild name:

app-emulation/libvirt-11.9.0

Description

C toolkit to manipulate virtual machines

Added to portage

2025-12-01

libvirt-python - 11.9.0
Ebuild name:

dev-python/libvirt-python-11.9.0

Description

libvirt Python bindings

Added to portage

2025-12-01

libxslt - 1.1.45
Ebuild name:

dev-libs/libxslt-1.1.45

Description

XSLT libraries and tools

Added to portage

2025-12-01

limine - 10.4.0
Ebuild name:

sys-boot/limine-10.4.0

Description

Limine is a modern, advanced, and portable BIOS/UEFI multiprotocol bootloade

Added to portage

2025-12-01

meson - 1.10.0_rc1
Ebuild name:

dev-build/meson-1.10.0_rc1

Description

Open source build system

Added to portage

2025-12-01

moto - 5.1.18
Ebuild name:

dev-python/moto-5.1.18

Description

Mock library for boto

Added to portage

2025-12-01

mtx - 1.3.12-r1
Ebuild name:

sys-block/mtx-1.3.12-r1

Description

Utilities for controlling SCSI media changers and tape drives

Added to portage

2025-12-01

planner - 3.42-r1
Ebuild name:

app-emacs/planner-3.42-r1

Description

Maintain a local Wiki using Emacs-friendly markup

Added to portage

2025-12-01

plz - 0.7.2
Ebuild name:

app-emacs/plz-0.7.2

Description

HTTP library with curl backend for GNU Emacs

Added to portage

2025-12-01

postfix - 3.11_pre20251130
Ebuild name:

mail-mta/postfix-3.11_pre20251130

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2025-12-01

pygraphviz - 1.14-r1
Ebuild name:

dev-python/pygraphviz-1.14-r1

Description

Python wrapper for the Graphviz Agraph data structure

Added to portage

2025-12-01

pygraphviz - 1.14-r2
Ebuild name:

dev-python/pygraphviz-1.14-r2

Description

Python wrapper for the Graphviz Agraph data structure

Added to portage

2025-12-01

pylint - 4.0.4
Ebuild name:

dev-python/pylint-4.0.4

Description

Python code static checker

Added to portage

2025-12-01

pythontex - 0.18_p20251112
Ebuild name:

dev-tex/pythontex-0.18_p20251112

Description

Fast Access to Python from within LaTeX

Added to portage

2025-12-01

radicale - 3.5.9
Ebuild name:

www-apps/radicale-3.5.9

Description

A simple CalDAV calendar server

Added to portage

2025-12-01

remind - 06.02.01
Ebuild name:

app-misc/remind-06.02.01

Description

Ridiculously functional reminder program

Added to portage

2025-12-01

rpds-py - 0.30.0
Ebuild name:

dev-python/rpds-py-0.30.0

Description

Python bindings to Rust's persistent data structures (rpds)

Added to portage

2025-12-01

sbcl - 2.5.11
Ebuild name:

dev-lisp/sbcl-2.5.11

Description

Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp

Added to portage

2025-12-01

socklog - 2.1.2
Ebuild name:

app-admin/socklog-2.1.2

Description

Small secure replacement for syslogd with automatic log rotation

Added to portage

2025-12-01

sphinx - 9.0.0
Ebuild name:

dev-python/sphinx-9.0.0

Description

Python documentation generator

Added to portage

2025-12-01

supercollider - 3.14.1
Ebuild name:

media-sound/supercollider-3.14.1

Description

Environment and programming language for real time audio synthesis

Added to portage

2025-12-01

wild - 0.7.0
Ebuild name:

sys-devel/wild-0.7.0

Description

A very fast linker for Linux

Added to portage

2025-12-01

wild - 0.7.0-r1
Ebuild name:

sys-devel/wild-0.7.0-r1

Description

A very fast linker for Linux

Added to portage

2025-12-01

wild - 9999
Ebuild name:

sys-devel/wild-9999

Description

A very fast linker for Linux

Added to portage

2025-12-01

xdotool - 4.20251130.1
Ebuild name:

x11-misc/xdotool-4.20251130.1

Description

Simulate keyboard input and mouse activity, move and resize windows

Added to portage

2025-12-01

zerotier - 1.16.0-r2
Ebuild name:

net-misc/zerotier-1.16.0-r2

Description

A software-based managed Ethernet switch for planet Earth

Added to portage

2025-12-01

2025-11-30
abiword - 3.0.7
Ebuild name:

app-office/abiword-3.0.7

Description

Fully featured yet light and fast cross platform word processor

Added to portage

2025-11-30

b2 - 5.3.3
Ebuild name:

dev-build/b2-5.3.3

Description

A system for large project software construction, simple to use and powerful

Added to portage

2025-11-30

beartype - 0.22.7
Ebuild name:

dev-python/beartype-0.22.7

Description

Unbearably fast runtime type checking in pure Python

Added to portage

2025-11-30

catch - 3.11.0
Ebuild name:

dev-cpp/catch-3.11.0

Description

Modern C++ header-only framework for unit-tests

Added to portage

2025-11-30

cpik - 0.7.4_p4-r1
Ebuild name:

dev-embedded/cpik-0.7.4_p4-r1

Description

C compiler for PIC18 devices

Added to portage

2025-11-30

dino - 0.5.1
Ebuild name:

net-im/dino-0.5.1

Description

Modern Jabber/XMPP Client using GTK+/Vala

Added to portage

2025-11-30

dos2unix - 7.5.3
Ebuild name:

app-text/dos2unix-7.5.3

Description

Convert DOS or MAC text files to UNIX format or vice versa

Added to portage

2025-11-30

evolution - 3.58.2
Ebuild name:

mail-client/evolution-3.58.2

Description

Integrated mail, addressbook and calendaring functionality

Added to portage

2025-11-30

evolution-data-server - 3.58.2
Ebuild name:

gnome-extra/evolution-data-server-3.58.2

Description

Evolution groupware backend

Added to portage

2025-11-30

evolution-ews - 3.56.2-r1
Ebuild name:

gnome-extra/evolution-ews-3.56.2-r1

Description

Evolution module for connecting to Microsoft Exchange Web Servi

Added to portage

2025-11-30

evolution-ews - 3.58.2
Ebuild name:

gnome-extra/evolution-ews-3.58.2

Description

Evolution module for connecting to Microsoft Exchange Web Services

Added to portage

2025-11-30

fzy - 1.1
Ebuild name:

app-text/fzy-1.1

Description

Fuzzy text selector (interactive grep) for console

Added to portage

2025-11-30

gast - 0.7.0
Ebuild name:

dev-python/gast-0.7.0

Description

A generic AST to represent Python2 and Python3's Abstract Syntax Tree (AST)

Added to portage

2025-11-30

gcc - 15.2.1_p20251129
Ebuild name:

sys-devel/gcc-15.2.1_p20251129

Description

The GNU Compiler Collection

Added to portage

2025-11-30

gnome-user-share - 48.2
Ebuild name:

gnome-extra/gnome-user-share-48.2

Description

Personal file sharing for the GNOME desktop

Added to portage

2025-11-30

graphviz - 14.0.5-r1
Ebuild name:

media-gfx/graphviz-14.0.5-r1

Description

Open Source Graph Visualization Software

Added to portage

2025-11-30

gtk - 4.20.3-r2
Ebuild name:

gui-libs/gtk-4.20.3-r2

Description

GTK is a multi-platform toolkit for creating graphical user interfaces

Added to portage

2025-11-30

jaconv - 0.4.1
Ebuild name:

dev-python/jaconv-0.4.1

Description

Pure-Python Japanese character interconverter

Added to portage

2025-11-30

ktechlab - 0.51.0_p20251122
Ebuild name:

sci-electronics/ktechlab-0.51.0_p20251122

Description

IDE for microcontrollers and electronics

Added to portage

2025-11-30

kube-apiserver - 1.32.10
Ebuild name:

sys-cluster/kube-apiserver-1.32.10

Description

Kubernetes API server

Added to portage

2025-11-30

kube-apiserver - 1.33.6
Ebuild name:

sys-cluster/kube-apiserver-1.33.6

Description

Kubernetes API server

Added to portage

2025-11-30

kube-apiserver - 1.34.2
Ebuild name:

sys-cluster/kube-apiserver-1.34.2

Description

Kubernetes API server

Added to portage

2025-11-30

kube-controller-manager - 1.32.10
Ebuild name:

sys-cluster/kube-controller-manager-1.32.10

Description

Kubernetes Controller Manager

Added to portage

2025-11-30

kube-controller-manager - 1.33.6
Ebuild name:

sys-cluster/kube-controller-manager-1.33.6

Description

Kubernetes Controller Manager

Added to portage

2025-11-30

kube-controller-manager - 1.34.2
Ebuild name:

sys-cluster/kube-controller-manager-1.34.2

Description

Kubernetes Controller Manager

Added to portage

2025-11-30

kube-proxy - 1.32.10
Ebuild name:

sys-cluster/kube-proxy-1.32.10

Description

Kubernetes Proxy service

Added to portage

2025-11-30

kube-proxy - 1.33.6
Ebuild name:

sys-cluster/kube-proxy-1.33.6

Description

Kubernetes Proxy service

Added to portage

2025-11-30

kube-proxy - 1.34.2
Ebuild name:

sys-cluster/kube-proxy-1.34.2

Description

Kubernetes Proxy service

Added to portage

2025-11-30

kube-scheduler - 1.32.10
Ebuild name:

sys-cluster/kube-scheduler-1.32.10

Description

Kubernetes Scheduler

Added to portage

2025-11-30

kube-scheduler - 1.33.6
Ebuild name:

sys-cluster/kube-scheduler-1.33.6

Description

Kubernetes Scheduler

Added to portage

2025-11-30

kube-scheduler - 1.34.2
Ebuild name:

sys-cluster/kube-scheduler-1.34.2

Description

Kubernetes Scheduler

Added to portage

2025-11-30

kubeadm - 1.32.10
Ebuild name:

sys-cluster/kubeadm-1.32.10

Description

CLI to Easily bootstrap a secure Kubernetes cluster

Added to portage

2025-11-30

kubeadm - 1.33.6
Ebuild name:

sys-cluster/kubeadm-1.33.6

Description

CLI to Easily bootstrap a secure Kubernetes cluster

Added to portage

2025-11-30

kubeadm - 1.34.2
Ebuild name:

sys-cluster/kubeadm-1.34.2

Description

CLI to Easily bootstrap a secure Kubernetes cluster

Added to portage

2025-11-30

kubectl - 1.32.10
Ebuild name:

sys-cluster/kubectl-1.32.10

Description

CLI to run commands against Kubernetes clusters

Added to portage

2025-11-30

kubectl - 1.33.6
Ebuild name:

sys-cluster/kubectl-1.33.6

Description

CLI to run commands against Kubernetes clusters

Added to portage

2025-11-30

kubelet - 1.32.10
Ebuild name:

sys-cluster/kubelet-1.32.10

Description

Kubernetes Node Agent

Added to portage

2025-11-30

kubelet - 1.33.6
Ebuild name:

sys-cluster/kubelet-1.33.6

Description

Kubernetes Node Agent

Added to portage

2025-11-30

kubelet - 1.34.2
Ebuild name:

sys-cluster/kubelet-1.34.2

Description

Kubernetes Node Agent

Added to portage

2025-11-30

lego - 4.29.0
Ebuild name:

app-crypt/lego-4.29.0

Description

Let's Encrypt/ACME client (like certbot or acme.sh) and library written in Go

Added to portage

2025-11-30

libtmux - 0.49.0
Ebuild name:

dev-python/libtmux-0.49.0

Description

Typed library that provides an ORM wrapper for tmux, a terminal multiplex

Added to portage

2025-11-30

link-grammar - 5.13.0
Ebuild name:

dev-libs/link-grammar-5.13.0

Description

A Syntactic English parser

Added to portage

2025-11-30

nuitka - 2.8.9
Ebuild name:

dev-python/nuitka-2.8.9

Description

Python to native compiler

Added to portage

2025-11-30

planner - 3.42-r1
Ebuild name:

app-emacs/planner-3.42-r1

Description

Maintain a local Wiki using Emacs-friendly markup

Added to portage

2025-11-30

plz - 0.7.2
Ebuild name:

app-emacs/plz-0.7.2

Description

HTTP library with curl backend for GNU Emacs

Added to portage

2025-11-30

pyspellchecker - 0.8.4
Ebuild name:

dev-python/pyspellchecker-0.8.4

Description

Pure python spell checker based on work by Peter Norvig

Added to portage

2025-11-30

qutebrowser - 3.6.3
Ebuild name:

www-client/qutebrowser-3.6.3

Description

Keyboard-driven, vim-like browser based on Python and Qt

Added to portage

2025-11-30

renderdoc - 1.36-r1
Ebuild name:

media-gfx/renderdoc-1.36-r1

Description

Standalone graphics debugging tool

Added to portage

2025-11-30

stdio-mgr - 1.0.1.1
Ebuild name:

dev-python/stdio-mgr-1.0.1.1

Description

Context manager for mocking/wrapping stdin/stdout/stderr

Added to portage

2025-11-30

systemd - 259_rc2
Ebuild name:

sys-apps/systemd-259_rc2

Description

System and service manager for Linux

Added to portage

2025-11-30

types-psutil - 7.1.3.20251130
Ebuild name:

dev-python/types-psutil-7.1.3.20251130

Description

Typing stubs for psutil

Added to portage

2025-11-30

vivaldi - 7.7.3851.56
Ebuild name:

www-client/vivaldi-7.7.3851.56

Description

A browser for our friends

Added to portage

2025-11-30

vivaldi-snapshot - 7.8.3879.3
Ebuild name:

www-client/vivaldi-snapshot-7.8.3879.3

Description

A browser for our friends

Added to portage

2025-11-30

wcd - 6.0.6
Ebuild name:

app-misc/wcd-6.0.6

Description

Wherever Change Directory

Added to portage

2025-11-30

yq-go - 4.49.2
Ebuild name:

app-misc/yq-go-4.49.2

Description

yq is a lightweight and portable command-line YAML, JSON and XML processor

Added to portage

2025-11-30

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