How do I improve my server disk performance

 

From http://www.ubuntu.com 

server runs rsnapshot multiple times a day to backup remote hosts. The actual incremental backup part takes very little time. The significant time is spent doing things like:-

/bin/cp -al /srv/rsnapshot/hourly.0 /srv/rsnapshot/hourly.1 

Which takes about 2 hours. I realise there are a bazillion tiny files in there.

Also when rsnapshot deletes an old backup this can take a long time:-

/bin/rm -rf /srv/rsnapshot/daily.6/

Which takes about half an hour.

My questions are as follows, configuration of server and some IO stats are detailed below. I can of course provide more debug info if necessary:-

How can I identify where the bottlenecks are?

Am I reaching the limits of what’s capable (IO wise) with this box?

Are there any performance tweaks I could make?

Should I use a different RAID level?

Would it make sense to swap two of the internal RAID disks (half of each mirror) with two ‘other halves of the other mirror’ on the external array?

Note: I’m somewhat not inclined to be doing things like compiling my own kernel. Ideally I’d like to stick on 10.04 LTS, unless there’s some magic in later versions that makes this all work a lot quicker.

Internally the server has 1x160GB SATA boot disk and 4x2TB disks:-

The four internal 2TB disks are in a software MD RAID10 setup:-

Minumum mysql memory using

 

ubuntu how to install java

This tutorial will cover the installation of

These instructions will also work on Debian and Linux Mint.

Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.

Java Version

If you have OpenJDK installed on your system it may look like this

If you have OpenJDK installed on your system, you have the wrong vendor version of Java installed for this exercise.
Completely remove the OpenJDK/JRE from the system if necessary
This will prevent system conflicts and confusion between different vendor versions of Java. For example, if you have the OpenJDK/JRE installed on your system, you can remove it by typing the following at the command line:

This command will completely remove OpenJDK/JRE from your system
Create a directory to put your Oracle Java JDK and JRE binaries in, open up a terminal and create the directory /usr/local/java

Download the Oracle Java JDK/JRE for Linux. Make sure you select the correctcompressed binaries for your system architecture 32-bit or 64-bit (which end in tar.gz).

For example, if you are on Ubuntu Linux 32-bit operating system download 32-bit Oracle Java binaries.
For example, if you are on Ubuntu Linux 64-bit operating system download 64-bit Oracle Java binaries.

Copy the Oracle Java binaries into the /usr/local/java directory
In most cases, the Oracle Java binaries are downloaded to: /home/“your_user_name”/Downloads.

32-bit Oracle Java on 32-bit Ubuntu Linux installation instructions:

Run the following commands on the downloaded Oracle Java tar.gz files. Make sure to do this as root in order to make them executable for all users on your system.
32-bit Oracle Java on 32-bit Ubuntu Linux installation instructions:

Unpack the compressed Java binaries, in the directory /usr/local/java

64-bit Oracle Java on 64-bit Ubuntu Linux installation instructions:

Double-check your directories. At this point, you should have two uncompressed binary directories in /usr/local/java for the Java JDK/JRE listed as:

Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located. This will tell the system that the new Oracle Java version is available for use.this command notifies the system that Oracle Java JRE is available for use

this command notifies the system that Oracle Java JDK is available for use

this command notifies the system that Oracle Java Web start is available for use,
Inform your Ubuntu Linux system that Oracle Java JDK/JRE must be the default Java

Note your system-wide PATH /etc/profile file will reload after reboot of your Ubuntu Linux system.
Test to see if Oracle Java was installed correctly on your system. Run the following commands and note the version of Java:

This command displays the version of java running on your system
A successful installation of 32-bit Oracle Java will display

You should receive a message which displays:

This command lets you know that you are now able to compile Java programs from the terminal.
You should receive a message which displays:
javac 1.7.0_05
A successful installation of Oracle Java 64-bit will display
java -version
This command displays the version of java running on your system
You should receive a message which displays:

 Congratulations, you just installed Oracle Java on your Linux system.

Now reboot your Ubuntu Linux system.
Afterwards, your system will be fully configured for running and developing Java programs.

Unable to resolve host -fixed

sudo: unable to resolve host PC_COMPUTER

fixed with using this command lines:

AFter it looks like:

 

Create a Good Password using Terminal

If you’re not the best at making passwords or just don’t want to make one up right off the spot, you would usually run third party applications to generate a good password for you.

Why download third party apps when you already have a password generator for you just waiting to be used in the Terminal?

To create a password:

1. Access Terminal. Username>Applications>Utilities>Terminal
2. On the line provided, write openssl rand -base64 6.
3. Terminal will generate an eight character password for you.

 

how to get hardware information on terminal

Hardware information can be quite difficult to obtain for certain components of the system. Nonetheless, having the knowledge about what hardware your computer has can be essential in avoiding system crashes by verifying minimum system requirements for games, heavy applications and the like. dmidecode is a tool that provides a description of the system’s hardware, along with other handy information such as firmware details and serial numbers. It is often the case that such information is required for obtaining or updating associated hardware and software for a computers peripheral device.

To extract details system information, open a Terminal from Applications Accessories and enter the following command:

This will display detailed system information within the terminal. Simply copy and paste the information to a word processor or text editor (optionally) to get an elaborate overview of your system.

Terminal

The available information includes the following:

BIOS information, Vendor, release date, runtime size, ROM size, ISA, PNP, PCI, AMP, ESCD, CD boot, EDD, serial service, printer service, ACPI, AGP, USB (legacy), support information, serial numbers and much more.

The information obtained from dmidecode is so detailed that it might take you up to 20-25 seconds just to scroll down the terminal window, before you reach the end of the available content.

Ways To Search For Files Using The Terminal

Today we will look at some of the common ways to search for files in Linux using the Terminal.

1) find : To search for files on the command line you can use the command “find”. The following is syntax for the “find” command:

find path criteria action

“path” – The section of the files system to search (the specific directories and all the sub directories). If nothing is specified the file system below the current directory is used.

“criteria” – The file properties.

“action” – Options that influence conditions or control the search as a whole, ie,
“–print”

 

 

2007-11-22-153941_1280x800_scrot

 

2) locate : The command “locate” is an alternative to the command “find -name”. The command find must search through the selected part of the file system, a process that can be quite slow. On the other hand, locate searches through a database previously created for this purpose (/var/lib/locatedb), making it much faster. The database is automatically created and updated daily. But change made after the update has been performed are not taken into account by locate, unless the database is updated manually using the command updatedb.

 

2007-11-22-154054_1280x800_scrot

 

3) whereis : The command “whereis” returns the binaries (option -b), manual pages (option -m), and the source code (option -s) of the specific command. If no options is used all the information is returned, if the information is available. This command is faster than “find” but is less thorough.

2007-11-22-154226_1280x800_scrot

 

4) which : The “which” command searches all paths listed in the variable PATH for the specific command and returns the full path of the command. the command is specifically useful if several version of a command exist in different directories and you want to know which version is executed when entered without specifying a path.

2007-11-22-154254_1280x800_scrot

 

5) type : The “type” command can be used to find out what kind of command is executed when command is entered – a shell built in command or an external command. The option -a delivers all instances of a command bearing this name in the file system.

2007-11-22-154354_1280x800_scrot