Friday, February 22, 2013

Speed up Ubuntu Linux with Swap Fine Tuning

Swapping is designed for Low memory systems. Now a days plenty of RAM space available. RAM is much faster than HDD. Swap uses Hard disk space as virtual RAM. If you reduce the usage of HDD and increase the usage of RAM will boot the performance of your system.

The parameter named  swappiness  controls the tendency of the kernel to move processes out of physical memory and onto the swap disk.

  • swappiness can have a value of between 0 and 100
  • swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
  • swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache 
The default value of swappiness  in Ubuntu is swappiness=60.
 Reducing the default value of swappiness will probably improve overall performance for a typical Ubuntu desktop installation.
For Desktop users A value of swappiness=10 is recommended.
For Server , it is better to use swappiness=60

How to Check swappiness value
Open a terminal and type the following command
$ cat /proc/sys/vm/swappiness
How to temporarily change the swappiness value
$  sudo sysctl vm.swappiness=10

 How to permanently change the swappiness value
$ gksudo gedit /etc/sysctl.conf

change the  value of
vm.swappiness = 10

No rebooting required

Thursday, February 21, 2013

How to Test the reliability and Speed of your DNS in Ubuntu / Debian Linux

This post will help you to find the reliability and speed of DNS servers .
You need a simple utility traceroute.

how to install traceroute

$ sudo apt-get install traceroute

Now Run the following Command for testing google dns

$  sudo traceroute -n -w 2 -q 2 -m 30


shibu@keralalinux:~$ sudo traceroute -n -w 2 -q 2 -m 30
traceroute to (, 30 hops max, 60 byte packets
 1  1.656 ms  2.233 ms
 2  25.909 ms  28.264 ms
 3  30.771 ms  33.141 ms
 4  79.373 ms  81.546 ms
 5  78.806 ms  81.854 ms
 6  89.617 ms  92.429 ms
 7  88.498 ms  91.208 ms 

If the last line of the output does not list as the final hop, or if there are significant timeouts, there may be a network problem preventing you from contacting DNS servers.

The following command can also use for testing the DNS

$ dig @


shibu@keralalinux:~$ dig @

; <<>> DiG 9.8.1-P1 <<>> @
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 31859="" br="" id:="" noerror="" opcode:="" query="" status:="">;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;        IN    A

;; ANSWER SECTION:    812    IN    CNAME        3352    IN    A

;; Query time: 63 msec
;; WHEN: Thu Feb 21 00:20:51 2013
;; MSG SIZE  rcvd: 63

Wednesday, February 20, 2013

How to setup Fast and Reliable Public DNS for Ubuntu Linux

Fast and Free Public DNS Servers are available. It will increase the browsing speed.

The Google Public DNS IP addresses (IPv4) are as follows:
Open DNS Ip Addresses(IPV4) are as follows

  1. Edit /etc/resolv.conf:

    $ sudo vi /etc/resolv.conf

  2. Replace the nameserver lines with, or add, the following lines: For IPv4:
  3. Save and exit.

Tuesday, February 12, 2013

How to unzip a .bz2 file with tar command in Ubuntu Linux

How to unzip a .bz2 file with tar command in Ubuntu Linux

You can easily unzip .tar.bz2 files using command line

    tar -xvjpf filename.tar.bz2


 You can use bunzip2 for unziping and usr normal tar command

This command will only work if you have already bunzip2 installed.

    bunzip2 filename.bz2