Skip to contentSkip to conversation

Auto-striping feature

DISCUSSION Tatsuya Kawano 4 participants 6 messages Jan 25, 2011 – Jan 26, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

I have some questions about auto-striping feature in Ceph.

- What is the default striping size?
- How can I specify the striping size for a specific file (via libceph and kernel driver)?
- How many PGs will be involved on striping one file.

I'm writing several files to Ceph and the size of each file will be about 64MB. There will be 10 to 20 OSDs in the cluster. I wonder how each file will be divided into objects and how these objects will be distributed in the cluster.

Thanks,

--
Tatsuya Kawano (Mr.)
Tokyo, Japan

#1 lore raw
Quoted 6 lines · Tatsuya Kawano

Hi,

I have some questions about auto-striping feature in Ceph.

- What is the default striping size?

The default is to stripe the file across 4MB objects, 4MB at a time. You can also define your own striping strategy using cephfs. Make sure that "stripe_unit" * "stripe_count" equals "object_size".

Quoted 1 line

- How can I specify the striping size for a specific file (via libceph and kernel driver)?

In the kernel, use the cephfs tool. It lets you use ioctls to specify a single file layout or to define the default layout for newly created files in a subtree of the fs. You can't do it in cfuse, unfortunately. (Although you can set the default using the kernel client and cfuse will follow that setting correctly.) If you're writing your own application using libceph, you can also set it; use the cephfs source as a model.

Quoted 1 line

- How many PGs will be involved on striping one file.

That depends on how large the file is, and is pseudorandom.

Quoted 3 lines

I'm writing several files to Ceph and the size of each file will be about 64MB. There will be 10 to 20 OSDs in the cluster. I wonder how each file will be divided into objects and how these objects will be distributed in the cluster.

Well, the files will be divided into objects on 4MB blocks. (The last block may be short.) The objects will be distributed pseudorandomly into "placement groups" and those placement groups will be pseudorandomly distributed across the OSDs in the cluster. If you're interested in the specifics of how this works, I'd recommend reading Sage's thesis, available on the Ceph website.
-Greg

#2 lore raw
Quoted 10 lines · Gregory Farnum
Quoted 6 lines · Tatsuya Kawano

Hi,

I have some questions about auto-striping feature in Ceph.

- What is the default striping size?

The default is to stripe the file across 4MB objects, 4MB at a time. You can also define your own striping strategy using cephfs. Make sure that "stripe_unit" * "stripe_count" equals "object_size".

Actually, you just need to make sure that object_size is a multiple of stripe_unit. The striping strategy puts each stripe_unit on stripe_count consecutive objects until they reach a size of stripe_count; it then moves onto the next set of stripe_count objects. The default degenerate case has stripe_unit == object_size and stripe_count == 1.

sage

#3 lore raw
Quoted 3 lines · Sage Weil

Actually, you just need to make sure that object_size is a multiple of stripe_unit.  The striping strategy puts each stripe_unit on stripe_count consecutive objects until they reach a size of stripe_count; it then moves

Did you mean "until they reach a size of object_size"?

Quoted 2 lines

onto the next set of stripe_count objects.  The default degenerate case has stripe_unit == object_size and stripe_count == 1.

Signature · 6 lines
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
Quoted 6 lines · tsuna
Quoted 3 lines · Sage Weil

Actually, you just need to make sure that object_size is a multiple of stripe_unit.  The striping strategy puts each stripe_unit on stripe_count consecutive objects until they reach a size of stripe_count; it then moves

Did you mean "until they reach a size of object_size"?

Yeah :)

sage

Quoted 13 lines
Quoted 3 lines

onto the next set of stripe_count objects.  The default degenerate case has stripe_unit == object_size and stripe_count == 1.

Signature · 6 lines
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
In reply to Gregory Farnum

Thanks, Greg and Sage for the answers. I just started to read the Distributed Object Storage chapter of Sage's thesis as well.

--
Tatsuya Kawano (Mr.)
Tokyo, Japan

Quoted 32 lines · Gregory Farnum
Quoted 6 lines · Tatsuya Kawano

Hi,

I have some questions about auto-striping feature in Ceph.

- What is the default striping size?

The default is to stripe the file across 4MB objects, 4MB at a time. You can also define your own striping strategy using cephfs. Make sure that "stripe_unit" * "stripe_count" equals "object_size".

Quoted 1 line

- How can I specify the striping size for a specific file (via libceph and kernel driver)?

In the kernel, use the cephfs tool. It lets you use ioctls to specify a single file layout or to define the default layout for newly created files in a subtree of the fs. You can't do it in cfuse, unfortunately. (Although you can set the default using the kernel client and cfuse will follow that setting correctly.) If you're writing your own application using libceph, you can also set it; use the cephfs source as a model.

Quoted 1 line

- How many PGs will be involved on striping one file.

That depends on how large the file is, and is pseudorandom.

Quoted 3 lines

I'm writing several files to Ceph and the size of each file will be about 64MB. There will be 10 to 20 OSDs in the cluster. I wonder how each file will be divided into objects and how these objects will be distributed in the cluster.

Well, the files will be divided into objects on 4MB blocks. (The last block may be short.) The objects will be distributed pseudorandomly into "placement groups" and those placement groups will be pseudorandomly distributed across the OSDs in the cluster. If you're interested in the specifics of how this works, I'd recommend reading Sage's thesis, available on the Ceph website.
-Greg