On Sunday 19 October 2003 09:44, Jason Stubbs wrote:
> On Sunday 19 October 2003 09:00, Donnie Berkholz wrote:
> > On Sat, 2003-10-18 at 19:42, Spider wrote:
> > > begin quote
> > > On Sat, 18 Oct 2003 16:16:09 -0700 (PDT)
> > >
> > > Meph Istopheles <[EMAIL PROTECTED]> wrote:
> > > > I'm installing tomorrow & havn't seen it in either the install
> > > > docs or on any Web page, but is gentoo optimised with /swap in a
> > > > particular position? RH wants it at the end of a disk, I
> > > > remember mdk wants it as the second partition, etc. I'll
> > > > probably do /boot, then /, then /swap on the drive I'm installing
> > > > on...unless someone tells me otherwise.
> > >
> > > Its basically personal preference. I like to have it as second
> > > partition (Beginning of drive) but thats just me.. Theres no perfect
> > > recepie for it that I know of (since I don't know how to align it on
> > > platters to make it "optimized)
> >
> > From what I've heard, beginning of drive is best since a drive can cover
> > more area on the outside of the disc in the same amount of time rotating
> > at the same speed.
>
> I thought sector 0 was at the inside of the disk like it is on a CDROM or a
> floppy disk!? I'm not certain either, however.
You were indeed correct. Data starts from the outside on a hard drive which
means I've definately got my swap file in the wrong place. :-( More info
here:
http://www.storagereview.com/guide2000/ref/hdd/geom/tracks.html
> As to whether the middle of the disk (to reduce seek times) or the outside
> of the disk (to maximize bandwidth) is best, it would depend on how the
> kernel pages memory. If it does it in 64kb blocks or such then the middle
> is probably best as the page ins/outs would be interleaved with regular
> i/o. On the otherhand, if it pages is mbs then the outside would be best.
> Anybody know the size of a page?
After a bit of research on this, I found out that the page size is
architecture dependent and that most architectures support multiple page
sizes. What linux uses however can be found in page.h. Here's an excerpt
from /usr/src/linux/include/asm-i386/page.h:
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
For those that don't understand this, it means that the page size is 4kb.
Sooo, I would say that the best place for the swap is in the middle of the
hard drive. Think I might go and move my partitions around...
On a side note, I found in my research a site talking about compressed ram as
an alternative to (a lot of) swapping. It said on that site that it's
available in ac-sources and wolk-sources. I checked kernel.coliavis.net (??)
and didn't see it in his patch list. wolk.sourceforge.net shows a Memory
eXpansion Technology though. I'm emerge wolk-sources now to see if it's any
good.
Regards,
Jason
--
[EMAIL PROTECTED] mailing list