Results 1 to 3 of 3

Thread: Fly box fly, list of (un)coventional improvements

  1. #1
    Join Date
    Oct 2005
    Location
    Milano, Italy
    Beans
    871
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Smile Fly box fly, list of (un)coventional improvements

    Hi,

    here a list of improvements for your box.
    Be aware of the potential disaster the rm -rf command can cause to your system! (Iowan)

    Works perfect on Ubuntu Lucid and Xubuntu Oneiric; both machines in my case are very with low profile hardware; an old Laptop and "new" netbook

    Make some performance tests
    ADSL Speed
    For the ADSL connectivity go to:
    http://www.speedtest.net/
    and track down the values

    Interface environment
    Download GtkPerf for the Gnome/XFCE
    Code:
    sudo apt-get install gtkperf
    Execute:
    Code:
    gtkperf
    and track down the values (basically time)

    NOTE
    Please, for practicality of this "guide", I suggest to install gedit in order to follow the commands indicated if you are not an experienced user and if you are not in Gnome environment.
    Code:
    sudo apt-get install gedit
    1) Decrease the number of available consoles
    Edit:
    Code:
    sudo gedit /etc/default/console-setup
    Find this value:
    ACTIVE_CONSOLES="/dev/tty[1-6]"
    Replace with this value:
    ACTIVE_CONSOLES="/dev/tty[1-2]"
    Save. Exit
    Two virtual consoles are fairly enough for a personal machine.

    2) Improve system and network via sysctl.conf
    Save the original sysctl.conf
    Code:
    sudo mv /etc/sysctl.conf /etc/sysctl.conf.ORIGINAL
    Create an empty sysctl.conf
    Code:
    sudo gedit /etc/sysctl.conf
    And paste the following (in red values only for notebook/netbook):
    ##Improve system
    #Improve memory
    vm.swappiness=10

    #File/folder browsing speed
    vm.vfs_cache_pressure=50

    #Set maximum amount of memory allocated to shm to 256MB
    kernel.shmmax = 268435456

    #(default 499)
    vm.dirty_writeback_centisecs = 1500

    #(default 10)
    vm.dirty_ratio = 20

    #(default 5)
    vm.dirty_background_ratio = 10

    #(default 0)
    vm.laptop_mode = 5
    ## End improve system

    ## Improve Network and tweak broadband
    net.core.rmem_default = 524288
    net.core.rmem_max = 524288
    net.core.wmem_default = 524288
    net.core.wmem_max = 524288
    net.ipv4.tcp_wmem = 4096 87380 524288
    net.ipv4.tcp_rmem = 4096 87380 524288
    net.ipv4.tcp_mem = 524288 524288 524288
    net.ipv4.tcp_rfc1337 = 1
    net.ipv4.ip_no_pmtu_disc = 0
    net.ipv4.tcp_sack = 1
    net.ipv4.tcp_fack = 1
    net.ipv4.tcp_window_scaling = 1
    net.ipv4.tcp_timestamps = 1
    net.ipv4.tcp_ecn = 0
    net.ipv4.route.flush = 1
    ## End improve Network and tweak broadband
    Save. Exit. Load the values to the system permanently:
    Code:
    sudo sysctl -p
    3) Optimize UI and browsing experience
    Discover your hostname, type in terminal:
    Code:
    hostname
    The output will be:
    <your_host_name>
    Save your /etc/hosts file:
    Code:
    sudo mv /etc/hosts /etc/hosts.ORIGINAL
    Create a new /etc/hosts file:
    Code:
    sudo gedit /etc/hosts
    And write as follow:
    127.0.0.1 localhost <your_host_name>
    127.0.1.1 localhost <your_host_name>
    Save. Exit.

    4) Improve system with tmpfs (reduce I/O on disks)
    Reboot the system. In red extreme settings.
    Delete all temp stuff
    Code:
    sudo rm -rf /tmp
    Code:
    sudo rm -rf /var/tmp
    Code:
    sudo rm -rf /var/log
    Create new temp stuff:
    Code:
    sudo mkdir /tmp
    Code:
    sudo mkdir /var/tmp
    Code:
    sudo mkdir /var/log
    Edit /etc/fstab
    Code:
    sudo gedit /etc/fstab
    And add at the end of the file the following:
    #tmpfs
    tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
    tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0
    tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
    Save. Exit. Load tmpfs temp areas:
    Code:
    sudo mount -a
    The extreme settings are referring to the fact that if you need the history of your logs (/var/log) you will loose them at every reboot; for /var/tmp I'm not so sure that is ideal for some stuff from KDE environment and/or KDE application (some hints needed).

    5) Move Flash cache in tmpfs
    If you complete the step 4), move Flash temporary files in tmpfs.
    Close your browser, open a terminal and go to your home dir:
    Code:
    cd $HOME
    Delete Flash stuff:
    Code:
    rm -fr .macromedia
    Code:
    rm -fr .adobe
    Symlink Flash stuff:
    Code:
    sudo ln -s /tmp .macromedia
    Code:
    sudo ln -s /tmp .adobe
    Done.

    6) Firefox hotfix
    Edit/create /etc/firefox/firefoxrc file
    Code:
    sudo gedit /etc/firefox/firefoxrc
    And write as follow:
    #Set pulseaudio as audio wrapper for Firefox
    FIREFOX_DSP="padsp"
    #Fix Firefox ARGB visual (flash)
    export XLIB_SKIP_ARGB_VISUALS=1
    #Disable PANGO in Firefox
    export MOZ_DISABLE_PANGO=1
    Save. Exit. Please, if you are not using Pulseaudio system comment out the red line (#)

    7) Use OpenDNS or Google DNS with DHCP
    Edit /etc/dhcp/dhclient.conf
    Code:
    sudo gedit /etc/dhcp/dhclient.conf
    Add the following at the end of the file:
    Code:
    #OpenDNS
    #prepend domain-name-servers 208.67.222.222, 208.67.220.220;
    
    #Google DNS
    prepend domain-name-servers 8.8.8.8, 8.8.4.4;
    Save. Exit. In green the DNS choose (GoogleDNS); you can comment it and uncomment the OpenDNS one, or you can comment both of them and use your provider DNS. Reboot needed upon any DNS change in order to get them operative.

    end) Reboot the system

    At this point you can try initial performance tests and compare the results.

    Enjoy!
    Last edited by dentaku65; December 19th, 2011 at 01:07 AM. Reason: Added warning about rm -rf
    ------------------------------------------------
    yep ”short and long URL„
    http://yep.it/
    ------------------------------------------------

  2. #2
    Join Date
    Sep 2007
    Location
    Norway
    Beans
    965

    Re: Fly box fly, list of (un)coventional improvements

    It would be helpful if you said what all these changes do, so we can decide what may or may not be appropriate for our specific systems. That and the fact that making a load of fundamental system changes without knowing what it is you're doing is generally a bad idea.

    Steve.

  3. #3
    Join Date
    Oct 2005
    Location
    Milano, Italy
    Beans
    871
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: Fly box fly, list of (un)coventional improvements

    Quote Originally Posted by squaregoldfish View Post
    It would be helpful if you said what all these changes do, so we can decide what may or may not be appropriate for our specific systems. That and the fact that making a load of fundamental system changes without knowing what it is you're doing is generally a bad idea.

    Steve.
    Hi Steve,
    as I said at the beginning of the post these optimizations are basically for low profile hardware (like my machines); none of these tweaks are in a way "fundamental" for the system except for point 4) that it is a little bit "advanced"; all of them can be quickly reverted. If you need some other specs on the points exposed just ask.

    kr,
    Den
    ------------------------------------------------
    yep ”short and long URL„
    http://yep.it/
    ------------------------------------------------

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •