All of lore.kernel.org
 help / color / mirror / Atom feed
* cephfs set_layout - EINVAL
@ 2013-08-09  7:44 Kasper Dieter
  2013-08-09  9:03 ` cephfs set_layout - EINVAL - solved Kasper Dieter
  0 siblings, 1 reply; 8+ messages in thread
From: Kasper Dieter @ 2013-08-09  7:44 UTC (permalink / raw)
  To: ceph-devel; +Cc: Kasper Dieter

Hi,

my goal is to set the 'object size' used in the distribution inside rados
in an equal (or similar) way between RBD and CephFS.

To set obj_size=64k in RBD I use the command:
rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16  

On cephfs set_layout '-s 65536' runs into EINVAL:
cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
Error setting layout: Invalid argument

cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
cephfs /mnt/cephfs/fio-64k/ show_layout
layout.data_pool:     3
layout.object_size:   65536
layout.stripe_unit:   65536
layout.stripe_count:  1

The man page of cephfs says
---snip---
       -u --stripe_unit
              Set the size of each stripe

       -c --stripe_count
              Set the number of objects to stripe across

       -s --object_size
              Set the size of the objects to stripe across
---snip---

What is the equivalent command on cephfs to 'rbd create --order 16' ?
Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
should be used in combination to achieve different layouts on CephFS directories
(e.g. optimized for streaming, small sequential IOs, small random IOs)
?

Thanks,
-Dieter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout - EINVAL - solved
  2013-08-09  7:44 cephfs set_layout - EINVAL Kasper Dieter
@ 2013-08-09  9:03 ` Kasper Dieter
  2013-08-09 13:06   ` Yan, Zheng
  2013-08-14 20:17   ` cephfs set_layout - EINVAL - solved Gregory Farnum
  0 siblings, 2 replies; 8+ messages in thread
From: Kasper Dieter @ 2013-08-09  9:03 UTC (permalink / raw)
  To: ceph-devel; +Cc: Kasper Dieter

OK,
I found this nice page: http://ceph.com/docs/next/dev/file-striping/
which explains "--stripe_unit --stripe_count --object_size"

But still I'm not sure about
(1) what is the equivalent command on cephfs to 'rbd create --order 16' ?
(2) how to use those parameters to achieve different optimized layouts on CephFS directories
    (e.g. for streaming, small sequential IOs, small random IOs)

-Dieter

On Fri, Aug 09, 2013 at 09:44:57AM +0200, Kasper Dieter wrote:
> Hi,
> 
> my goal is to set the 'object size' used in the distribution inside rados
> in an equal (or similar) way between RBD and CephFS.
> 
> To set obj_size=64k in RBD I use the command:
> rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16  
> 
> On cephfs set_layout '-s 65536' runs into EINVAL:
> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
> Error setting layout: Invalid argument
> 
> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
> cephfs /mnt/cephfs/fio-64k/ show_layout
> layout.data_pool:     3
> layout.object_size:   65536
> layout.stripe_unit:   65536
> layout.stripe_count:  1
> 
> The man page of cephfs says
> ---snip---
>        -u --stripe_unit
>               Set the size of each stripe
> 
>        -c --stripe_count
>               Set the number of objects to stripe across
> 
>        -s --object_size
>               Set the size of the objects to stripe across
> ---snip---
> 
> What is the equivalent command on cephfs to 'rbd create --order 16' ?
> Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
> should be used in combination to achieve different layouts on CephFS directories
> (e.g. optimized for streaming, small sequential IOs, small random IOs)
> ?
> 
> Thanks,
> -Dieter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout - EINVAL - solved
  2013-08-09  9:03 ` cephfs set_layout - EINVAL - solved Kasper Dieter
@ 2013-08-09 13:06   ` Yan, Zheng
  2013-08-09 13:19     ` cephfs set_layout Kasper Dieter
  2013-08-14 20:17   ` cephfs set_layout - EINVAL - solved Gregory Farnum
  1 sibling, 1 reply; 8+ messages in thread
From: Yan, Zheng @ 2013-08-09 13:06 UTC (permalink / raw)
  To: Kasper Dieter; +Cc: ceph-devel

On Fri, Aug 9, 2013 at 5:03 PM, Kasper Dieter
<dieter.kasper@ts.fujitsu.com> wrote:
> OK,
> I found this nice page: http://ceph.com/docs/next/dev/file-striping/
> which explains "--stripe_unit --stripe_count --object_size"
>
> But still I'm not sure about
> (1) what is the equivalent command on cephfs to 'rbd create --order 16' ?

you can get/set file layout through virtual xattr. for example:

# getfattr -d -m - targetfile

> (2) how to use those parameters to achieve different optimized layouts on CephFS directories
>     (e.g. for streaming, small sequential IOs, small random IOs)
>

ceph directories are not implemented as files. you can't optimize ceph
directories by this way.

Regards
Yan, Zheng

> -Dieter
>
> On Fri, Aug 09, 2013 at 09:44:57AM +0200, Kasper Dieter wrote:
>> Hi,
>>
>> my goal is to set the 'object size' used in the distribution inside rados
>> in an equal (or similar) way between RBD and CephFS.
>>
>> To set obj_size=64k in RBD I use the command:
>> rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16
>>
>> On cephfs set_layout '-s 65536' runs into EINVAL:
>> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
>> Error setting layout: Invalid argument
>>
>> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
>> cephfs /mnt/cephfs/fio-64k/ show_layout
>> layout.data_pool:     3
>> layout.object_size:   65536
>> layout.stripe_unit:   65536
>> layout.stripe_count:  1
>>
>> The man page of cephfs says
>> ---snip---
>>        -u --stripe_unit
>>               Set the size of each stripe
>>
>>        -c --stripe_count
>>               Set the number of objects to stripe across
>>
>>        -s --object_size
>>               Set the size of the objects to stripe across
>> ---snip---
>>
>> What is the equivalent command on cephfs to 'rbd create --order 16' ?
>> Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
>> should be used in combination to achieve different layouts on CephFS directories
>> (e.g. optimized for streaming, small sequential IOs, small random IOs)
>> ?
>>
>> Thanks,
>> -Dieter
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout
  2013-08-09 13:06   ` Yan, Zheng
@ 2013-08-09 13:19     ` Kasper Dieter
  2013-08-09 15:26       ` Sage Weil
  0 siblings, 1 reply; 8+ messages in thread
From: Kasper Dieter @ 2013-08-09 13:19 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: ceph-devel

On Fri, Aug 09, 2013 at 03:06:37PM +0200, Yan, Zheng wrote:
> On Fri, Aug 9, 2013 at 5:03 PM, Kasper Dieter
> <dieter.kasper@ts.fujitsu.com> wrote:
> > OK,
> > I found this nice page: http://ceph.com/docs/next/dev/file-striping/
> > which explains "--stripe_unit --stripe_count --object_size"
> >
> > But still I'm not sure about
> > (1) what is the equivalent command on cephfs to 'rbd create --order 16' ?
> 
> you can get/set file layout through virtual xattr. for example:
> 
> # getfattr -d -m - targetfile
> 
> > (2) how to use those parameters to achieve different optimized layouts on CephFS directories
> >     (e.g. for streaming, small sequential IOs, small random IOs)
> >
> 
> ceph directories are not implemented as files. you can't optimize ceph
> directories by this way.

In my view 'Directories' in CephFS are similar to 'Volumes' in RBD.

With 'rbd create --order 16 new-volume' I can assign an object size to a volume.
With 'cephfs directory set_layout ...'  I can set similar parameters to a directory:

# mkdir /mnt/cephfs/test-dir
# cephfs /mnt/cephfs/test-dir show_layout
layout not specified

# cephfs /mnt/cephfs/test-dir set_layout -p 3 -s 4194304 -u 4194304 -c 1
# cephfs /mnt/cephfs/test-dir show_layout
layout.data_pool:     3
layout.object_size:   4194304
layout.stripe_unit:   4194304
layout.stripe_count:  1

# echo asd > /mnt/cephfs/test-dir/test-file
# cephfs /mnt/cephfs/test-dir/test-file show_layout
layout.data_pool:     3
layout.object_size:   4194304
layout.stripe_unit:   4194304
layout.stripe_count:  1

The set_layout attribute of a DIR will be inherit to the FILES below.

My question is: which combination of "--stripe_unit --stripe_count --object_size"
will be optimal for streaming, small sequential IOs, small random IOs ?
(in/below a DIR)


Best Regards,
-Dieter


> 
> Regards
> Yan, Zheng
> 
> > -Dieter
> >
> > On Fri, Aug 09, 2013 at 09:44:57AM +0200, Kasper Dieter wrote:
> >> Hi,
> >>
> >> my goal is to set the 'object size' used in the distribution inside rados
> >> in an equal (or similar) way between RBD and CephFS.
> >>
> >> To set obj_size=64k in RBD I use the command:
> >> rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16
> >>
> >> On cephfs set_layout '-s 65536' runs into EINVAL:
> >> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
> >> Error setting layout: Invalid argument
> >>
> >> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
> >> cephfs /mnt/cephfs/fio-64k/ show_layout
> >> layout.data_pool:     3
> >> layout.object_size:   65536
> >> layout.stripe_unit:   65536
> >> layout.stripe_count:  1
> >>
> >> The man page of cephfs says
> >> ---snip---
> >>        -u --stripe_unit
> >>               Set the size of each stripe
> >>
> >>        -c --stripe_count
> >>               Set the number of objects to stripe across
> >>
> >>        -s --object_size
> >>               Set the size of the objects to stripe across
> >> ---snip---
> >>
> >> What is the equivalent command on cephfs to 'rbd create --order 16' ?
> >> Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
> >> should be used in combination to achieve different layouts on CephFS directories
> >> (e.g. optimized for streaming, small sequential IOs, small random IOs)
> >> ?
> >>
> >> Thanks,
> >> -Dieter
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout
  2013-08-09 13:19     ` cephfs set_layout Kasper Dieter
@ 2013-08-09 15:26       ` Sage Weil
  0 siblings, 0 replies; 8+ messages in thread
From: Sage Weil @ 2013-08-09 15:26 UTC (permalink / raw)
  To: Kasper Dieter; +Cc: Yan, Zheng, ceph-devel

Hi Dieter,

On Fri, 9 Aug 2013, Kasper Dieter wrote:
> On Fri, Aug 09, 2013 at 03:06:37PM +0200, Yan, Zheng wrote:
> > On Fri, Aug 9, 2013 at 5:03 PM, Kasper Dieter
> > <dieter.kasper@ts.fujitsu.com> wrote:
> > > OK,
> > > I found this nice page: http://ceph.com/docs/next/dev/file-striping/
> > > which explains "--stripe_unit --stripe_count --object_size"
> > >
> > > But still I'm not sure about
> > > (1) what is the equivalent command on cephfs to 'rbd create --order 16' ?
> > 
> > you can get/set file layout through virtual xattr. for example:
> > 
> > # getfattr -d -m - targetfile
> > 
> > > (2) how to use those parameters to achieve different optimized layouts on CephFS directories
> > >     (e.g. for streaming, small sequential IOs, small random IOs)
> > >
> > 
> > ceph directories are not implemented as files. you can't optimize ceph
> > directories by this way.
> 
> In my view 'Directories' in CephFS are similar to 'Volumes' in RBD.
> 
> With 'rbd create --order 16 new-volume' I can assign an object size to a volume.
> With 'cephfs directory set_layout ...'  I can set similar parameters to a directory:
> 
> # mkdir /mnt/cephfs/test-dir
> # cephfs /mnt/cephfs/test-dir show_layout
> layout not specified
> 
> # cephfs /mnt/cephfs/test-dir set_layout -p 3 -s 4194304 -u 4194304 -c 1
> # cephfs /mnt/cephfs/test-dir show_layout
> layout.data_pool:     3
> layout.object_size:   4194304
> layout.stripe_unit:   4194304
> layout.stripe_count:  1
> 
> # echo asd > /mnt/cephfs/test-dir/test-file
> # cephfs /mnt/cephfs/test-dir/test-file show_layout
> layout.data_pool:     3
> layout.object_size:   4194304
> layout.stripe_unit:   4194304
> layout.stripe_count:  1
> 
> The set_layout attribute of a DIR will be inherit to the FILES below.
> 
> My question is: which combination of "--stripe_unit --stripe_count --object_size"
> will be optimal for streaming, small sequential IOs, small random IOs ?
> (in/below a DIR)

Just setting object_size = stripe_unit = 64K will work, except that the 
final objects will be pretty small, which is not especially efficient on 
the back end.  In that case I would do something like 

 object_size = 4M
 stripe_unit = 64K
 stripe_count = 16

so that we stripe over 16 objects until they fill up and then move on to 
the next 16.  Note that you can do the same thing with RBD now too when 
you are using librbd, but the non-trivial striping is not supported by the 
kernel client.

Yan mentioned this, but I'll reiterate: using the virtual xattrs to adjust 
these parameters is generally more convenient than the cephfs tool, and 
works both with ceph-fuse and the kernel client.  See

	ceph.git/qa/workunits/misc/layout_vxattrs.sh

to see how they are used.

sage



 > > 
> Best Regards,
> -Dieter
> 
> 
> > 
> > Regards
> > Yan, Zheng
> > 
> > > -Dieter
> > >
> > > On Fri, Aug 09, 2013 at 09:44:57AM +0200, Kasper Dieter wrote:
> > >> Hi,
> > >>
> > >> my goal is to set the 'object size' used in the distribution inside rados
> > >> in an equal (or similar) way between RBD and CephFS.
> > >>
> > >> To set obj_size=64k in RBD I use the command:
> > >> rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16
> > >>
> > >> On cephfs set_layout '-s 65536' runs into EINVAL:
> > >> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
> > >> Error setting layout: Invalid argument
> > >>
> > >> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
> > >> cephfs /mnt/cephfs/fio-64k/ show_layout
> > >> layout.data_pool:     3
> > >> layout.object_size:   65536
> > >> layout.stripe_unit:   65536
> > >> layout.stripe_count:  1
> > >>
> > >> The man page of cephfs says
> > >> ---snip---
> > >>        -u --stripe_unit
> > >>               Set the size of each stripe
> > >>
> > >>        -c --stripe_count
> > >>               Set the number of objects to stripe across
> > >>
> > >>        -s --object_size
> > >>               Set the size of the objects to stripe across
> > >> ---snip---
> > >>
> > >> What is the equivalent command on cephfs to 'rbd create --order 16' ?
> > >> Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
> > >> should be used in combination to achieve different layouts on CephFS directories
> > >> (e.g. optimized for streaming, small sequential IOs, small random IOs)
> > >> ?
> > >>
> > >> Thanks,
> > >> -Dieter
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout - EINVAL - solved
  2013-08-09  9:03 ` cephfs set_layout - EINVAL - solved Kasper Dieter
  2013-08-09 13:06   ` Yan, Zheng
@ 2013-08-14 20:17   ` Gregory Farnum
  2013-08-14 20:38     ` cephfs set_layout - tuning Kasper Dieter
  1 sibling, 1 reply; 8+ messages in thread
From: Gregory Farnum @ 2013-08-14 20:17 UTC (permalink / raw)
  To: Kasper Dieter; +Cc: ceph-devel

On Fri, Aug 9, 2013 at 2:03 AM, Kasper Dieter
<dieter.kasper@ts.fujitsu.com> wrote:
> OK,
> I found this nice page: http://ceph.com/docs/next/dev/file-striping/
> which explains "--stripe_unit --stripe_count --object_size"
>
> But still I'm not sure about
> (1) what is the equivalent command on cephfs to 'rbd create --order 16' ?

There's not a direct one; CephFS lets you specify arbitrary sizes
(--stripe-unit) while rbd restricts you to powers of two. If you want
a new file to use a 64KB object size you can just set the object_size
to be 64KB.

> (2) how to use those parameters to achieve different optimized layouts on CephFS directories
>     (e.g. for streaming, small sequential IOs, small random IOs)

If (as Yan suspects) you mean specifying how the directory is laid out
on disk, you can't — CephFS directories aren't maintained that way and
it wouldn't make any sense. If you're talking about making all the
files underneath it use a new layout, you can specify a directory
layout which is applied to all new descendent files the same way as
you specify the layout on an individual file.
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

>
> -Dieter
>
> On Fri, Aug 09, 2013 at 09:44:57AM +0200, Kasper Dieter wrote:
>> Hi,
>>
>> my goal is to set the 'object size' used in the distribution inside rados
>> in an equal (or similar) way between RBD and CephFS.
>>
>> To set obj_size=64k in RBD I use the command:
>> rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16
>>
>> On cephfs set_layout '-s 65536' runs into EINVAL:
>> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
>> Error setting layout: Invalid argument
>>
>> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
>> cephfs /mnt/cephfs/fio-64k/ show_layout
>> layout.data_pool:     3
>> layout.object_size:   65536
>> layout.stripe_unit:   65536
>> layout.stripe_count:  1
>>
>> The man page of cephfs says
>> ---snip---
>>        -u --stripe_unit
>>               Set the size of each stripe
>>
>>        -c --stripe_count
>>               Set the number of objects to stripe across
>>
>>        -s --object_size
>>               Set the size of the objects to stripe across
>> ---snip---
>>
>> What is the equivalent command on cephfs to 'rbd create --order 16' ?
>> Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
>> should be used in combination to achieve different layouts on CephFS directories
>> (e.g. optimized for streaming, small sequential IOs, small random IOs)
>> ?
>>
>> Thanks,
>> -Dieter
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout - tuning
  2013-08-14 20:17   ` cephfs set_layout - EINVAL - solved Gregory Farnum
@ 2013-08-14 20:38     ` Kasper Dieter
  2013-08-14 20:47       ` Gregory Farnum
  0 siblings, 1 reply; 8+ messages in thread
From: Kasper Dieter @ 2013-08-14 20:38 UTC (permalink / raw)
  To: Gregory Farnum; +Cc: ceph-devel

On Wed, Aug 14, 2013 at 10:17:24PM +0200, Gregory Farnum wrote:
> On Fri, Aug 9, 2013 at 2:03 AM, Kasper Dieter
> <dieter.kasper@ts.fujitsu.com> wrote:
> > OK,
> > I found this nice page: http://ceph.com/docs/next/dev/file-striping/
> > which explains "--stripe_unit --stripe_count --object_size"
> >
> > But still I'm not sure about
> > (1) what is the equivalent command on cephfs to 'rbd create --order 16' ?
> 
> There's not a direct one; CephFS lets you specify arbitrary sizes
> (--stripe-unit) while rbd restricts you to powers of two. If you want
> a new file to use a 64KB object size you can just set the object_size
> to be 64KB.
> 
> > (2) how to use those parameters to achieve different optimized layouts on CephFS directories
> >     (e.g. for streaming, small sequential IOs, small random IOs)
> 
> If (as Yan suspects) you mean specifying how the directory is laid out
> on disk, you can't ? CephFS directories aren't maintained that way and
> it wouldn't make any sense. If you're talking about making all the
> files underneath it use a new layout, you can specify a directory
> layout which is applied to all new descendent files the same way as
> you specify the layout on an individual file.
Thank you Greg,

my question was which parameters of "--stripe_unit --stripe_count --object_size"
would be optimal for new descendent files under directories
/mnt/cephfs/streaming
/mnt/cephfs/seq-IOs
/mnt/cephfs/rand-IOs

e.g. 
cephfs /mnt/cephfs/streaming set_layout -p 3 -s 4194304 -u 4194304 -c 1
cephfs /mnt/cephfs/seq-IOs   set_layout -p 3 -s 4194304 -u   65536 -c 8
cephfs /mnt/cephfs/rand-IOs  set_layout -p 3 -s   65536 -u   65536 -c 1

-Dieter

> -Greg
> Software Engineer #42 @ http://inktank.com | http://ceph.com
> 
> >
> > -Dieter
> >
> > On Fri, Aug 09, 2013 at 09:44:57AM +0200, Kasper Dieter wrote:
> >> Hi,
> >>
> >> my goal is to set the 'object size' used in the distribution inside rados
> >> in an equal (or similar) way between RBD and CephFS.
> >>
> >> To set obj_size=64k in RBD I use the command:
> >> rbd create --size 1024000 --pool SSD-r2 ssd2-1T-64k --order 16
> >>
> >> On cephfs set_layout '-s 65536' runs into EINVAL:
> >> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 4194304 -c 1
> >> Error setting layout: Invalid argument
> >>
> >> cephfs /mnt/cephfs/fio-64k/ set_layout -p 3 -s   65536 -u 65536 -c 1
> >> cephfs /mnt/cephfs/fio-64k/ show_layout
> >> layout.data_pool:     3
> >> layout.object_size:   65536
> >> layout.stripe_unit:   65536
> >> layout.stripe_count:  1
> >>
> >> The man page of cephfs says
> >> ---snip---
> >>        -u --stripe_unit
> >>               Set the size of each stripe
> >>
> >>        -c --stripe_count
> >>               Set the number of objects to stripe across
> >>
> >>        -s --object_size
> >>               Set the size of the objects to stripe across
> >> ---snip---
> >>
> >> What is the equivalent command on cephfs to 'rbd create --order 16' ?
> >> Can you please give same explanation how "--stripe_unit --stripe_count --object_size"
> >> should be used in combination to achieve different layouts on CephFS directories
> >> (e.g. optimized for streaming, small sequential IOs, small random IOs)
> >> ?
> >>
> >> Thanks,
> >> -Dieter
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cephfs set_layout - tuning
  2013-08-14 20:38     ` cephfs set_layout - tuning Kasper Dieter
@ 2013-08-14 20:47       ` Gregory Farnum
  0 siblings, 0 replies; 8+ messages in thread
From: Gregory Farnum @ 2013-08-14 20:47 UTC (permalink / raw)
  To: Kasper Dieter; +Cc: ceph-devel

On Wed, Aug 14, 2013 at 1:38 PM, Kasper Dieter
<dieter.kasper@ts.fujitsu.com> wrote:
> On Wed, Aug 14, 2013 at 10:17:24PM +0200, Gregory Farnum wrote:
>> On Fri, Aug 9, 2013 at 2:03 AM, Kasper Dieter
>> <dieter.kasper@ts.fujitsu.com> wrote:
>> > OK,
>> > I found this nice page: http://ceph.com/docs/next/dev/file-striping/
>> > which explains "--stripe_unit --stripe_count --object_size"
>> >
>> > But still I'm not sure about
>> > (1) what is the equivalent command on cephfs to 'rbd create --order 16' ?
>>
>> There's not a direct one; CephFS lets you specify arbitrary sizes
>> (--stripe-unit) while rbd restricts you to powers of two. If you want
>> a new file to use a 64KB object size you can just set the object_size
>> to be 64KB.
>>
>> > (2) how to use those parameters to achieve different optimized layouts on CephFS directories
>> >     (e.g. for streaming, small sequential IOs, small random IOs)
>>
>> If (as Yan suspects) you mean specifying how the directory is laid out
>> on disk, you can't ? CephFS directories aren't maintained that way and
>> it wouldn't make any sense. If you're talking about making all the
>> files underneath it use a new layout, you can specify a directory
>> layout which is applied to all new descendent files the same way as
>> you specify the layout on an individual file.
> Thank you Greg,
>
> my question was which parameters of "--stripe_unit --stripe_count --object_size"
> would be optimal for new descendent files under directories
> /mnt/cephfs/streaming
> /mnt/cephfs/seq-IOs
> /mnt/cephfs/rand-IOs
>
> e.g.
> cephfs /mnt/cephfs/streaming set_layout -p 3 -s 4194304 -u 4194304 -c 1
> cephfs /mnt/cephfs/seq-IOs   set_layout -p 3 -s 4194304 -u   65536 -c 8
> cephfs /mnt/cephfs/rand-IOs  set_layout -p 3 -s   65536 -u   65536 -c 1

Ah. That will depend a lot on what your specific usage scenario looks
like. The stripe unit is going to cap the size of an individual IO, so
for large sequential IOs you'll want that to be large. The stripe
count determines how many objects are involved over a specific number
of stripes (eg, 64KB stripe units with a stripe count of 10 means the
first 640KB of a file will all be on separate objects, before wrapping
around to the first one).
You might find that under certain benchmarking patterns your
sequential IO will go up if you use smaller stripe units and stripe
them across many objects, but if you've got a writeback cache in the
way I suspect it will be fairly pointless since the cache can
aggregate those into a single larger IO (which is preferable).
For random IO you probably (depending on your macro workload) want to
use smaller stripe units with a fairly wide stripe count, but perhaps
increase the size of the objects (reducing the number of inodes the
OSDs need to keep track of).

But really you just need to experiment; the aggregate performance of
different workloads against different striping policies is still not a
very well-researched area in Ceph or elsewhere.
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-14 20:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-09  7:44 cephfs set_layout - EINVAL Kasper Dieter
2013-08-09  9:03 ` cephfs set_layout - EINVAL - solved Kasper Dieter
2013-08-09 13:06   ` Yan, Zheng
2013-08-09 13:19     ` cephfs set_layout Kasper Dieter
2013-08-09 15:26       ` Sage Weil
2013-08-14 20:17   ` cephfs set_layout - EINVAL - solved Gregory Farnum
2013-08-14 20:38     ` cephfs set_layout - tuning Kasper Dieter
2013-08-14 20:47       ` Gregory Farnum

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.