Re: swap file vs. swap partition

From: Damian Menscher (menscher_at_uiuc.edu)
Date: 07/30/05

  • Next message: beartooth: "Can FC4.ppc be installed on an iBook withOUT OSX??"
    Date: Sat, 30 Jul 2005 14:02:48 -0500 (CDT)
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    On Sat, 30 Jul 2005, Peter Arremann wrote:
    > On Saturday 30 July 2005 13:06, Mathieu Chouquet-Stringer wrote:
    >> menscher@uiuc.edu (Damian Menscher) writes:
    >>> A swap partition would be faster (think about it -- no filesystem
    >>> overhead).
    >>
    >> Not true anymore. There is no overhead for a swap file compared to a swap
    >> partition:
    >
    > Was just going to post that link... Yes, there is no performance difference on
    > a block by block base between partition and file... but there is still one
    > good performance reason to use swap partitions - you can put them in the
    > fastest region of the disk. Look at this graph
    > http://www.tomshardware.com/storage/20050606/toshiba-05.html#data_transfer_graph
    > (just an example, you can usually easily find similar graphs for your drive
    > type).
    > You see, if you place the swap partition at the end of the disk, you'll get
    > like 40% less performance than if it is at the beginning. With a individual
    > partition you can control this - with a filesystem (if its larger, i.e. if
    > you only make one large / partition) you can't really determine the location
    > of your swap file...

    Interesting link, though the graph is labeled so poorly it's not clear
    what it even is supposed to mean. I'm not convinced you interpreted it
    correctly.

    I used to think the data transfer rate would be faster on the outer
    cylinders, but then I benchmarked it. There's no difference on the
    disks I checked (18G scsi disks). Oh, and keep in mind that the
    relevant factor is seek speed, not data transfer speed, if you're using
    your disk as RAM. Don't forget that the R stands for Random.

    (I did this for a project several months ago where I was adding 64 gig
    of swap space -- 8 gig on each of 8 drives.)

    Damian Menscher

    -- 
    -=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
    -=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc:(217)333-0038 |#=-
    -=#| 4602 Beckman, VMIL/MS, Imaging Technology Group:(217)244-3074 |#=-
    -=#| <menscher@uiuc.edu> www.uiuc.edu/~menscher/ Fax:(217)333-9819 |#=-
    -=#| The above opinions are not necessarily those of my employers. |#=-
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: beartooth: "Can FC4.ppc be installed on an iBook withOUT OSX??"

    Relevant Pages

    • Re: Page fault, GEOM problem??
      ... > filesystems so the swap has to be enabled. ... > As to why you can write kernel core dumps only to certain devices the ... > check is performed whether the driver for the disk you want to dump on ...
      (freebsd-stable)
    • Re: dynamic allocation of swap disk space
      ... Increasing swap can allow more physical RAM to be used for ... > caching data from disk. ...
      (Linux-Kernel)
    • Re: Problem with adding more swap !
      ... > slices on the one disk for FreeBSD instead of having another ... > you figure swap size needs by memory size. ...
      (freebsd-questions)
    • Re: [PATCH] mm: yield during swap prefetching
      ... What exactly makes the disk accesses noticeable? ... accesses themselves consume noticeable amounts of CPU time? ... I "solved" this by putting swap on floppy at ...
      (Linux-Kernel)
    • Re: small hdd install
      ... That sounds like plenty of swap for those services unless you plan to ... On my home gateway, I've got a mail server, news ... If the auto-assign is just setting up the first disk, ... auto-create the usual partitions on the first disk, ...
      (comp.unix.bsd.freebsd.misc)