LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-01-2002, 07:40 PM   #1
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Rep: Reputation: 30
speed ur harddrive


this is a txt file got it from a friend on www.linux-egypt.com


it may help
:

/===================================\
| Speeding Up Your Linux Partitions |
| By Craig Keough |
| With a few notes by R a v e N |
| http://blacksun.box.sk |
\===================================/

So, you installed LINUX and the speed is not what you heard it was. Am I correct ?
The default installation of any distribution is designed to work on a broad range of computer setups and therefore has minimal optimizations (Same as Windows9x by the way).
Freshly-installed boxes come with a default kernel and default settings, which are supposed to be as compatible as possible. By optimizing your settings, you can do wonders. For example: RedHat 6.2 comes with a 660k kernel, but you can easily reduce it down to somewhere around 500k, even less. This should speed up your performance greatly.
But today we're about to do something completely different.

We will begin by tweaking your hard drive for the fastest performance, so if you are using
KDE, then exit to the console. ( because of the nature of these tweaks your computer could become unstable resulting in corrupted or lost data, therefore it should be done without X-Windows running)

if you are logged in as a normal user, type su at the command prompt then enter the password.

The command we will be using is : hdparm

You can get a list of all the commands for hdparm by typing it by itself and hitting enter,

A further explanation of these commands can be obtained by typing man hdparm

The next step will be to determine what your hard drive is called, hda, hdb, etc.
If you already know GREAT otherwise :
type dmesg this will display all the information that was displayed during boot.

If you have 1 hard drive then more than likely it is called: hda
If you have 2 hard drives then more than likely it is called: hdb

Lets assume it is hda.

Now type: hdparm -I /dev/hda
This will read all sorts of information directly from the drive, telling us what it can support.
Before you use a particular tweak, make sure you check this information to make sure your drive supports it.

Do a speed test by typing: hdparm -t /dev/hda
Repeat this a few times and get a general idea of the speeds and write them down
so when we are finished you can compare the results.

I got the results of : 4.31 MB/s

Next Type in: hdparm /dev/hda
This output tells you what the defaults are set at, you will notice that I/O
support reads 16-bit, its probably not using DMA and the unmask irq is probably 0 (off),
along with multicount being disabled.
Most newer hard drives can use these settings, so we will be turning them on.

type in: hdparm -c3 -m16 /dev/hda
This will turn on multireads and turn on the 32-bit flag w/sync

Now do your speed test again, what a great improvement !!!

You may want to stop here because the next few tweaks could make your computer lock up
if they are not supported.

We need to turn DMA on by typing: hdparm -d1 /dev/hda
We can also turn on multiword DMA2 by typing hdparm -d1 -X34 /dev/hda

Set the unmask irq bit to on by typing: hdparm -u1 /dev/hda
Do: man hdparm to understand what this does.


And the last setting will be to set the PIO mode of your drive, so look at the inforamtion
from doing hdparm -I /dev/hda and see which pio modes it supports.
Type in hdparm -p4 /dev/hda
Replace 4 with the highest number supported by your drive.


Run: hdparm -t /dev/hda
At this point I got a reading of 19.43 MB/s
Which is a drastic improvement.

Now we dont want to type in these parameters every time we reboot, so we will add them to a startup script.

Change to /etc/rc.d
I simply added them to the end of the rc.local script, because It is the last script that
is executed and any fscking is done before that point.

You can combine all these settings on one line or you can put each on a separate line
if you want to make it easier to understand. Also make sure you put in a comment
saying what these settings are for so you can find them easier if you need to change them.

Example: hdparm -c3 -m16 -d1 -X34 -u1 -p4 -kK /dev/hda

PLEASE NOTE: do these things at your own risk, i am not responsible.



==============
if any one have more about this , please post it here. and if any one can tell au about the technecal stuff like: DMA and IRQ ..etc. please do that ...
guys, when i did this in my old kernel 2.4.5 it didnt work. i was asking if any of you have any recources about modefing and configuring new kernels on you your box, you know what to do....
 
Old 07-01-2002, 07:42 PM   #2
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
hello again

plz every one tell us what was the speed before and after he try those steps
 
Old 07-02-2002, 08:58 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can you please not just blindly copy articles. there is a very long thread with all this information already.

http://www.linuxquestions.org/questi...s=&threadid=47
 
Old 07-02-2002, 09:54 AM   #4
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
alsalamu 3alykom

i think acid_kewpie that the article u r talking about r telling us how shall we know the speed of our hard drive

but i didn't find there how shall i speed up my hard disk


my article is about speeding up ur hard drive

which tell linux users how shall they increase the performance of there hard drives not only know there speed


if u I am wrong plz tell me
 
Old 07-02-2002, 11:42 AM   #5
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
Thanks, safrout.

This is a subject that comes up every so often on many Linux fora. It's good to see how everyone else's hard drive performs, but it's even better to get info on how to increase performance. It's not always possible to speed up a hard drive, and somethimes even dangerous or fatal to your system, but this very thing can be a way to realize better performance on an existing system, just be careful and study first !!
 
Old 07-02-2002, 12:14 PM   #6
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Don't expect any wonders. With one distro my hda goes 6,3MB/s with another one 29MB/s - the difference? You wouldn't know;hardly recognisable.
 
Old 07-02-2002, 08:38 PM   #7
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
I'm really skeptic about this entire thread....unfortunatelly I'm not any place near my Linux box....but I mean, for example, I run two UltraWide Scsi 7200rpm(unfortunately, I realy wanted the 10k Atlas), Quantum hardrives, with rate of 80meg/sec, how the hell to would you speed this up?? I mean, what software does is simply tell the hardrive what the heck the software wants to access and then the Hardrive is the one that performs the physical action of finding it, why the hell would the hardrive speed up just by typing some commands???
I mean, hardrives are small things that rotate really really fast all the time and there are only so many ways they can find data...obviously if the data is closer rotating counterclock wise the hardrive is not going to stop and rotate the contrary way...it will keep rotating the same way no matter if the other way is closer...sooo again what the hell do these commands have todo anything with making your hardrive FASTER????...really skeptical subject...

zLinuxz
 
Old 07-02-2002, 10:09 PM   #8
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
80meg/s is the burstrate not the regular speed.What hdparm does is setup the parameters for the drive like dma and all that stuff.If that is configured wrong speed goes down a lot. To see what speed you get type hdparm -t /dev/parition as root. There is a thread about a mile long somewhere here about it.
 
Old 07-03-2002, 09:14 AM   #9
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
well, that's what says on the sticker, transfer rate...
but still, it doesn't make an aweful lot of sense that typing some commands will magically make your hardrive "faster".
 
Old 07-03-2002, 10:18 AM   #10
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
It won't - it's just to setup your interface and the parameters.There are so many different transfer rates it makes your head spin.If you really want to get confused go to http://www.namesys.com and check out benchmarks; it's for different filesystems but it gives you an idea how many different ways there are to measure a thing.
 
Old 07-03-2002, 10:40 AM   #11
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
Quote:
but still, it doesn't make an aweful lot of sense that typing some commands will magically make your hardrive "faster".
That's software's job, to provide the services or instructions that cause hardware to do its job. The software instructions affect the activities or actions that hardware is capable of, but may not do by default or at all times.
 
Old 07-03-2002, 11:25 AM   #12
Sifvion
Member
 
Registered: Jan 2002
Location: Singapore
Distribution: Slackware
Posts: 250

Rep: Reputation: 30
before ant configuration
64 MB in 1.59 seconds = 40.25 MB/sec

hdparm -c3 -m16 /dev/hda
The speed remain the same
 
Old 07-03-2002, 10:14 PM   #13
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
Well, then this thread should have been called, PERHAPS speed up your PERHAPS not correctly configured hardrive ... You like that better???, than just Speed up your hardrive, as if it was a fact of life.
This is a lot more logical.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gnome Update, Mouse Speed, Overall System Speed funaroma Linux - Newbie 2 08-04-2004 10:13 PM
Installing linux on 2nd harddrive(dual boot) windows on seperate harddrive lysol Linux - Software 25 08-03-2004 09:33 AM
cdrecord - trying to use high speed medium on low speed writer captain-cat Linux - Hardware 2 07-12-2004 06:27 PM
Need to replace full harddrive with new, larger harddrive pearlr Linux - Newbie 1 01-02-2004 12:59 PM
Is there a tool to monitor Internet connection speed and also network speed? xleft4dexy Linux - Networking 4 10-14-2003 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration