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:

48555

userrating:

average rating: 1.5 (4 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.


rate this article:
current rating: average rating: 2.5 (2 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2019-09-19
aqbanking - 5.8.2
Ebuild name:

net-libs/aqbanking-5.8.2

Description

Generic Online Banking Interface

Added to portage

2019-09-19

at-spi2-atk - 2.32.0
Ebuild name:

app-accessibility/at-spi2-atk-2.32.0

Description

Gtk module for bridging AT-SPI to Atk

Added to portage

2019-09-19

at-spi2-core - 2.32.1
Ebuild name:

app-accessibility/at-spi2-core-2.32.1

Description

D-Bus accessibility specifications and registration daemon

Added to portage

2019-09-19

atk - 2.32.0
Ebuild name:

dev-libs/atk-2.32.0

Description

GTK+ & GNOME Accessibility Toolkit

Added to portage

2019-09-19

containers-storage - 1.13.3
Ebuild name:

app-emulation/containers-storage-1.13.3

Description

containers/storage library

Added to portage

2019-09-19

cri-o - 1.15.2
Ebuild name:

app-emulation/cri-o-1.15.2

Description

OCI-based implementation of Kubernetes Container Runtime Interface

Added to portage

2019-09-19

drive - 0.3.9.1-r1
Ebuild name:

net-misc/drive-0.3.9.1-r1

Description

Google Drive client for the commandline

Added to portage

2019-09-19

firefox - 69.0.1
Ebuild name:

www-client/firefox-69.0.1

Description

Firefox Web Browser

Added to portage

2019-09-19

fluxbox - 9999
Ebuild name:

x11-wm/fluxbox-9999

Description

X11 window manager featuring tabs and an iconbar

Added to portage

2019-09-19

fontawesome - 5.11.1
Ebuild name:

media-fonts/fontawesome-5.11.1

Description

The iconic font

Added to portage

2019-09-19

fvwm - 2.6.5-r3
Ebuild name:

x11-wm/fvwm-2.6.5-r3

Description

An extremely powerful ICCCM-compliant multiple virtual desktop window manager

Added to portage

2019-09-19

fvwm - 2.6.8-r2
Ebuild name:

x11-wm/fvwm-2.6.8-r2

Description

An extremely powerful ICCCM-compliant multiple virtual desktop window manager

Added to portage

2019-09-19

gnome-color-manager - 3.32.0
Ebuild name:

gnome-extra/gnome-color-manager-3.32.0

Description

GNOME color profile tools

Added to portage

2019-09-19

gnome-core-libs - 3.32.2
Ebuild name:

gnome-base/gnome-core-libs-3.32.2

Description

Sub-meta package for the core libraries of GNOME 3

Added to portage

2019-09-19

gnome-desktop - 3.32.2
Ebuild name:

gnome-base/gnome-desktop-3.32.2

Description

Library with common API for various GNOME modules

Added to portage

2019-09-19

goomwwm - 1.0.0
Ebuild name:

x11-wm/goomwwm-1.0.0

Description

Get out of my way, Window Manager

Added to portage

2019-09-19

goomwwm - 1.0.0-r1
Ebuild name:

x11-wm/goomwwm-1.0.0-r1

Description

Get out of my way, Window Manager

Added to portage

2019-09-19

goomwwm - 9999
Ebuild name:

x11-wm/goomwwm-9999

Description

Get out of my way, Window Manager

Added to portage

2019-09-19

gwenhywfar - 4.20.2
Ebuild name:

sys-libs/gwenhywfar-4.20.2

Description

Multi-platform helper library for other libraries

Added to portage

2019-09-19

herbstluftwm - 0.7.0
Ebuild name:

x11-wm/herbstluftwm-0.7.0

Description

A manual tiling window manager for X

Added to portage

2019-09-19

httparty - 0.17.1
Ebuild name:

dev-ruby/httparty-0.17.1

Description

Makes http fun Also, makes consuming restful web services dead easy

Added to portage

2019-09-19

kio - 5.62.1
Ebuild name:

kde-frameworks/kio-5.62.1

Description

Framework providing transparent file and data management

Added to portage

2019-09-19

lgi - 0.9.0-r1
Ebuild name:

dev-lua/lgi-0.9.0-r1

Description

Lua bindings using gobject-introspection

Added to portage

2019-09-19

libffi - 3.2.1-r3
Ebuild name:

dev-libs/libffi-3.2.1-r3

Description

a portable, high level programming interface to various calling convention

Added to portage

2019-09-19

libfm-qt - 0.14.1-r2
Ebuild name:

x11-libs/libfm-qt-0.14.1-r2

Description

Qt port of libfm, a library providing components to build desktop file

Added to portage

2019-09-19

libfontenc - 1.1.4
Ebuild name:

x11-libs/libfontenc-1.1.4

Description

X.Org fontenc library

Added to portage

2019-09-19

libglvnd - 1.1.1-r1
Ebuild name:

media-libs/libglvnd-1.1.1-r1

Description

The GL Vendor-Neutral Dispatch library

Added to portage

2019-09-19

libgxim - 0.5.0
Ebuild name:

x11-libs/libgxim-0.5.0

Description

GObject-based XIM protocol library

Added to portage

2019-09-19

libical - 3.0.6
Ebuild name:

dev-libs/libical-3.0.6

Description

An implementation of basic iCAL protocols

Added to portage

2019-09-19

libnotify - 0.7.7-r1
Ebuild name:

x11-libs/libnotify-0.7.7-r1

Description

A library for sending desktop notifications

Added to portage

2019-09-19

libnotify - 0.7.8
Ebuild name:

x11-libs/libnotify-0.7.8

Description

A library for sending desktop notifications

Added to portage

2019-09-19

liboglappth - 1.0.0
Ebuild name:

x11-libs/liboglappth-1.0.0

Description

Libary for OpenGL applications with easy-to-code scene setup and selecti

Added to portage

2019-09-19

libpciaccess - 0.14
Ebuild name:

x11-libs/libpciaccess-0.14

Description

Library providing generic access to the PCI bus and devices

Added to portage

2019-09-19

libpciaccess - 0.15
Ebuild name:

x11-libs/libpciaccess-0.15

Description

Library providing generic access to the PCI bus and devices

Added to portage

2019-09-19

libusbmuxd - 1.0.9
Ebuild name:

app-pda/libusbmuxd-1.0.9

Description

USB multiplex daemon for use with Apple iPhone/iPod Touch devices

Added to portage

2019-09-19

magit-popup - 2.13.0
Ebuild name:

app-emacs/magit-popup-2.13.0

Description

Define prefix-infix-suffix command combos

Added to portage

2019-09-19

mailcrypt - 3.5.9-r1
Ebuild name:

app-emacs/mailcrypt-3.5.9-r1

Description

Provides a simple interface to public key cryptography with OpenPGP

Added to portage

2019-09-19

opera - 63.0.3368.94
Ebuild name:

www-client/opera-63.0.3368.94

Description

A fast and secure web browser

Added to portage

2019-09-19

opera-developer - 65.0.3445.0
Ebuild name:

www-client/opera-developer-65.0.3445.0

Description

A fast and secure web browser

Added to portage

2019-09-19

pkgcheck - 0.6.5
Ebuild name:

dev-util/pkgcheck-0.6.5

Description

pkgcore-based QA utility

Added to portage

2019-09-19

pkgcore - 0.10.4
Ebuild name:

sys-apps/pkgcore-0.10.4

Description

a framework for package management

Added to portage

2019-09-19

usbmuxd - 1.0.8_p20140530
Ebuild name:

app-pda/usbmuxd-1.0.8_p20140530

Description

USB multiplex daemon for use with Apple iPhone/iPod Touch devices

Added to portage

2019-09-19

vivaldi-snapshot - 2.8.1664.32_p1
Ebuild name:

www-client/vivaldi-snapshot-2.8.1664.32_p1

Description

A browser for our friends

Added to portage

2019-09-19

2019-09-18
bsign - 0.4.5-r1
Ebuild name:

app-crypt/bsign-0.4.5-r1

Description

embed secure hashes (SHA1) and digital signatures (GNU Privacy Guard) into

Added to portage

2019-09-18

cardpeek - 0.7.2
Ebuild name:

app-crypt/cardpeek-0.7.2

Description

Tool to read the contents of smartcards

Added to portage

2019-09-18

cardpeek - 0.8.4
Ebuild name:

app-crypt/cardpeek-0.8.4

Description

Tool to read the contents of smartcards

Added to portage

2019-09-18

ccid - 1.4.30
Ebuild name:

app-crypt/ccid-1.4.30

Description

CCID free software driver

Added to portage

2019-09-18

ccrypt - 1.11
Ebuild name:

app-crypt/ccrypt-1.11

Description

Encryption and decryption

Added to portage

2019-09-18

ccrypt - 1.11-r1
Ebuild name:

app-crypt/ccrypt-1.11-r1

Description

Encryption and decryption

Added to portage

2019-09-18

ceph - 14.2.4
Ebuild name:

sys-cluster/ceph-14.2.4

Description

Ceph distributed filesystem

Added to portage

2019-09-18

certbot - 0.36.0
Ebuild name:

app-crypt/certbot-0.36.0

Description

Let's encrypt client to automate deployment of X.509 certificates

Added to portage

2019-09-18

certbot - 0.37.0
Ebuild name:

app-crypt/certbot-0.37.0

Description

Let's encrypt client to automate deployment of X.509 certificates

Added to portage

2019-09-18

certbot - 0.38.0
Ebuild name:

app-crypt/certbot-0.38.0

Description

Let's encrypt client to automate deployment of X.509 certificates

Added to portage

2019-09-18

certbot - 9999
Ebuild name:

app-crypt/certbot-9999

Description

Let's encrypt client to automate deployment of X.509 certificates

Added to portage

2019-09-18

cpuid2cpuflags - 8
Ebuild name:

app-portage/cpuid2cpuflags-8

Description

Tool to guess CPU_FLAGS_* flags for the host

Added to portage

2019-09-18

datamash - 1.5
Ebuild name:

sci-calculators/datamash-1.5

Description

command-line program for basic numeric, textual and statistical operat

Added to portage

2019-09-18

dumpet - 2.1_p20140601-r1
Ebuild name:

app-cdr/dumpet-2.1_p20140601-r1

Description

A tool to dump and debug bootable CD-like images

Added to portage

2019-09-18

efl - 1.22.5
Ebuild name:

dev-libs/efl-1.22.5

Description

Enlightenment Foundation Libraries all-in-one package

Added to portage

2019-09-18

eimp - 1.0.12
Ebuild name:

dev-erlang/eimp-1.0.12

Description

Erlang Image Manipulation Process

Added to portage

2019-09-18

ell - 0.23
Ebuild name:

dev-libs/ell-0.23

Description

Embedded Linux Library provides core, low-level functionality for system daemons

Added to portage

2019-09-18

erlang - 22.0.2-r2
Ebuild name:

dev-lang/erlang-22.0.2-r2

Description

Erlang programming language, runtime environment and libraries (OTP)

Added to portage

2019-09-18

erlang - 22.0.7
Ebuild name:

dev-lang/erlang-22.0.7

Description

Erlang programming language, runtime environment and libraries (OTP)

Added to portage

2019-09-18

etcd - 3.4.1
Ebuild name:

dev-db/etcd-3.4.1

Description

Highly-available key value store for shared configuration and service discovery

Added to portage

2019-09-18

facter - 3.14.4
Ebuild name:

dev-ruby/facter-3.14.4

Description

Added to portage

2019-09-18

geekbench - 5.0.1
Ebuild name:

app-benchmarks/geekbench-5.0.1

Description

A Cross-Platform Benchmark for Android, iOS, Linux, MacOS and Window

Added to portage

2019-09-18

goldrush - 0.2.0
Ebuild name:

dev-erlang/goldrush-0.2.0

Description

Small Erlang app that provides fast event stream processing

Added to portage

2019-09-18

iwd - 0.21
Ebuild name:

net-wireless/iwd-0.21

Description

Wireless daemon for linux

Added to portage

2019-09-18

jiffy - 1.0.1
Ebuild name:

dev-erlang/jiffy-1.0.1

Description

JSON NIFs for Erlang

Added to portage

2019-09-18

kafkacat - 1.5.0
Ebuild name:

net-misc/kafkacat-1.5.0

Description

Generic command line non-JVM Apache Kafka producer and consumer

Added to portage

2019-09-18

kodi-audiodecoder-modplug - 2.0.2
Ebuild name:

media-plugins/kodi-audiodecoder-modplug-2.0.2

Description

Modplug decoder addon for Kodi

Added to portage

2019-09-18

leatherman - 1.7.2
Ebuild name:

dev-libs/leatherman-1.7.2

Description

A C++ toolkit

Added to portage

2019-09-18

libdockapp - 0.7.2
Ebuild name:

x11-libs/libdockapp-0.7.2

Description

Window Maker Dock Applet Library

Added to portage

2019-09-18

libdrm - 2.4.97
Ebuild name:

x11-libs/libdrm-2.4.97

Description

X.Org libdrm library

Added to portage

2019-09-18

libdrm - 2.4.99
Ebuild name:

x11-libs/libdrm-2.4.99

Description

X.Org libdrm library

Added to portage

2019-09-18

libdrm - 9999
Ebuild name:

x11-libs/libdrm-9999

Description

X.Org libdrm library

Added to portage

2019-09-18

libfakekey - 0.1-r3
Ebuild name:

x11-libs/libfakekey-0.1-r3

Description

Helper library for the x11-misc/matchbox-keyboard package

Added to portage

2019-09-18

libfm - 1.2.5
Ebuild name:

x11-libs/libfm-1.2.5

Description

A library for file management

Added to portage

2019-09-18

libfm - 1.2.5
Ebuild name:

x11-libs/libfm-1.2.5

Description

A library for file management

Added to portage

2019-09-18

libfm - 1.3.1
Ebuild name:

x11-libs/libfm-1.3.1

Description

A library for file management

Added to portage

2019-09-18

libfm - 1.3.1
Ebuild name:

x11-libs/libfm-1.3.1

Description

A library for file management

Added to portage

2019-09-18

libfm - 9999
Ebuild name:

x11-libs/libfm-9999

Description

A library for file management

Added to portage

2019-09-18

libfm - 9999
Ebuild name:

x11-libs/libfm-9999

Description

A library for file management

Added to portage

2019-09-18

libfm-extra - 1.2.5
Ebuild name:

x11-libs/libfm-extra-1.2.5

Description

A library for file management

Added to portage

2019-09-18

libfm-extra - 1.2.5
Ebuild name:

x11-libs/libfm-extra-1.2.5

Description

A library for file management

Added to portage

2019-09-18

libfm-extra - 1.3.1
Ebuild name:

x11-libs/libfm-extra-1.3.1

Description

A library for file management

Added to portage

2019-09-18

libfm-extra - 1.3.1
Ebuild name:

x11-libs/libfm-extra-1.3.1

Description

A library for file management

Added to portage

2019-09-18

libfm-qt - 0.14.1-r2
Ebuild name:

x11-libs/libfm-qt-0.14.1-r2

Description

Qt port of libfm, a library providing components to build desktop file

Added to portage

2019-09-18

libfontenc - 1.1.4
Ebuild name:

x11-libs/libfontenc-1.1.4

Description

X.Org fontenc library

Added to portage

2019-09-18

libgxim - 0.5.0
Ebuild name:

x11-libs/libgxim-0.5.0

Description

GObject-based XIM protocol library

Added to portage

2019-09-18

libnotify - 0.7.7-r1
Ebuild name:

x11-libs/libnotify-0.7.7-r1

Description

A library for sending desktop notifications

Added to portage

2019-09-18

libusbmuxd - 1.0.10
Ebuild name:

app-pda/libusbmuxd-1.0.10

Description

USB multiplex daemon for use with Apple iPhone/iPod Touch devices

Added to portage

2019-09-18

linux-headers - 5.3
Ebuild name:

sys-kernel/linux-headers-5.3

Description

Added to portage

2019-09-18

meck - 0.8.13
Ebuild name:

dev-erlang/meck-0.8.13

Description

Mocking library for Erlang

Added to portage

2019-09-18

memcached - 1.5.18
Ebuild name:

net-misc/memcached-1.5.18

Description

High-performance, distributed memory object caching system

Added to portage

2019-09-18

mqtree - 1.0.4
Ebuild name:

dev-erlang/mqtree-1.0.4

Description

Index tree for MQTT topic filters

Added to portage

2019-09-18

os-vif - 1.15.2
Ebuild name:

dev-python/os-vif-1.15.2

Description

OpenStack Cinder brick library for managing local volume attaches

Added to portage

2019-09-18

passenger - 6.0.4
Ebuild name:

www-apache/passenger-6.0.4

Description

Passenger makes deployment of Ruby on Rails applications a breeze

Added to portage

2019-09-18

pkix - 1.0.3
Ebuild name:

dev-erlang/pkix-1.0.3

Description

PKIX certificates management library for Erlang

Added to portage

2019-09-18

pymediainfo - 4.1
Ebuild name:

dev-python/pymediainfo-4.1

Description

A wrapper around the mediainfo library

Added to portage

2019-09-18

radare2 - 3.9.0
Ebuild name:

dev-util/radare2-3.9.0

Description

unix-like reverse engineering framework and commandline tools

Added to portage

2019-09-18

unifi - 0
Ebuild name:

acct-group/unifi-0

Description

A group for the UniFi controller

Added to portage

2019-09-18

unifi - 0
Ebuild name:

acct-user/unifi-0

Description

A user for the UniFi Controller

Added to portage

2019-09-18

unifi - 5.11.46-r1
Ebuild name:

net-wireless/unifi-5.11.46-r1

Description

A Management Controller for Ubiquiti Networks UniFi APs

Added to portage

2019-09-18

unifi - 5.12.5-r1
Ebuild name:

net-wireless/unifi-5.12.5-r1

Description

A Management Controller for Ubiquiti Networks UniFi APs

Added to portage

2019-09-18

unifi - 5.6.42-r1
Ebuild name:

net-wireless/unifi-5.6.42-r1

Description

A Management Controller for Ubiquiti Networks UniFi APs

Added to portage

2019-09-18

usbmuxd - 1.1.0
Ebuild name:

app-pda/usbmuxd-1.1.0

Description

USB multiplex daemon for use with Apple iPhone/iPod Touch devices

Added to portage

2019-09-18

vala - 0.46.1
Ebuild name:

dev-lang/vala-0.46.1

Description

Compiler for the GObject type system

Added to portage

2019-09-18

vala-common - 0.46.1
Ebuild name:

dev-libs/vala-common-0.46.1

Description

Build infrastructure for packages that use Vala

Added to portage

2019-09-18

vault - 1.2.3
Ebuild name:

app-admin/vault-1.2.3

Description

A tool for managing secrets

Added to portage

2019-09-18

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2018 Sascha Nitsch Unternehmensberatung UG(haftungsbeschänkt)
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 51.3 ms