--- Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> Now my questions,
> How many read/write heads does an IDE disk have (Eg a 30GB IDE Disk)
> ?
> Does having multiple swaps on one single disk enhance/degrade the
> performance ?
> Should I merge the two swaps to one single swap ?
Few things about the hard disk.
1. The data is stored in circular tracks therefore the reference to
cylinders.
2. The amount of data stored in every cylinder is the same (atleast it
used to be till not so long ago)
3. A head can only be at one place at a given time.
4. No two models (even of same manufacturer) can be assured to have the
same number of heads and cylinders.
5. The head can not exactly reach the given sector based on your
command. It makes an approximate guess and gets the data in multiple
passes depending on various criteria - this is what iis referred to as
average seek time.
Based on these assumptions and the fact that IDE and in the long run
even SCSI hard disks are not going to be there in your server /
workstation forever I would recommend the following :
1. Dont customize (even if possible) based on your hard disk geometry -
the gains if any are offset by the risks and headaches involved if you
have to replace the hard disk.
2. Since the same amount of data is stored in a lesser amount of space
(the inner circle is smaller than the outer circle) in the begining of
the hard disk the head will take longer to read data from the begining
of the hard disk than at the end of the hard disk.
3. It is recommended to keep all data which is required at boot up
(potentially these data would not be required later) towards the
begining of the hard disk.
4. All data for which seek time needs to be minimized should be kept at
the end of the hard disk. SWAP is an ideal case for this - unlike the
rest of the filesystem SWAP is never cached in memory therefore if the
OS ever needs to access this data it really needs to read it from the
hard disk.
5. It is always prefered to keep SWAP on a dedicated disk or on some
disk which is not very often read. The regular hard disk head and do
something better with the time the SWAP is being read/written to.
6. It probably makes sense to split your SWAP across multiple disks -
firstly you probably dont have a dedicated SWAP hard disk and secondly
you can have larger amount of data will lesser seek time.
7. It doesnt make sense to put SWAP on RAID or LVM as that will add a
overhead you can probably get rid off. in case of media failure just
turn off SWAP add new SWAP partition and reactivate - no downtime and
hopefully no degraded performance...
I probably rambled along too long at 2am but this probably would cover
everything you might want to think about doing with your SWAP on the
physical media.
Mithun
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi
http://www.mail-archive.com/[email protected]/