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:

87218

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-07-27
atari800 - 7.1.2
Ebuild name:

games-emulation/atari800-7.1.2

Description

Emulator of Atari 8-bit computer systems and 5200 game console

Added to portage

2026-07-27

backrefs - 8.0
Ebuild name:

dev-python/backrefs-8.0

Description

Wrapper around re or regex that adds additional back references

Added to portage

2026-07-27

cares-tools - 0.4
Ebuild name:

net-dns/cares-tools-0.4

Description

c-ares tools host, nslookup

Added to portage

2026-07-27

fastjsonschema - 2.22.0
Ebuild name:

dev-python/fastjsonschema-2.22.0

Description

Fast JSON schema validator for Python

Added to portage

2026-07-27

gamescope - 3.16.25-r1
Ebuild name:

gui-wm/gamescope-3.16.25-r1

Description

Efficient micro-compositor for running games

Added to portage

2026-07-27

git-sources - 7.2_rc5
Ebuild name:

sys-kernel/git-sources-7.2_rc5

Description

The very latest -git version of the Linux kernel

Added to portage

2026-07-27

gitpython - 3.1.57
Ebuild name:

dev-python/gitpython-3.1.57

Description

Library used to interact with Git repositories

Added to portage

2026-07-27

libxmp - 4.7.2
Ebuild name:

media-libs/libxmp-4.7.2

Description

Library that renders module files to PCM data

Added to portage

2026-07-27

phonenumbers - 9.0.35
Ebuild name:

dev-python/phonenumbers-9.0.35

Description

Python port of Google's libphonenumber

Added to portage

2026-07-27

prompt-toolkit - 3.0.53
Ebuild name:

dev-python/prompt-toolkit-3.0.53

Description

Building powerful interactive command lines in Python

Added to portage

2026-07-27

pygments - 2.20.0
Ebuild name:

dev-python/pygments-2.20.0

Description

Pygments is a syntax highlighting package written in Python

Added to portage

2026-07-27

pyproject-fmt - 2.25.4
Ebuild name:

dev-python/pyproject-fmt-2.25.4

Description

Format your pyproject.toml file

Added to portage

2026-07-27

typeguard - 4.6.0
Ebuild name:

dev-python/typeguard-4.6.0

Description

Run-time type checker for Python

Added to portage

2026-07-27

urwid - 4.0.8
Ebuild name:

dev-python/urwid-4.0.8

Description

Curses-based user interface library for Python

Added to portage

2026-07-27

2026-07-26
acl - 2.4.0-r1
Ebuild name:

sys-apps/acl-2.4.0-r1

Description

Access control list utilities, libraries, and headers

Added to portage

2026-07-26

action_text-trix - 2.1.16-r1
Ebuild name:

dev-ruby/action_text-trix-2.1.16-r1

Description

A rich text editor for everyday writing

Added to portage

2026-07-26

actioncable - 8.0.4-r1
Ebuild name:

dev-ruby/actioncable-8.0.4-r1

Description

Integrated WebSockets for Rails

Added to portage

2026-07-26

actioncable - 8.1.2-r1
Ebuild name:

dev-ruby/actioncable-8.1.2-r1

Description

Integrated WebSockets for Rails

Added to portage

2026-07-26

actionmailbox - 8.0.4-r1
Ebuild name:

dev-ruby/actionmailbox-8.0.4-r1

Description

Framework for designing email-service layers

Added to portage

2026-07-26

actionmailbox - 8.1.2-r1
Ebuild name:

dev-ruby/actionmailbox-8.1.2-r1

Description

Framework for designing email-service layers

Added to portage

2026-07-26

actionmailer - 8.0.4-r1
Ebuild name:

dev-ruby/actionmailer-8.0.4-r1

Description

Framework for designing email-service layers

Added to portage

2026-07-26

actionmailer - 8.1.2-r1
Ebuild name:

dev-ruby/actionmailer-8.1.2-r1

Description

Framework for designing email-service layers

Added to portage

2026-07-26

actionpack - 8.0.4-r1
Ebuild name:

dev-ruby/actionpack-8.0.4-r1

Description

Eases web-request routing, handling, and response

Added to portage

2026-07-26

actionpack - 8.1.2-r1
Ebuild name:

dev-ruby/actionpack-8.1.2-r1

Description

Eases web-request routing, handling, and response

Added to portage

2026-07-26

actiontext - 8.0.4-r1
Ebuild name:

dev-ruby/actiontext-8.0.4-r1

Description

Edit and display rich text in Rails applications

Added to portage

2026-07-26

actiontext - 8.1.2-r1
Ebuild name:

dev-ruby/actiontext-8.1.2-r1

Description

Edit and display rich text in Rails applications

Added to portage

2026-07-26

actionview - 8.0.4-r1
Ebuild name:

dev-ruby/actionview-8.0.4-r1

Description

Simple, battle-tested conventions and helpers for building web pages

Added to portage

2026-07-26

actionview - 8.1.2-r1
Ebuild name:

dev-ruby/actionview-8.1.2-r1

Description

Simple, battle-tested conventions and helpers for building web pages

Added to portage

2026-07-26

activejob - 8.0.4-r1
Ebuild name:

dev-ruby/activejob-8.0.4-r1

Description

Job framework with pluggable queues

Added to portage

2026-07-26

activejob - 8.1.2-r1
Ebuild name:

dev-ruby/activejob-8.1.2-r1

Description

Job framework with pluggable queues

Added to portage

2026-07-26

activemodel - 8.0.4-r1
Ebuild name:

dev-ruby/activemodel-8.0.4-r1

Description

Toolkit for building modeling frameworks like Active Record and Activ

Added to portage

2026-07-26

activemodel - 8.1.2-r1
Ebuild name:

dev-ruby/activemodel-8.1.2-r1

Description

Toolkit for building modeling frameworks like Active Record and Activ

Added to portage

2026-07-26

activerecord - 8.0.4-r1
Ebuild name:

dev-ruby/activerecord-8.0.4-r1

Description

Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM

Added to portage

2026-07-26

activerecord - 8.1.2-r1
Ebuild name:

dev-ruby/activerecord-8.1.2-r1

Description

Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM

Added to portage

2026-07-26

activestorage - 8.0.4-r1
Ebuild name:

dev-ruby/activestorage-8.0.4-r1

Description

Attach cloud and local files in Rails applications

Added to portage

2026-07-26

activestorage - 8.1.2-r1
Ebuild name:

dev-ruby/activestorage-8.1.2-r1

Description

Attach cloud and local files in Rails applications

Added to portage

2026-07-26

bitwarden-cli-bin - 2026.7.0
Ebuild name:

app-admin/bitwarden-cli-bin-2026.7.0

Description

CLI client for Bitwarden compatible servers

Added to portage

2026-07-26

bogus - 0.1.7-r1
Ebuild name:

dev-ruby/bogus-0.1.7-r1

Description

Ensuring that the things you stub or mock actually exist

Added to portage

2026-07-26

carbon-c-relay - 3.9
Ebuild name:

app-misc/carbon-c-relay-3.9

Description

Enhanced C version of Carbon relay, aggregator and rewriter

Added to portage

2026-07-26

dalli - 4.3.3
Ebuild name:

dev-ruby/dalli-4.3.3

Description

A high performance pure Ruby client for accessing memcached servers

Added to portage

2026-07-26

dalli - 5.0.5
Ebuild name:

dev-ruby/dalli-5.0.5

Description

A high performance pure Ruby client for accessing memcached servers

Added to portage

2026-07-26

dconf - 0.49.0
Ebuild name:

gnome-base/dconf-0.49.0

Description

Simple low-level configuration system

Added to portage

2026-07-26

diff-lcs - 2.0.0
Ebuild name:

dev-ruby/diff-lcs-2.0.0

Description

Use the McIlroy-Hunt LCS algorithm to compute differences

Added to portage

2026-07-26

discord - 1.0.150
Ebuild name:

net-im/discord-1.0.150

Description

All-in-one voice and text chat for gamers

Added to portage

2026-07-26

dolphin - 2606-r1
Ebuild name:

games-emulation/dolphin-2606-r1

Description

Gamecube and Wii game emulator

Added to portage

2026-07-26

erb - 6.0.6
Ebuild name:

dev-ruby/erb-6.0.6

Description

An easy to use but powerful templating system for Ruby

Added to portage

2026-07-26

flatpak-builder - 1.4.10
Ebuild name:

dev-util/flatpak-builder-1.4.10

Description

Tool to build flatpaks from source

Added to portage

2026-07-26

gjs - 1.88.1
Ebuild name:

dev-libs/gjs-1.88.1

Description

Javascript bindings for GNOME

Added to portage

2026-07-26

glibc - 2.44
Ebuild name:

sys-libs/glibc-2.44

Description

GNU libc C library

Added to portage

2026-07-26

globalid - 1.4.0
Ebuild name:

dev-ruby/globalid-1.4.0

Description

Reference models by URI

Added to portage

2026-07-26

importmap-rails - 2.2.3-r1
Ebuild name:

dev-ruby/importmap-rails-2.2.3-r1

Description

Use ESM with importmap to manage JavaScript in Rails

Added to portage

2026-07-26

io-endpoint - 0.17.1-r1
Ebuild name:

dev-ruby/io-endpoint-0.17.1-r1

Description

Provides a separation of concerns interface for IO endpoints

Added to portage

2026-07-26

jackett-bin - 0.24.1367
Ebuild name:

www-apps/jackett-bin-0.24.1367

Description

API Support for your favorite torrent trackers

Added to portage

2026-07-26

kdiff3 - 1.12.6
Ebuild name:

kde-misc/kdiff3-1.12.6

Description

Frontend to diff3 based on KDE Frameworks

Added to portage

2026-07-26

kid3 - 3.10.1
Ebuild name:

media-sound/kid3-3.10.1

Description

Simple tag editor based on Qt

Added to portage

2026-07-26

libdisplay-info - 0.4.0
Ebuild name:

media-libs/libdisplay-info-0.4.0

Description

EDID and DisplayID library

Added to portage

2026-07-26

libqalculate - 5.12.0
Ebuild name:

sci-libs/libqalculate-5.12.0

Description

A modern multi-purpose calculator library

Added to portage

2026-07-26

librsvg - 2.62.3
Ebuild name:

gnome-base/librsvg-2.62.3

Description

Scalable Vector Graphics (SVG) rendering library

Added to portage

2026-07-26

liquidctl - 1.16.0
Ebuild name:

app-misc/liquidctl-1.16.0

Description

Cross-platform tool and drivers for liquid coolers and other devices

Added to portage

2026-07-26

live - 2026.07.23
Ebuild name:

media-plugins/live-2026.07.23

Description

Libraries for standards-based RTP/RTCP/RTSP multimedia streaming

Added to portage

2026-07-26

localhost - 1.7.0-r1
Ebuild name:

dev-ruby/localhost-1.7.0-r1

Description

Manage a local CA for self-signed localhost development servers

Added to portage

2026-07-26

mixlib-shellout - 3.4.13
Ebuild name:

dev-ruby/mixlib-shellout-3.4.13

Description

Run external commands on Unix or Windows

Added to portage

2026-07-26

mocha - 2.8.2-r1
Ebuild name:

dev-ruby/mocha-2.8.2-r1

Description

Mocking and stubbing using a syntax like that of JMock and SchMock

Added to portage

2026-07-26

mqtt - 0.7.0
Ebuild name:

dev-ruby/mqtt-0.7.0

Description

Pure Ruby gem that implements the MQTT protocol

Added to portage

2026-07-26

muon - 0.6.0
Ebuild name:

dev-build/muon-0.6.0

Description

A meson-compatible build system

Added to portage

2026-07-26

net-imap - 0.4.25
Ebuild name:

dev-ruby/net-imap-0.4.25

Description

Ruby client api for Internet Message Access Protocol

Added to portage

2026-07-26

net-imap - 0.5.15
Ebuild name:

dev-ruby/net-imap-0.5.15

Description

Ruby client api for Internet Message Access Protocol

Added to portage

2026-07-26

net-imap - 0.6.6
Ebuild name:

dev-ruby/net-imap-0.6.6

Description

Ruby client api for Internet Message Access Protocol

Added to portage

2026-07-26

ollama - 0.32.4
Ebuild name:

sci-ml/ollama-0.32.4

Description

Get up and running with Llama 3, Mistral, Gemma, and other language models

Added to portage

2026-07-26

openjdk - 11.0.32_p9
Ebuild name:

dev-java/openjdk-11.0.32_p9

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openjdk - 17.0.20_p8
Ebuild name:

dev-java/openjdk-17.0.20_p8

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openjdk - 21.0.12_p8
Ebuild name:

dev-java/openjdk-21.0.12_p8

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openjdk - 25.0.4_p7
Ebuild name:

dev-java/openjdk-25.0.4_p7

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openjdk - 27_beta31
Ebuild name:

dev-java/openjdk-27_beta31

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openjdk - 28_alpha7
Ebuild name:

dev-java/openjdk-28_alpha7

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openjdk - 8.502_p07
Ebuild name:

dev-java/openjdk-8.502_p07

Description

Open source implementation of the Java programming language

Added to portage

2026-07-26

openpgp-keys-alisarctl - 20200302-r1
Ebuild name:

sec-keys/openpgp-keys-alisarctl-20200302-r1

Description

OpenPGP keys used by Ali Abdallah

Added to portage

2026-07-26

propshaft - 1.3.1-r1
Ebuild name:

dev-ruby/propshaft-1.3.1-r1

Description

Deliver assets for Rails

Added to portage

2026-07-26

public_suffix - 7.0.5
Ebuild name:

dev-ruby/public_suffix-7.0.5

Description

Parse and decompose a domain name into top level domain, domain and su

Added to portage

2026-07-26

puma - 7.2.1
Ebuild name:

www-servers/puma-7.2.1

Description

a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rac

Added to portage

2026-07-26

puppet-lint - 5.1.1
Ebuild name:

app-admin/puppet-lint-5.1.1

Description

A linter for puppet DSL

Added to portage

2026-07-26

qalculate-gtk - 5.12.0
Ebuild name:

sci-calculators/qalculate-gtk-5.12.0

Description

Modern multi-purpose calculator

Added to portage

2026-07-26

qalculate-qt - 5.12.0
Ebuild name:

sci-calculators/qalculate-qt-5.12.0

Description

Qt-based UI for libqalculate

Added to portage

2026-07-26

rails - 8.0.4-r1
Ebuild name:

dev-ruby/rails-8.0.4-r1

Description

ruby on rails is a web-application and persistence framework

Added to portage

2026-07-26

rails - 8.1.2-r1
Ebuild name:

dev-ruby/rails-8.1.2-r1

Description

ruby on rails is a web-application and persistence framework

Added to portage

2026-07-26

railties - 8.0.4-r1
Ebuild name:

dev-ruby/railties-8.0.4-r1

Description

Tools for creating, working with, and running Rails applications

Added to portage

2026-07-26

railties - 8.1.2-r1
Ebuild name:

dev-ruby/railties-8.1.2-r1

Description

Tools for creating, working with, and running Rails applications

Added to portage

2026-07-26

ruby - 3.3.12
Ebuild name:

dev-lang/ruby-3.3.12

Description

An object-oriented scripting language

Added to portage

2026-07-26

ruby - 3.4.10
Ebuild name:

dev-lang/ruby-3.4.10

Description

An object-oriented scripting language

Added to portage

2026-07-26

ruby - 4.0.6
Ebuild name:

dev-lang/ruby-4.0.6

Description

An object-oriented scripting language

Added to portage

2026-07-26

seafile - 9.0.20
Ebuild name:

net-misc/seafile-9.0.20

Description

File syncing and sharing software with file encryption and group sharing

Added to portage

2026-07-26

seafile-client - 9.0.20
Ebuild name:

net-misc/seafile-client-9.0.20

Description

Seafile desktop client

Added to portage

2026-07-26

sh - 2.4.0
Ebuild name:

dev-python/sh-2.4.0

Description

Python subprocess interface

Added to portage

2026-07-26

sinatra - 4.2.1-r1
Ebuild name:

dev-ruby/sinatra-4.2.1-r1

Description

A DSL for quickly creating web applications in Ruby with minimal effort

Added to portage

2026-07-26

sprockets-rails - 3.5.2-r1
Ebuild name:

dev-ruby/sprockets-rails-3.5.2-r1

Description

Sprockets implementation for Rails 4.x (and beyond) Asset Pipelin

Added to portage

2026-07-26

strawberry - 1.2.25
Ebuild name:

media-sound/strawberry-1.2.25

Description

Modern music player and library organizer based on Clementine and Qt

Added to portage

2026-07-26

sus-fixtures-async - 0.2.0-r2
Ebuild name:

dev-ruby/sus-fixtures-async-0.2.0-r2

Description

Convenient fixture for testing async components in a reactor

Added to portage

2026-07-26

tilt - 2.8.0
Ebuild name:

dev-ruby/tilt-2.8.0

Description

Thin interface over template engines to make their usage as generic as possible

Added to portage

2026-07-26

unidiff - 1.0.0
Ebuild name:

dev-python/unidiff-1.0.0

Description

Unified diff parsing/metadata extraction library

Added to portage

2026-07-26

vaultwarden - 1.37.0
Ebuild name:

app-admin/vaultwarden-1.37.0

Description

Unofficial Bitwarden compatible password manager

Added to portage

2026-07-26

vaultwarden-web - 2026.6.4
Ebuild name:

www-apps/vaultwarden-web-2026.6.4

Description

Prebuilt web vault frontend for Vaultwarden

Added to portage

2026-07-26

yard - 0.9.45
Ebuild name:

dev-ruby/yard-0.9.45

Description

Documentation generation tool for the Ruby programming language

Added to portage

2026-07-26

zeitwerk - 2.8.2
Ebuild name:

dev-ruby/zeitwerk-2.8.2

Description

Efficient and thread-safe code loader for Ruby

Added to portage

2026-07-26

zlib - 3.2.3
Ebuild name:

dev-ruby/zlib-3.2.3

Description

Ruby interface for the zlib compression/decompression library

Added to portage

2026-07-26

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