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 8.8.8.8

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

output

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



If the last line of the output does not list 8.8.8.8 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 @8.8.8.8 www.google.com.

output

shibu@keralalinux:~$ dig @8.8.8.8 www.depika.com

; <<>> DiG 9.8.1-P1 <<>> @8.8.8.8 www.depika.com
; (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

;; QUESTION SECTION:
;www.depika.com.        IN    A

;; ANSWER SECTION:
www.deepika.com.    812    IN    CNAME    depika.com.
depika.com.        3352    IN    A    72.167.142.113

;; Query time: 63 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; 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:
  • 8.8.8.8
  • 8.8.4.4
Open DNS Ip Addresses(IPV4) are as follows

   208.67.222.222
   208.67.220.220

  1. Edit /etc/resolv.conf:

    $ sudo vi /etc/resolv.conf

     
  2. Replace the nameserver lines with, or add, the following lines: For IPv4:
    nameserver 8.8.8.8
    nameserver 8.8.4.4
  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

Or

 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