All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ric Wheeler <ricwheeler@gmail.com>
To: Christian Brandt <brandtc@psi5.com>
Cc: linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Mike Snitzer <snitzer@redhat.com>
Subject: Re: swap storage alignment and stride size
Date: Wed, 08 Dec 2010 14:56:26 -0500	[thread overview]
Message-ID: <4CFFE2EA.9040909@gmail.com> (raw)
In-Reply-To: <4CFFBA7D.6060802@psi5.com>

On 12/08/2010 12:03 PM, Christian Brandt wrote:
> Preamble:
>
> Hi fellow linux tamers, the following question has bounced around for
> some days in local lists and newsgroups without conclussion and was
> escalated upstream several times, here we are...
>
> We are discussing semi-professional storage systems, e.g. ext4 on luks
> on lvm on raid on gpt-partitions on 4k sector harddrives or 512k sector
> SSDs. Usually every level profits a lot from aligning the data to the
> underlying sector/stride/chunk size, e.g. ext4 with a 128k stripe size
> will run a lot better on a well aligned 64k stride raid5.
>
> In other words, partition tables, LVM, RAID, luks and filesystems know
> how to handle and profit from aligned larger chunks.
>
> In detail:
>
> As far as we can read mm/swapfile.c linux is only concerned about cpu
> page size and does not know anything about underlying
> chunk/sector/stride sizes and alignment.
>
> Therefore we think every small 1/2/4/8kiB page-sized write access leads
> to a read-modify-write cycle for the whole chunk, taking more then twice
> as long than simply writing the whole chunk at once.
>
> Questions:
>
> Is this the right place to ask?
>
> Does or could linux swapping make use of aligning chunks?
>
> And if, how?
>
> If not, would it be an improvement?
>
> Will this effect be mostly compensated by the block elevator?
>
> Does it make any sense to change the mkswap page size to the chunk size?
> We think those are two totally different beasts and should be left
> seperated.
>
> Is Linux already aware of chunk sizes within swap?
>
> How to set up and controlled by the administrator?
>

Hi Christian,

There has been a lot of work on alignment, Martin Petersen lead most of that and 
is probably the best one to ping.

Ric



  reply	other threads:[~2010-12-08 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 17:03 swap storage alignment and stride size Christian Brandt
2010-12-08 19:56 ` Ric Wheeler [this message]
2010-12-14 20:00   ` Martin K. Petersen
2010-12-15  4:57     ` Hugh Dickins
2010-12-15 19:30       ` Martin K. Petersen
2010-12-16  0:42         ` Hugh Dickins
2010-12-16 23:46           ` Martin K. Petersen
2010-12-17  0:15           ` Christian Brandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CFFE2EA.9040909@gmail.com \
    --to=ricwheeler@gmail.com \
    --cc=brandtc@psi5.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.