Debian Optimization

    Debian is a very good distribution, but not always fast, with a cat instructions on how to speed it up significantly. A system with fluxbox without optimization boots in 26 seconds, with optimization in 11!
    During optimization, the system will be transferred to ext4, there will be a new kernel and packages will be collected from the source, as well as init will be replaced by upstart


    Perform all actions with a clean system, in the case of a working one, there is a risk of breaking everything! For these purposes, a netinstall image is recommended .
    When installing / boot, you need to make a separate partition, 200mb and ext2 are enough


    Should be used for this purpose recent kernel (> = 2.6.28) and collect it manually, how to do it:
    make menuconfig
    In the Processor of the type and features -> Processor family , select your CPU (my Core 2 / newer Xeon)
    The File systems modular The Extended 4 (ext4) filesystem and select Ext4 extended attributes
    Finish the configuration, proceed with the assembly: Where append can be replaced with any of your words. To avoid problems with the modules, it is recommended to connect the sidux repository , for this, in /etc/apt/sources.list:
    make-kpkg --initrd --append-to-version="-append" kernel_image kernel_headers
    dpkg -i ../linux*.deb

    deb sid main contrib non-free fix.main fix.contrib fix.non-free
    deb-src sid main contrib non-free fix.main fix.contrib fix.non-free

    Translation to ext4

    To get started, download partdemagic livecd or liveusb, boot from disk.
    To transfer fs to ext4 (do not translate / boot to ext4!) You need to: Where sdXX is the desired partition, enter fdisk -l to view the list of partitions. For our system to boot, do: nano, since it is built into the boot disk. sdYY is the root partition. In the file that opens, in the sections where ext4 became me ext3 to ext4 If you transferred / to ext4, then in /media/sdYY/boot/grub/menu.lst we will add rootfstype = ext4 to the kernel line of our kernel and also # kopt = to the line the most. Now you can with good conscience reboot into the system with ext4
    tune2fs -O extents,uninit_bg,dir_index /dev/sdXX
    fsck -pf /dev/sdXX

    mount -a
    nano /media/sdYY/etc/fstab


    This is a program thanks to which you can install packages from source codes, enter aptitude install apt-build for installation , after installation you will be prompted to select your processor, on the Internet you can find additional parameters for your processor, my settings file ( / etc / apt / apt- build.conf ): To begin with, we will rebuild the already installed packages, for this: The last was done so that when updating the collected packages would not be replaced by packages from the repository. To rebuild everything, we enter apt-build world and when it says that for some program there are no sources, we remove it from /etc/apt/apt-build.list Later, install packages through apt-build installbuild-dir = /var/cache/apt-build/build
    repository-dir = /var/cache/apt-build/repository
    Olevel = -O2
    mtune = -mtune=core2
    options = "-pipe -fomit-frame-pointer"
    make_options = "-j4 "

    dpkg --get-selections | awk '{if ($2 == "install") print $1}' > /etc/apt/apt-build.list
    echo "Package: *
    Pin: release o=apt-build
    Pin-Priority: 990" >> /etc/apt/preference

    , updated via apt-build upgrade , more information in man apt-build

    Replacing init with upstart

    upstart is faster than init, to replace, connect the repository with experimental and enter: Post on
    echo "Package: *
    Pin: release o=experimental
    Pin-Priority: 101" >> /etc/apt/preference
    apt-build install upstart

    Also popular now: