Difference between revisions of "Centos-optimization"

From Bashlinux
Jump to: navigation, search
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
= Disk optimizations =
+
= CentOS Optimizations =
  +
== Disk ==
In order to speedup the disk management, some values are added to each `ext3` partition on the terminal. The reference site is located at [http://wiki.centos.org/HowTos/Disk_Optimization]
+
In order to speedup the disk management, some values are added to each `ext3` partition on the terminal.
  +
The reference site is located at [http://wiki.centos.org/HowTos/Disk_Optimization]
 
 
 
<pre><nowiki>
 
<pre><nowiki>
Line 13: Line 15:
   
   
=== noatime ===
+
==== noatime ====
 
Don't write access time
 
Don't write access time
   
=== data=writeback ===
+
==== data=writeback ====
 
The data order is not preserved when writes to disk. just after set this value and before restart the terminal run the following command to avoid goes into read-only mode.
 
The data order is not preserved when writes to disk. just after set this value and before restart the terminal run the following command to avoid goes into read-only mode.
 
 
Line 24: Line 26:
   
   
=== commit=120 ===
+
==== commit=120 ====
 
Set the time to sync data and metadata.
 
Set the time to sync data and metadata.
   
Line 36: Line 38:
 
to increase ''Maximum shared segment''.
 
to increase ''Maximum shared segment''.
   
= Boot optimizations =
+
== Boot optimizations ==
 
Reduce boot time passing the known values to the kernel, the site that references this optimizations can be found at [http://free-electrons.com/doc/embedded_linux_optimizations/img0.html]
 
Reduce boot time passing the known values to the kernel, the site that references this optimizations can be found at [http://free-electrons.com/doc/embedded_linux_optimizations/img0.html]
 
 
Line 61: Line 63:
   
   
=== lpj ===
+
==== lpj ====
 
Loops per jiffy can be obtained from `/var/log/messages`
 
Loops per jiffy can be obtained from `/var/log/messages`
   
=== reboot=soft ===
+
==== reboot=soft ====
 
When reboots, the firmware will be skipped.
 
When reboots, the firmware will be skipped.
   
=== quiet ===
+
==== quiet ====
 
Doesn't log all the boot messages to the `stdout`
 
Doesn't log all the boot messages to the `stdout`

Revision as of 06:27, 3 February 2010

CentOS Optimizations

Disk

In order to speedup the disk management, some values are added to each `ext3` partition on the terminal. The reference site is located at [1]

 LABEL=/                 /                       ext3    defaults,noatime,data=writeback,commit=120        1 1
 tmpfs                   /dev/shm                tmpfs   defaults        0 0
 devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
 sysfs                   /sys                    sysfs   defaults        0 0
 proc                    /proc                   proc    defaults        0 0
 /hpswap swap swap defaults 0 0
 


noatime

Don't write access time

data=writeback

The data order is not preserved when writes to disk. just after set this value and before restart the terminal run the following command to avoid goes into read-only mode.

 tune2fs -o +journal_data_writeback /dev/hda1
 


commit=120

Set the time to sync data and metadata.

System Optimizations

In `/etc/sysctl.conf` set the vualue

 kernel.shmmax = 63554432
 

to increase Maximum shared segment.

Boot optimizations

Reduce boot time passing the known values to the kernel, the site that references this optimizations can be found at [2]

 # grub.conf generated by anaconda
 #
 # Note that you do not have to rerun grub after making changes to this file
 # NOTICE:  You do not have a /boot partition.  This means that
 #          all kernel and initrd paths are relative to /, eg.
 #          root (hd0,0)
 #          kernel /boot/vmlinuz-version ro root=/dev/hda1
 #          initrd /boot/initrd-version.img
 #boot=/dev/hda
 default=0
 timeout=0
 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
 hiddenmenu
 password --md5 $1$/omJBwhD$phlKUXHDZI6BMLkNSfNgD/
 title uWink 
     root (hd0,0)
     kernel /boot/vmlinuz-2.6.18-53.el5 ro root=LABEL=/ rhgb vga=792 lpj=998235 reboot=soft quiet
     initrd /boot/initrd-2.6.18-53.el5.img
 


lpj

Loops per jiffy can be obtained from `/var/log/messages`

reboot=soft

When reboots, the firmware will be skipped.

quiet

Doesn't log all the boot messages to the `stdout`