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

Re: New HD advice



Mike <mikewk147@comcast.net> writes:

> John Summerfield wrote:
> 
> > Mike wrote:
> >
> >>
> >>
> >> David Baron wrote:
> >>
> >>> Thanks for all the good advice (obviously I am considering moving
> >>> stuff to a new drive). A few more questions:
> >>>
> >>> 1. (Might be elementary, not matter, but ) what is best, place
> >>> files on partition and mount to the target directory or
> >>> directory(ies!!) on the partition and mount to the parent
> >>> directory?
> >>>
> >>> 2. I have smart monitor running. Got no bulletins from it--might
> >>> need to configure it differently. The old drive has less
> >>> smart-capability than the new--temperature being very important!
> >>>
> >>> 3. /home, /var ... others ( /local, /usr/src)? SIze
> >>> recommendations? I recall seeing very detailed recommendations
> >>> somewhere a few months back.
> >>>
> >>> 4. Swap file vs swap partition--I did not know there was such an
> >>> alternative in linux. IF a file is better, how do I change over?
> >>> (Swap is almost never used, it seems.)
> >>>
> >>>
> >> A word about swap space.
> >>
> >> Although you can create swap space as a file, instead of the kernel
> >> handling a raw partition to swap, all swapping must go through the
> >> file system, which slows swapping considerably.
> >
> >
> >
> > Not so in 2.6.
> 
> What do you mean by that?  I will give you that the VMM is much better
> in 2.6.  But what's "Not so in 2.6?"
> 
> >
> > This doesn't address this particular issue, but it does explain why
> > it might be so:
> > http://www.osdl.org/docs/linux_journaling_filesystems_and_workloads.pdf
> >
> > I found it looking for a comparison of filesystems; that's about page 28.
> >
> >> Ideally, you would always want swap as a partition.
> >
> >
> > I do not believe that is so on single-drive systems. Consider the
> > amount of time seeking between data and swap paritions, I can't see
> > how any optimisations can overcome the laws of physics.
> 
> What laws of physics pertain to the issue of swap being a file versus
> swap being a partition?  It really doesn't matter which type of file
> system you use.  One may be faster that the other.  One may be better
> for recovering from a system crash.   One may be  better for logical
> volume management.  But none are faster than the kernel using a
> partition for swap in raw mode.  That's why AIX, Solaris, HPUX and
> Linux, by default, use swap partitions, not files.
> >
> >> With that said, if you have 2 disks, it's important to have them
> >> both installed as IDE primaries, never having two disks on the same
> >> IDE channel as primary and secondary.  The idea is that your system
> >> can read/write to the two primaries at the same time, whereas with
> >> a primary and secondary setup, the read/write must alternate
> >> between the primary and secondary.
> >>
> >> Now, if you have your two disks installed and IDE primaries, and
> >> you create a swap partition on both disks, and both disks are set
> >> to the same priority, say 1, then the net effect is that when
> >> swapping occurs, data is written to both swap areas interleaved.
> >> This is the fastest way of handling swap space.
> >
> >
> >
> > NO NO NO.
> > best place for swap, least-used drive.
> > Best parition - busiest.
> 
> Give more of an explanation than this.  I suppose that setting a
> single disk to be used solely for a swap partition would be good
> although a bit impractical.

If I thought it'd help, I'd add an ancient seagate 4.5GB 10krpm SCSI
drive for $9 plus whatever centrix-intl is charging for shipping.  I
could use most of the drive for swap and reserve 1-2G for assembly of
cd-rom images.

Swap is really slow compared to memory.  It is nice to have for
dormant program storage, in which case the slowness isn't much of an
issue.  If you are actively bringing stuff in and out of swap, it is
time for more memory.


-- 
Johan KULLSTAM



Reply to: