[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Faster swap by using separate disk?



On Wed, 15 Apr 1998 tko@westgac3.dragon.com wrote:

> Mark Phillips writes:
> > 
> > 
> > I have been wondering about whether putting a swap partition on one IDE
> > drive, while putting most of linux on a different IDE drive will speed up
> > swap by allowing both disks to be accessed at the same time.
> > 
> > Unfortunately I think I read somewhere that when you have a Master/Slave
> > IDE pair, only one of the disks can be accessed at any one time, so that
> > having the swap partition on a separate disk doesn't help.
> > 
> > However my motherboard is capable of using 4 ide devices.  It has two
> > pairs:
> > 
> > 	Primary Master/Primary Slave
> > and
> > 	Secondary Master/Secondary Slave
> > 
> > What if I put linux on one of the primary disks, and the swap partition on
> > a secondary disk, will that mean both disks can be accessed at the same
> > time, hence giving a swap speedup?
> 
> You need to think in terms of available "bandwidth". If the swap
> partition is on the same cable as the root partition, then it has to
> share the bandwidth with the other partition(s). Moving the swap
> partition to the secondary controller (where it is by itself), will
> increase available bandwidth. You can use this trick with a CDROM drive
> also.

No, there is more to it than this. If the OS send a (read, write or
whatever) command to an IDE disk, the IDE controller is 'busy' until the
command is fully completed. All this time you can not use the other disk
on the same controller at all. So, if you try to read a lot of data from
both disks simultaneously, they'll be spending a lot of time just waiting
for each other.

If you put the disks at two different controllers, you don't have this
problem.

> The second thing that you can do is to move up to the new "ultra-DMA"
> IDE drives. The bandwidth (bytes per second) is much higher than the
> standard IDE drives and will speed up Linux as a whole.

If you want to really speed up your hard drives, switch to multiple SCSI
drives. Period.

> The third thing that you can do to speed up your system is add more memory so
> that you don't even need to access the swap partition.

True, but I know from experience that if you add more RAM, you'll use it
all eventually. I have 48MB in my system nowadays and I still use the swap
partitions I have.

Remco


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: