Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

HDPARM – The Hard Drive Utility

Posted by Keith Elder | Posted in Linux, PC Software | Posted on 26-09-2000

2

“If you have an older machine, or even a newer machine with a new ATA/33 or ATA/66 hard drive, did you know that you are probably not even using it to its full capacity? It is true that most motherboard IDE chipsets are not directly supported by the Linux kernel. However, with a little tweaking, you can take full advantage of the new chipsets and even improve overall system performance.

Give me the facts
hdparm – get/set hard disk parameters

(zorka@zorka)::(zorka)
(~):hdparm -c3d1m16X66 /dev/hda

 

the above command, you will basically set the parameters on your hard drive to use the built in functions of today’s IDE chipsets that do not get setup for you when Linux is installed. Let’s say we issued the following command “hdparm -t /dev/hda”. This would benchmark our hard drive and produce the following output:

debian:~# hdparm -t /dev/hda

 

As you can see, our hard drive benchmarked a little over 14.07 MB/sec and more than likely if this machine wasn’t running any other processes while it benchmarked itself we would see much higher results, normally around 15 MB/sec for this machine.

does HDPARM do though?
Well, if you want to read about it I suggest doing a “man hdparm” to really get the full scoop. However the above command that we issued “hdparm -c3d1m16X66 /dev/hda” I will breakdown for you and give you a few more pointers. Note: Using this command can crash your machine.

Let’s take them one by one
-c3 = Query/enable (E)IDE 32-bit I/O support. Basically I have found that “-c1” will basically work with just about any board, however “-c3” tends to work better with the newer pentium/k62 chipset motherboards. I have normally seen a difference from .5-1MB in speed using “-c1” and “-c3” (c3 being faster). The values you can pass to the -c option are 0, 1, and 3.

-d1 = Disable/enable the “using_dma” flag for this drive. Of course we want this enabled to take advantage of our Ultra DMA hard drive. This one is pretty simple.

-m16 = Get/set sector count for multiple sector I/O on the drive. We have a lot of choices to use on this option: 0, 2, 4, 8, 16, and 32. There are some indications about using Western Digital hard drives even in the man page for hdparm so if you have a WD drive, please read the man page for more information as to what you should use. To date I have not been able to pass a “32” to the -m option, only “16”. In a nutshell, this feature enabled is suppose to reduce overhead of disk I/O anywhere from 30%-50%.

-X66 = Set the IDE transfer mode for newer (E)IDE/ATA2 drives. If you have a newer ATA/33 or higher hard drive, this is the option that really makes a difference and the one that can also bring your box to a grinding halt. In playing with the hdparm utility, I have crashed several machines. Most of the time it is because I told hdparm that I was running a faster drive than what I had. Example, on my Dell Latitude XPICD laptop, I issue the following command: hdparm -c1d1m16X34. . I normally get about 8MB a second after I benchmark and before I was getting 1.6MB! See what a difference it can make? I am not going to go into detail about how the “66” is derived because you really need to read the man page. However I will tell you that if you have an ATA/33 hard drive or newer you cannot go wrong using the -X66 option. On older drives or machines where you really don’t know what is in it, start with -X33 and if that works keep increasing it and pray the box doesn’t crash.

Conclusion
A lot of people are all about using the latest and greatest hardware in their machines, however, they never really take advantage of it. If your computer takes a long time to startx or to launch Netscape, then more than likely you need hdparm to come to the rescue. Another recommendation is that when you go shopping for a new motherboard, make sure the kernel supports it chipset and compile your kernel with it built in.

 

/dev/hda:
Timing buffered disk reads: 64 MB in 4.5
seconds = 14.07 MB/sec
debian:~#

 

/dev/hda:
setting 32-bit I/O support flag to 3
setting multcount to 16
setting using_dma to 1 (on)
setting xfermode to 66 (UltraDMA mode2)
multcount = 16 (on)
I/O support = 1 (32-bit)
using_dma = 1 (on)

Implementing a Scroll Mouse in X with the Logitech Mouseman+

Posted by Keith Elder | Posted in Computer Hardware, Linux, PC Software | Posted on 25-09-2000

0

Edit your .Xdefaults and paste the following text:

 

!## NETSCAPE
Netscape*drawingArea.translations: #replace
: ArmLink()
: ArmLink()
~Shift: ActivateLink()
~Shift: ActivateLink(new-window)
DisarmLink()
Shift: ActivateLink(save-only)
DisarmLink()
Shift: ActivateLink(save-only)
DisarmLink()
: DisarmLinkIfMoved()
: DisarmLinkIfMoved()
: DisarmLinkIfMoved()
: DescribeLink()
: xfeDoPopup()
: ActivatePopup()
Ctrl: PageUp()
Ctrl: PageDown()
Shift: LineUp()
Shift: LineDown()
None: LineUp()LineUp()LineUp()LineUp()LineUp()LineUp()
None: LineDown()LineDown()LineDown()LineDown()LineDown()LineDown()
Netscape*globalNonTextTranslations: #override
Shift: LineUp()
Shift: LineDown()
None:LineUp()LineUp()LineUp()LineUp()LineUp()LineUp()
None:LineDown()LineDown()LineDown()LineDown()LineDown()LineDown()
Netscape*toolBar.destinations.isEnabled: false
Netscape*toolBar.myshopping.isEnabled: false
Netscape*toolBar.search.isEnabled: false
Netscape*toolBar.viewSecurity.isEnabled:
false

1200
ZAxisMapping 4 5
EndSection

This should take care of it. Simply restart your XServer and give it a try. NOTE: For some reson Netscape will stop working after a little while, the reason is unknown at this point

It’s Gimp Time!

Posted by Keith Elder | Posted in PC Software | Posted on 31-07-2000

0

Today was deemed creativity day. Since I don’t get to express myself in my music much these days I have resorted to graphics. Just another way to share all of this goodness inside. You will notice on the top left of the page that I broke down and finally made a logo for the site. I was also cruising Intersted1’s home page and found a screen shot of a desktop background he made, so I of course had to make one to, you can view my latest desktop creation HERE. I could say that “…it is a reflection of my inner soul” but for those that know me would laugh their butt off, however the truth of the matter is I had no idea where I was going when I started, just knew that THE GIMP could get me there.

VncViewer & VncServer

Posted by Keith Elder | Posted in Open Source, PC Software | Posted on 29-07-2000

0

I have been playing with a couple of new apps for quite awhile but thought I would share it with the rest of you. VNC is a an open source package that allows one to display a remote Linux, Windows (and other platforms) to their local workstation. Example, you want get to your desktop at the office but are at home. Simple, start vncserver on the workstation in the office and then run vncviewer on your PC at home. You can then control your PC in the office. This is not a new concept but if you have several hundred dollars I am sure that Symantec won’t mind taking your money for PCAnywhere that only runs on Windows.

Although this package works on both Linux and Windows, Linux is the preferred method of running the application since X-Windows was built to run remote applications anywhere anyway. Although I don’t have enough room here to go into detail about setup, installation, etc. it is something work checking out. Here is a screen shot of me using my PC workstation and then also controlling my laptop’s desktop accross the lan. Oh, and by the way don’t ever run the window manager Enlightenment with VNC, bad things will happen.