From: Eric Sandeen <sandeen@redhat.com>
To: linux-ext4@vger.kernel.org
Subject: Re: [RFC] ext4: block reservation allocation
Date: Mon, 27 Feb 2012 09:37:32 -0600 [thread overview]
Message-ID: <4F4BA33C.1050303@redhat.com> (raw)
In-Reply-To: <20120227090901.GA13953@gmail.com>
On 2/27/12 3:09 AM, Zheng Liu wrote:
> Hi list,
>
> Now, in ext4, we have multi-block allocation and delay allocation. They work
> well for most scenarios. However, in some specific scenarios, they cannot help
> us to optimize block allocation. For example, the user may want to indicate some
> file set to be allocated at the beginning of the disk because its speed in this
> position is faster than its speed at the end of disk.
I agree with Lukas - please, no.
You can play tricks with your storage to accomplish much the same thing,
by making filesystems on faster & slower devices and mounting them on
directories which your application can recognize as faster/slower.
If you want "fast" for metadata, adilger has a recipe out there for using
lvm to interleave ssd blocks with spinning blocks to get metadata to line
up on the ssd.
A filesystem-specific hack for a custom application has no place in EXT4,
IMHO, sorry.
Essentially this would move allocation decisions to userspace, and I don't
think that sounds like a good idea. If nothing else, the application shouldn't
assume that it "knows" anything at all about which regions of a filesystem may
be faster or slower...
-Eric
> I have done the following experiment. The experiment is on my own server, which
> has 16 Intel(R) Xeon(R) CPU E5620 @ 2.40GHz, 48G memory and a 1T sas disk. I
> split this disk into two partitions, one has 900G, and another has 100G. Then I
> use dd to get the speed of read/write. The result is as following.
>
> [READ]
> # dd if=/dev/sdk1 of=/dev/null bs=128k count=10000 iflag=direct
> 1310720000 bytes (1.3 GB) copied, 9.41151 s, 139 MB/s
>
> # dd if=/dev/sdk2 of=/dev/null bs=128k count=10000 iflag=direct
> 1310720000 bytes (1.3 GB) copied, 17.952 s, 73.0 MB/s
>
> [WRITE]
> # dd if=/dev/zero of=/dev/sdk1 bs=128k count=10000 oflag=direct
> 1310720000 bytes (1.3 GB) copied, 8.46005 s, 155 MB/s
>
> # dd if=/dev/zero of=/dev/sdk2 bs=128k count=10000 oflag=direct
> 1310720000 bytes (1.3 GB) copied, 15.8493 s, 82.7 MB/s
>
> So filesystem can provide a new feature to let the user to indicate a value
> for reserving some blocks from the beginning of the disk. When the user needs
> to allocate some blocks for an important file that needs to be read/write as
> quick as possible, the user can use ioctl(2) and/or other ways to notify
> filesystem to allocate these blocks in the reservation area. Thereby, the user
> can obtain the higher performance for manipulating this file set.
>
> This idea is very trivial. So any comments or suggestions are appreciated.
>
> Regards,
> Zheng
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-02-27 15:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 9:09 [RFC] ext4: block reservation allocation Zheng Liu
2012-02-27 12:00 ` Lukas Czerner
2012-02-27 13:18 ` Zheng Liu
2012-02-27 13:33 ` Lukas Czerner
2012-02-27 15:09 ` Zheng Liu
2012-02-27 15:16 ` Lukas Czerner
2012-02-27 15:24 ` Lukas Czerner
2012-02-28 3:34 ` Zheng Liu
2012-02-27 21:16 ` Andreas Dilger
2012-02-27 13:36 ` Yongqiang Yang
2012-02-27 21:11 ` Andreas Dilger
2012-02-27 15:37 ` Eric Sandeen [this message]
2012-02-27 17:44 ` Ted Ts'o
2012-02-27 22:00 ` Andreas Dilger
2012-02-28 4:05 ` Zheng Liu
2012-03-08 16:39 ` Phillip Susi
[not found] ` <CAGpXXZ+z-HVECg+EAe4-d20BkjhX7bjxaHOs2_KBbgQaJwpCHQ@mail.gmail.com>
2012-03-11 17:32 ` Phillip Susi
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=4F4BA33C.1050303@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/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.