iXBT Labs - Computer Hardware in Detail

Platform

Video

Multimedia

Mobile

Other

Disk system optimization



In this article we will try to help you solve problems such as how to create an optimal system with the soft and hardware you have. For that we will consider disk system performance: the connection of hard disks and CD/DVD drives, drivers of IDE controllers, size and location of a swap file etc etc.

IDE-interface

Hardware connection

The majority of modern computers have a disc system based on IDE-interface (ATAPI). A typical motherboard has 2 channels of an IDE controller: primary and secondary. Each channel has its own connector on the motherboard and its own cable. One of the IDE devices, that can be connected to the cable, works in the master mode, the other in the slave mode; these modes can be set on the drive with the help of jumpers.

How do 2 devices, connected though one pipeline cable, work?

Unfortunately, the IDE-protocol doesn't allow 2 drives to work independently. The cause isn't even a single pipeline cable. The matter is that the IDE-protocol doesn't allow the second drive to work until the command of the first drive isn't completed. For example, the HDD receives a command to read a sector. Then the heads start to move to the required sector; this takes some time. While it's being implemented, the second drive isn't accessible. But this problem is not so terrible, as the following: an HDD and a CD-ROM are connected through one pipeline cable. It's much worse, since a CD-ROM is much slower.

Conclusion: let your devices have separate pipeline cables, connected to different controllers. If you have 2 devices, it's OK; but in case of more, what to do?

  • The first case: 2 HDDs, CD/DVD-ROM. You'd better let the main (system) HDD alone. In most cases it's the best way out. But if you work a lot with CD/DVD (i.e. often listen to MP3), you should let CD/DVD be alone: it won't prevent work implementation of your HDDs.
  • The second case: CD-R/-RW/DVD-ROM. First, define the disc from which you are going to make records on the drive. If you write from CD-ROM to CD-R, then, set them on the different controllers. Though, it's not important if your CD-R drive has a large buffer.

A bit later we'll consider how to to organize several HDDs for the highest performance.

Slave or master?

Each IDE-device has a switch for master/slave modes. And the IDE-devices which are on the one pipeline, must have different modes. What drive should work in master/slave mode doesn't matter. Put the jumpers/swithes in the position which is more logic for your OS. If you've got 2 drives, and one of them is more than 5 years, you should never set it as a master. It won't tell upon the performance, but it might cause a problem of compatibility. Besides, if you've set 2 drives, which can read CDs, on one controller, you won't be able to boot the system from your slave drive. Although, this problem has been solved for the latest motherboards.

What drive should be connected to the middle plug and what to the end plug?

It doesn't matter much. The cable should not be strained or bent, it should hang free. Such unnecessary deformation might cause a damage of the cable and loss of a contact. See to it that the plug is firmly connected. This might lead to data loss.

Bus Mastering drivers

Another important aspect of this disc system is a driver of the controller. The work of this driver influences system performance.

At the present time there are 2 modes of disc, driver and controller work. The first one is "standard" for old devices (all devices must support it) - PIO mode (Programmed Input/Output). In this mode a CPU is used for data transmission between an HDD and a system. This mode works with all IDE controllers. The second mode, a new one, is Bus Mastering (DMA/UDMA), where data are transmitted without a CPU involved. The mode both leaves a CPU free (it's important for multitask systems) and doesn't establish any restrictions on data rate. For example, in my case, in Windows NT4.0 and Windows 2000 the driver in PIO mode on Celeron 333A, BX couldn't provide data rate more than 5 MBytes/s from any out of 3 modern discs (Quantum 10 GBytes, Seagate 6 GBytes and Seagate Barracuda 30 GBytes). In Bus Mastering mode, Seagate Barracuda shows 10 - 15 MBytes/s, and the other - 7 - 10 MBytes/s. Besides, in PIO mode the CPU load constitutes 100%, and in Bus Mastering mode - only 20%.

Fortunately, all motherboards beginning from the Pentium period support Bus Mastering (further - BM). The only problem left is a correct usage of this mode.

Windows 98/Windows ME

Modern computers based on these OS have already got the drivers working in BM mode (especially Windows ME). You can check it in your system manager. If you have got a mainboard based on an Intel chipset with the words "Bus Master" in the system manager, it means that the required drivers are already installed. If you've got a VIA chipset and the system manager contains the word "VIA", it means OK. In case of a standard IDE driver, you should renew the drivers. Windows 95 users have to look for the drivers, since the system lacks for standard BM drivers.

Now, let's make sure that the devices work in this mode. So, in the system manager you have to set "DMA" mode for all HDDs and CD/DVD drives in "Settings" submenu. Different systems have different default parameters. So, you'd better check whether all devices work in the required mode.

Windows 2000

This system has Bus Mastering drivers and uses them. All you can do is to assure that the device uses this mode. For example, some CD-ROMs set PIO mode when being installed. What you have to do is to check the settings of ATA/ATAPI controllers (Primary/Secondary IDE channel) and a working mode in the system manager.

Windows NT4.0

The users of this OS may have difficulty in setting this mode. The standard drivers for NT systems with SP3 and higher have BM support for Intel PIIX3 and higher controllers (for i430/i440). Unfortunately, the drives don't work, since they can't define this mode automatically. The program ConfigNT will help you to define the currant mode. In case the BM mode doesn't work, you can set it manually in this program (only for Intel i430/i440 chipsets), or you can install drivers with BM support.

Users of other chipsets (i.e. VIA or Intel i8xx) have to install special drivers with Bus Mastering support.

  • Attention 1: Your system might fail to boot and it would be difficult to recover. In this case you should create a system disk (rdisk /s command). Although, I have never heard about such failures. If the driver can't find a BM, your system will boot with the previous settings.
  • Attention 2: Notice, that old BM drivers under NT4.0 (i.e. from Triones, or even Intel) can't work with discs of more than 8 GBytes. Otherwise, it might cause errors. The data which are located higher 8 GBytes might be deleted. We recommend you to use drivers that were produced later than 1999, and for Intel chipsets - a version 4 and higher.

Other OS

Fortunately, other modern systems (Linux, FreeBSD, BeOS etc) have better Bus Mastering support. Their standard drivers have Bus Mastering support for almost all Intel controllers (and some for VIA). The Unix users, for example, can make sure if they watch the messages of the booting driver. BeOS switches this mode automatically. Unfortunately, there might appear some problems with IDE controllers (motherboards) of other manufacturers. In this case you have to solve the problem yourselves.

For the latest Bus Mastering drivers for all wide-spread chipsets refer there.

Virtual memory settings

All up-to-date OS use a virtual memory (it's a swap-file). The main parameter of it is a size of a swap file(s).

  • Windows 95/98/ME has a dynamic file of the virtual memory with a changing size. Though you may set minimum and maximum sizes manually. If you set the min. size of 200 - 300 MBytes (the max. is not less than 500 MBytes), you'd save the system from unnecessary manipulation on dynamic changes of the file size. Moreover, if after that you defragment your disc, the performance will arise.
  • For Windows NT4.0 and Windows 2000 a dynamic file size change is not a default setting here. A minimum size of the swap file should be something about 200 - 300 MBytes, or 500 MBytes for complex systems, i.e. publishing or graphics works. As for the maximum size, we recommend to set it about 1 GBytes.
  • The users of other OS should set the size so that the file wouldn't change it dynamically, since it decreases the performance and raises fragmentation.

It makes no sense to set the maximum possible size of a swap file. If the file stores all necessary data, then the system performance is the highest.

Where and how a swap file should be placed?

  • If you have several logical discs, place your swap file at the physical beginning of your HDD. The performance of read/write operations are higher or, at least, not worse, than in the other parts. Unfortunately, it's useless to locate the virtual memory on the other logic discs, isolating it from the OS files.
  • The more subtle problem is the virtual memory in the system of several HDDs. Place the memory out of the system partition. It will increase the performance dramatically. Many modern systems (i.e. Windows NT4.0 and Windows 2000) can use this memory on several discs, but remember that you shouldn't place even a part of the virtual memory on the physical disc where the system is located. If you've got 3 physical discs, place swap files on the non-system disks, it will even raise the performance. Notice, that a swap file mustn't be placed on the discs working in PIO mode.
  • What file system should be used for virtual memory? It doesn't matter. It might be better if a size of the cluster, which is located on the same physical disc (where a swap file is), is bigger.
  • Do not create a swap file on the partitions which are two thirds loaded. It might cause defragmentation of the file . If you haven't got a choice, first of all you should defragment the disc.

Structure of logical discs

As for the performance, it's better to make a separate disc of a relatively small size (2 - 4 GBytes) for your system. In this case, system files, the access to which is executed almost simultaneously, will be closer to each other on the physical disc. It matters significantly if you have got system discs of 10-30 GBytes. If you'd use 10-20% of the size for a system logical disc (that is about 2 GBytes), then the search time for a track of the HDD's head traveling among system files will be much less than the time spent for traveling around the whole physical disc. If you install the system of 10-20 GBytes, the system files will spread out on this disc chaotically. This may lead to difficulty in the file access.

Is it worth to divide the discs any other way? No, it isn't. Each logical disc, while used by the system, stores a lot of (up to hundreds Kb) service information. It reduces the available space. Though if you are using FAT32 (Windows98/ME offers only this file system), you shouldn't create logical discs bigger than 10 - 15 GBytes.

Conclusion

Disc systems of certain operating systems can be developed further. But each OS require its own settings for improvement. The present article touches upon only the ideas which are general for all operating systems. And maybe in future we'll consider definite problems of definite OSs.


Write a comment below. No registration needed!


Article navigation:



blog comments powered by Disqus

  Most Popular Reviews More    RSS  

AMD Phenom II X4 955, Phenom II X4 960T, Phenom II X6 1075T, and Intel Pentium G2120, Core i3-3220, Core i5-3330 Processors

Comparing old, cheap solutions from AMD with new, budget offerings from Intel.
February 1, 2013 · Processor Roundups

Inno3D GeForce GTX 670 iChill, Inno3D GeForce GTX 660 Ti Graphics Cards

A couple of mid-range adapters with original cooling systems.
January 30, 2013 · Video cards: NVIDIA GPUs

Creative Sound Blaster X-Fi Surround 5.1

An external X-Fi solution in tests.
September 9, 2008 · Sound Cards

AMD FX-8350 Processor

The first worthwhile Piledriver CPU.
September 11, 2012 · Processors: AMD

Consumed Power, Energy Consumption: Ivy Bridge vs. Sandy Bridge

Trying out the new method.
September 18, 2012 · Processors: Intel
  Latest Reviews More    RSS  

i3DSpeed, September 2013

Retested all graphics cards with the new drivers.
Oct 18, 2013 · 3Digests

i3DSpeed, August 2013

Added new benchmarks: BioShock Infinite and Metro: Last Light.
Sep 06, 2013 · 3Digests

i3DSpeed, July 2013

Added the test results of NVIDIA GeForce GTX 760 and AMD Radeon HD 7730.
Aug 05, 2013 · 3Digests

Gainward GeForce GTX 650 Ti BOOST 2GB Golden Sample Graphics Card

An excellent hybrid of GeForce GTX 650 Ti and GeForce GTX 660.
Jun 24, 2013 · Video cards: NVIDIA GPUs

i3DSpeed, May 2013

Added the test results of NVIDIA GeForce GTX 770/780.
Jun 03, 2013 · 3Digests
  Latest News More    RSS  

Platform  ·  Video  ·  Multimedia  ·  Mobile  ·  Other  ||  About us & Privacy policy  ·  Twitter  ·  Facebook


Copyright © Byrds Research & Publishing, Ltd., 1997–2011. All rights reserved.