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:

41698

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: 1.0 (1 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
2018-07-17
adobe-flash - 30.0.0.134
Ebuild name:

www-plugins/adobe-flash-30.0.0.134

Description

Adobe Flash Player

Added to portage

2018-07-17

electrum - 3.2.2
Ebuild name:

net-misc/electrum-3.2.2

Description

User friendly Bitcoin client

Added to portage

2018-07-17

grpc - 1.13.1
Ebuild name:

net-libs/grpc-1.13.1

Description

Modern open source high performance RPC framework

Added to portage

2018-07-17

icu - 62.1
Ebuild name:

dev-libs/icu-62.1

Description

International Components for Unicode

Added to portage

2018-07-17

icu-layoutex - 62.1
Ebuild name:

dev-libs/icu-layoutex-62.1

Description

External layout part of International Components for Unicode

Added to portage

2018-07-17

libpng - 1.2.59
Ebuild name:

media-libs/libpng-1.2.59

Description

Portable Network Graphics library

Added to portage

2018-07-17

libpng - 1.5.30
Ebuild name:

media-libs/libpng-1.5.30

Description

Portable Network Graphics library

Added to portage

2018-07-17

libpng - 1.6.35
Ebuild name:

media-libs/libpng-1.6.35

Description

Portable Network Graphics library

Added to portage

2018-07-17

mrtg - 2.17.7
Ebuild name:

net-analyzer/mrtg-2.17.7

Description

A tool to monitor the traffic load on network-links

Added to portage

2018-07-17

mutt - 1.10.1
Ebuild name:

mail-client/mutt-1.10.1

Description

A small but very powerful text-based mail client

Added to portage

2018-07-17

newton - 3.14
Ebuild name:

dev-games/newton-3.14

Description

Integrated solution for real time simulation of physics environments

Added to portage

2018-07-17

opera - 54.0.2952.54
Ebuild name:

www-client/opera-54.0.2952.54

Description

A fast and secure web browser

Added to portage

2018-07-17

opera-beta - 55.0.2994.14
Ebuild name:

www-client/opera-beta-55.0.2994.14

Description

A fast and secure web browser

Added to portage

2018-07-17

opera-developer - 56.0.3013.0
Ebuild name:

www-client/opera-developer-56.0.3013.0

Description

A fast and secure web browser

Added to portage

2018-07-17

pam_u2f - 1.0.7
Ebuild name:

sys-auth/pam_u2f-1.0.7

Description

Library for authenticating against PAM with a Yubikey

Added to portage

2018-07-17

playerctl - 0.6.1
Ebuild name:

media-sound/playerctl-0.6.1

Description

A CLI utility to control media players over MPRIS

Added to portage

2018-07-17

pycurl - 7.43.0.2
Ebuild name:

dev-python/pycurl-7.43.0.2

Description

python binding for curl/libcurl

Added to portage

2018-07-17

rng-tools - 6.3.1
Ebuild name:

sys-apps/rng-tools-6.3.1

Description

Daemon to use hardware random number generators

Added to portage

2018-07-17

sshguard - 2.2.0
Ebuild name:

app-admin/sshguard-2.2.0

Description

protects hosts from brute force attacks against ssh

Added to portage

2018-07-17

tor - 0.3.4.5_rc-r1
Ebuild name:

net-vpn/tor-0.3.4.5_rc-r1

Description

Anonymizing overlay network for TCP

Added to portage

2018-07-17

util-linux - 2.32.1
Ebuild name:

sys-apps/util-linux-2.32.1

Description

Various useful Linux utilities

Added to portage

2018-07-17

woff2 - 1.0.2
Ebuild name:

media-libs/woff2-1.0.2

Description

Encode/decode WOFF2 font format

Added to portage

2018-07-17

xfsprogs - 4.16.1-r1
Ebuild name:

sys-fs/xfsprogs-4.16.1-r1

Description

xfs filesystem utilities

Added to portage

2018-07-17

xfsprogs - 4.17.0-r1
Ebuild name:

sys-fs/xfsprogs-4.17.0-r1

Description

xfs filesystem utilities

Added to portage

2018-07-17

2018-07-16
apache - 2.4.34
Ebuild name:

www-servers/apache-2.4.34

Description

The Apache Web Server

Added to portage

2018-07-16

apache-tools - 2.4.34
Ebuild name:

app-admin/apache-tools-2.4.34

Description

Useful Apache tools - htdigest, htpasswd, ab, htdbm

Added to portage

2018-07-16

audio_capture - 0.3.3
Ebuild name:

dev-ros/audio_capture-0.3.3

Description

Transports audio from a source to a destination

Added to portage

2018-07-16

audio_common - 0.3.3
Ebuild name:

ros-meta/audio_common-0.3.3

Description

Common code for working with audio in ROS

Added to portage

2018-07-16

audio_common_msgs - 0.3.3
Ebuild name:

dev-ros/audio_common_msgs-0.3.3

Description

Messages for transmitting audio via ROS

Added to portage

2018-07-16

audio_play - 0.3.3
Ebuild name:

dev-ros/audio_play-0.3.3

Description

Outputs audio to a speaker from a source node

Added to portage

2018-07-16

bind - 9.12.2
Ebuild name:

net-dns/bind-9.12.2

Description

BIND - Berkeley Internet Name Domain - Name Server

Added to portage

2018-07-16

bind-tools - 9.12.2
Ebuild name:

net-dns/bind-tools-9.12.2

Description

bind tools dig, nslookup, host, nsupdate, dnssec-keygen

Added to portage

2018-07-16

bumblebee - 3.2.1_p20170130
Ebuild name:

x11-misc/bumblebee-3.2.1_p20170130

Description

Service providing elegant and stable means of managing Optimus g

Added to portage

2018-07-16

cura - 3.4.1
Ebuild name:

media-gfx/cura-3.4.1

Description

A 3D model slicing application for 3D printing

Added to portage

2018-07-16

curaengine - 3.4.1
Ebuild name:

media-gfx/curaengine-3.4.1

Description

A 3D model slicing engine for 3D printing

Added to portage

2018-07-16

datovka - 4.10.3
Ebuild name:

app-misc/datovka-4.10.3

Description

GUI to access the Czech eGov system of Datove schranky

Added to portage

2018-07-16

desktop - 1.4.1
Ebuild name:

ros-meta/desktop-1.4.1

Description

Metapackage for a basic ROS desktop install

Added to portage

2018-07-16

desktop_full - 1.4.1
Ebuild name:

ros-meta/desktop_full-1.4.1

Description

Metapackage for ROS complete desktop install

Added to portage

2018-07-16

dwz - 0.12
Ebuild name:

sys-devel/dwz-0.12

Description

DWARF optimization and duplicate removal tool

Added to portage

2018-07-16

elasticsearch - 6.3.1-r1
Ebuild name:

app-misc/elasticsearch-6.3.1-r1

Description

Open Source, Distributed, RESTful, Search Engine

Added to portage

2018-07-16

espresso++ - 2.0
Ebuild name:

sci-physics/espresso++-2.0

Description

A Modern Multiscale Simulation Package for Soft Matter Systems

Added to portage

2018-07-16

fdm-materials - 3.4.1
Ebuild name:

media-gfx/fdm-materials-3.4.1

Description

FDM materials for media-gfx/cura

Added to portage

2018-07-16

freeorion - 0.4.7.1-r4
Ebuild name:

games-strategy/freeorion-0.4.7.1-r4

Description

A free turn-based space empire and galactic conquest game

Added to portage

2018-07-16

gazebo - 9.2.0
Ebuild name:

sci-electronics/gazebo-9.2.0

Description

A 3D multiple robot simulator with dynamics

Added to portage

2018-07-16

gazebo_dev - 2.8.4
Ebuild name:

dev-ros/gazebo_dev-2.8.4

Description

Provides a cmake config for the default version of Gazebo for the ROS dist

Added to portage

2018-07-16

gazebo_msgs - 2.8.4
Ebuild name:

dev-ros/gazebo_msgs-2.8.4

Description

Message and service data structures for interacting with Gazebo from ROS

Added to portage

2018-07-16

gazebo_plugins - 2.8.4
Ebuild name:

dev-ros/gazebo_plugins-2.8.4

Description

Robot-independent Gazebo plugins for sensors, motors and dynamic recon

Added to portage

2018-07-16

gazebo_ros - 2.8.4
Ebuild name:

dev-ros/gazebo_ros-2.8.4

Description

ROS plugins that offer message and service publishers for interfacing with

Added to portage

2018-07-16

gazebo_ros_control - 2.8.4
Ebuild name:

dev-ros/gazebo_ros_control-2.8.4

Description

ROS control plugins for gazebo

Added to portage

2018-07-16

gazebo_ros_pkgs - 2.8.4
Ebuild name:

ros-meta/gazebo_ros_pkgs-2.8.4

Description

Interface for using ROS with the gazebo simulator

Added to portage

2018-07-16

gdal - 2.3.0-r1
Ebuild name:

sci-libs/gdal-2.3.0-r1

Description

Translator library for raster geospatial data formats (includes OGR support)

Added to portage

2018-07-16

geary - 0.12.3
Ebuild name:

mail-client/geary-0.12.3

Description

A lightweight, easy-to-use, feature-rich email client

Added to portage

2018-07-16

git-sources - 4.18_rc5
Ebuild name:

sys-kernel/git-sources-4.18_rc5

Description

The very latest -git version of the Linux kernel

Added to portage

2018-07-16

gntp - 1.0.3
Ebuild name:

dev-python/gntp-1.0.3

Description

Python library for working with the Growl Notification Transport Protocol

Added to portage

2018-07-16

grpc - 1.12.1-r1
Ebuild name:

net-libs/grpc-1.12.1-r1

Description

Modern open source high performance RPC framework

Added to portage

2018-07-16

grpc - 1.13.0-r1
Ebuild name:

net-libs/grpc-1.13.0-r1

Description

Modern open source high performance RPC framework

Added to portage

2018-07-16

haproxy - 1.8.12
Ebuild name:

net-proxy/haproxy-1.8.12

Description

A TCP/HTTP reverse proxy for high availability environments

Added to portage

2018-07-16

idn-ruby - 0.1.0
Ebuild name:

dev-ruby/idn-ruby-0.1.0

Description

LibIDN Ruby Bindings

Added to portage

2018-07-16

latte-dock - 0.8.0
Ebuild name:

kde-misc/latte-dock-0.8.0

Description

Elegant dock, based on KDE Frameworks

Added to portage

2018-07-16

libarcus - 3.4.1
Ebuild name:

dev-libs/libarcus-3.4.1

Description

This library facilitates communication between Cura and its backend

Added to portage

2018-07-16

libcharon - 3.4.1
Ebuild name:

dev-libs/libcharon-3.4.1

Description

This library facilitates communication between Cura and its backend

Added to portage

2018-07-16

libisds - 0.10.8
Ebuild name:

net-libs/libisds-0.10.8

Description

Client library for accessing ISDS Soap services

Added to portage

2018-07-16

libsavitar - 3.4.1
Ebuild name:

dev-libs/libsavitar-3.4.1

Description

C++ implementation of 3mf loading with SIP python bindings

Added to portage

2018-07-16

nm-applet - 1.8.14
Ebuild name:

gnome-extra/nm-applet-1.8.14

Description

GNOME applet for NetworkManager

Added to portage

2018-07-16

novnc - 1.0.0
Ebuild name:

www-apps/novnc-1.0.0

Description

noVNC is a VNC client implemented using HTML5 technologies

Added to portage

2018-07-16

openttd - 1.8.0
Ebuild name:

games-simulation/openttd-1.8.0

Description

OpenTTD is a clone of Transport Tycoon Deluxe

Added to portage

2018-07-16

openttd - 9999
Ebuild name:

games-simulation/openttd-9999

Description

OpenTTD is a clone of Transport Tycoon Deluxe

Added to portage

2018-07-16

pan - 0.145
Ebuild name:

net-nntp/pan-0.145

Description

A newsreader for GNOME

Added to portage

2018-07-16

pecl-gnupg - 1.4.0-r2
Ebuild name:

dev-php/pecl-gnupg-1.4.0-r2

Description

PHP wrapper around the gpgme library

Added to portage

2018-07-16

perception - 1.4.1
Ebuild name:

ros-meta/perception-1.4.1

Description

Metapackage for ROS perception stack

Added to portage

2018-07-16

piwigo - 2.9.4
Ebuild name:

www-apps/piwigo-2.9.4

Description

a photo gallery software for the web

Added to portage

2018-07-16

portage - 2.3.43
Ebuild name:

sys-apps/portage-2.3.43

Description

Portage is the package management and distribution system for Gentoo

Added to portage

2018-07-16

portage-mgorny - 2.3.43.2
Ebuild name:

sys-apps/portage-mgorny-2.3.43.2

Description

Fork of Portage focused on cleaning up and useful features

Added to portage

2018-07-16

portage-utils - 0.72
Ebuild name:

app-portage/portage-utils-0.72

Description

Small and fast Portage helper tools written in C

Added to portage

2018-07-16

postgresql - 11_beta2
Ebuild name:

dev-db/postgresql-11_beta2

Description

PostgreSQL RDBMS

Added to portage

2018-07-16

pyhamcrest - 1.9.0-r1
Ebuild name:

dev-python/pyhamcrest-1.9.0-r1

Description

Hamcrest framework for matcher objects

Added to portage

2018-07-16

pytest - 3.6.3
Ebuild name:

dev-python/pytest-3.6.3

Description

Simple powerful testing with Python

Added to portage

2018-07-16

rasdaemon - 0.6.1-r1
Ebuild name:

app-admin/rasdaemon-0.6.1-r1

Description

Reliability, Availability and Serviceability logging tool

Added to portage

2018-07-16

rcm - 1.3.3
Ebuild name:

app-admin/rcm-1.3.3

Description

rc file (dotfile) management

Added to portage

2018-07-16

repoman - 2.3.10
Ebuild name:

app-portage/repoman-2.3.10

Description

Repoman is a Quality Assurance tool for Gentoo ebuilds

Added to portage

2018-07-16

robot - 1.4.1
Ebuild name:

ros-meta/robot-1.4.1

Description

Metapackage which extends ros_base and includes ROS libaries for any robot har

Added to portage

2018-07-16

ros_base - 1.4.1
Ebuild name:

ros-meta/ros_base-1.4.1

Description

Metapackage which extends ros_core and includes other basic non-robot tools

Added to portage

2018-07-16

ros_core - 1.4.1
Ebuild name:

ros-meta/ros_core-1.4.1

Description

Metapackage to aggregate the packages required to use core ROS concepts

Added to portage

2018-07-16

rpm - 4.14.1-r1
Ebuild name:

app-arch/rpm-4.14.1-r1

Description

Red Hat Package Management Utils

Added to portage

2018-07-16

ruby - 2.4.4-r1
Ebuild name:

dev-lang/ruby-2.4.4-r1

Description

An object-oriented scripting language

Added to portage

2018-07-16

ruby - 2.5.1-r1
Ebuild name:

dev-lang/ruby-2.5.1-r1

Description

An object-oriented scripting language

Added to portage

2018-07-16

rubygems - 2.7.6-r1
Ebuild name:

dev-ruby/rubygems-2.7.6-r1

Description

Centralized Ruby extension management system

Added to portage

2018-07-16

rubygems - 2.7.7-r1
Ebuild name:

dev-ruby/rubygems-2.7.7-r1

Description

Centralized Ruby extension management system

Added to portage

2018-07-16

signal-desktop-bin - 1.14.1
Ebuild name:

net-im/signal-desktop-bin-1.14.1

Description

Allows you to send and receive messages of Signal Messenger on you

Added to portage

2018-07-16

simulators - 1.4.1
Ebuild name:

ros-meta/simulators-1.4.1

Description

Metapackage for ROS simulation packages

Added to portage

2018-07-16

sound_play - 0.3.3
Ebuild name:

dev-ros/sound_play-0.3.3

Description

ROS node that translates commands on a ROS topic (robotsound) into sounds

Added to portage

2018-07-16

telegram-desktop-bin - 1.3.10
Ebuild name:

net-im/telegram-desktop-bin-1.3.10

Description

Official desktop client for Telegram (binary package)

Added to portage

2018-07-16

twisted - 18.7.0
Ebuild name:

dev-python/twisted-18.7.0

Description

An asynchronous networking framework written in Python

Added to portage

2018-07-16

uglifier - 4.1.15
Ebuild name:

dev-ruby/uglifier-4.1.15

Description

Ruby wrapper for UglifyJS JavaScript compressor

Added to portage

2018-07-16

uqm - 0.7.0.1
Ebuild name:

games-strategy/uqm-0.7.0.1

Description

The Ur-Quan Masters Port of Star Control 2

Added to portage

2018-07-16

uranium - 3.4.1
Ebuild name:

dev-python/uranium-3.4.1

Description

A Python framework for building 3D printing related applications

Added to portage

2018-07-16

virtualbox - 5.2.14-r1
Ebuild name:

app-emulation/virtualbox-5.2.14-r1

Description

Family of powerful x86 virtualization products for enterprise an

Added to portage

2018-07-16

viz - 1.4.1
Ebuild name:

ros-meta/viz-1.4.1

Description

Metapackage for ROS visualization packages

Added to portage

2018-07-16

websocketpp - 0.8.1
Ebuild name:

dev-cpp/websocketpp-0.8.1

Description

C++/Boost Asio based websocket client/server library

Added to portage

2018-07-16

whois - 5.3.2
Ebuild name:

net-misc/whois-5.3.2

Description

improved Whois Client

Added to portage

2018-07-16

yabause - 0.9.15
Ebuild name:

games-emulation/yabause-0.9.15

Description

A Sega Saturn emulator

Added to portage

2018-07-16

znc - 1.7.1_rc1
Ebuild name:

net-irc/znc-1.7.1_rc1

Description

An advanced IRC Bouncer

Added to portage

2018-07-16

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: 70.3 ms