Friday, April 13, 2012

Speed up ubuntu



sudo sublime-text /etc/fstab


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noatime,noexec,nosuid 0       0
# / was on /dev/sda6 during installation
UUID=3ae1a70e-2ac6-46c1-a135-b981eeb76221 /               ext4    errors=remount-ro,noatime 0       1
# swap was on /dev/sda5 during installation
UUID=bf903d3c-d9cf-4807-a9bd-e71c329275aa none            swap    sw              0       0


tmpfs    /var/cache                        tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/lock                         tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/log                          tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/tmp                          tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
#tmpfs    /var/mail                         tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /run                              tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/spool/anacron                tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/spool/cron                   tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
#tmpfs    /var/spool/cups                   tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
#tmpfs    /var/spool/mail                   tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/spool/plymouth               tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /var/spool/rsyslog                tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
#tmpfs    /var/lib/php/sessions             tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0
tmpfs    /tmp                              tmpfs defaults,auto,noatime,nodiratime,nodev,nosuid,async 0 0


sudo sublime-text/etc/sysctl.conf

vm.swappiness=10
vm.vfs_cache_pressure=50
fs.inotify.max_user_watches =2097152

After modifying the file should run
sudo sysctl -p --system


Firefox


Type about:config in firefox address bar and click I'll be careful,I promise!.Right click on blank area and create a new string value called ,set its value to






  • Type about:config into the address bar
  •  layers.acceleration.force-enabled -> true
  •  gfx.webrender.all -> all
  • Type browser.cache into the Filter field
  • Set browser.cache.memory.enable to true (double click it)



  • browser.sessionhistory.max_entries 50 -> 5
  • gfx.color_management.mode -> 1
  • gfx.color_management.rendering_intent -> -1 
  • browser.display.auto_quality_min_font_size -> 6 
  • browser.cache.disk.metadata_memory_limit -> 1024
  • browser.cache.disk.preload_chunk_count ->8
  • network.dnsCacheExpiration-> 86400

  • Get rid of application with high I/O usage
    To move the cache in Firefox, in the browser type ‘about:config’,
    right-click anywhere and select
    New –> String,
    browser.cache.disk.parent_directory
    /tmp/firefox
    for a super-fast memory cache

    Close all Firefox tabs and windows, and then restart the browser



    compact firefox DB's:



    for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM;'; done
    In firefox:
    extensions.pocket.enabled;false

    CROME


    For chrome edit the icon lanch command:
    default command: /opt/google/chrome/google-chrome %U

    /usr/bin/google-chrome-stable %U --disk-cache-dir='/tmp/chrome/' --disk-cache-size=2147483647



    pedro@pedro:~$ sudo dd if=/dev/zero of=/tmp/t.img bs=4G count=1 oflag=dsync
    0+1 records in
    0+1 records out
    2147479552 bytes (2.1 GB, 2.0 GiB) copied, 5.72344 s, 375 MB/s
    pedro@pedro:~$
    
    #/after tmp as tmpfs
    pedro@pedro:~$ sudo dd if=/dev/zero of=/tmp/t.img bs=4G count=1 oflag=dsync
    [sudo] password for pedro: 
    0+1 records in
    0+1 records out
    2147479552 bytes (2.1 GB, 2.0 GiB) copied, 1.02069 s, 2.1 GB/s
    pedro@pedro:~$ 
    
    
    

    xfce4-screenshooter keyboard shortcut

    sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...