Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Computer / Technical Issues » Operating Systems » Linux
  Linux - speed up your IDE hard drive
Pages: [1]   Go Down
  Print  
Author Topic: Linux - speed up your IDE hard drive  (Read 814 times)
Daniel Franklin
TWI Hero
**********


Karma: 3
Offline Offline

Posts: 16647


View Profile Email
Linux - speed up your IDE hard drive
« Posted: October 06, 2007, 09:48:37 AM »




Linux systems usually use conservative default IDE driver settings that could be significantly slowing down your system. By default they are set to most safe settings guaranteed to work. However you may reconfigure them to increase the read speed of your hard drive. In most cases this will not speed up serving of your website significantly, but it is nice to know that you can get the most out of your hardware.

To benchmark the read speed of your IDE drive execute the following >root@newserver [~]# hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 696 MB in 2.00 seconds = 348.00 MB/sec
Timing buffered disk reads: 60 MB in 3.00 seconds = 19.80 MB/sec

Timing buffered disk reads can be very slow. This may be as a result of high CPU load or extensive hard disk swapping. Check apache optimization section first if the read time is too slow. Now lets' see what are the Input/Output settings of your hard disk. Execute the command /sbin/hdparm -v /dev/hda

# /sbin/hdparm -v /dev/hda
/dev/hda:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 9729/255/63, sectors = 156301488, start = 0

This are the current driver settings settings. Lets see what your hard drive is capable of. Execute the command /sbin/hdparm -i /dev/hda root@cpanel [~]# /sbin/hdparm -i /dev/hda

/dev/hda:

Model=ST380011A, FwRev=3.06, SerialNo=5JV18H2Q
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:

* signifies the current active mode

Significant I/O performance increase has been reported when setting drivers to DMA, 32-bit tranfers and multisector mode. Note that the drive support DMA modes. Lets turn DMA mode on, this will speed up timing buffered read by a factor of two

#/sbin/hdparm -d1 /dev/hda
#/sbin/hdparm -c3 /dev/hda (I/O support set to 3 - turn on 32bit transfers on your first HD by typing )
#/sbin/hdparm -m16 /dev/hda (choose data transfer parameters 16 as MaxMultSect=16)
#/sbin/hdparm -a16 /dev/hda (choose read ahead setting 16 as MaxMultSect=16)

Benchmark the hard drive performance again.
root@cpanel [~]# /sbin/hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 724 MB in 2.00 seconds = 362.00 MB/sec
Timing buffered disk reads: 154 MB in 3.01 seconds = 51.16 MB/sec
  Lastly you may tweak UltraDMA settings for those who have Mode3/4 IDE controllers with EIDE or UDMA HDs. It is possible to enable the Mode3 or Mode4 PIO and UDMA. This is too risky in my opinion for a web server so we skip this part. In a sample above UDMA is already enabled.

After you reboot the server these settings that you have just applied will not be saved. You may edit /etc/rc.d/rc.local file root@cpanel [~]# pico /etc/rc.d/rc.local
and add these commands to this file. rc.local is run after all other command are already executed when linux server is started up.
Note: standard settings are guaranteed to work. If you are not sure what you are doing and you prefer stability of your system for extra speed do not apply the above commands. We have these optimized settings applied on a couple of our servers including Filesland.com and several servers for other mid to high traffic sites.

Articles Source - Free Articles
About the Author

Nick is a webmaster for Filesland software download archive

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.134 seconds with 25 queries.