Skip to contentSkip to conversation

Questions about a possible Ceph setup

DISCUSSION Wido den Hollander 5 participants 8 messages May 20, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

When hanging around the mailinglist i noticed that there are a lot of questions about Ceph and possible hardware setups.

After reading http://ceph.newdream.net/wiki/Designing_a_cluster i've still got a lot of questions hanging around, so this is why i'm making this post.

I in my situation i would like to run Ceph on the cheapest (best bang for buck) hardware available.

Think about simple servers with 4 to 6 harddisks (desktop mainboards, cpu's and disks) and building Ceph on top of that.

We want to skip the expensive RAID controllers, since they become obsolute when using Ceph and setting the replication on the desired level.

Now we get to the OSD topic:
* One cosd per disk?
* Btrfs stripe accross these disks?
* What about journaling?

With a custom CRUSH map
( http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH ) you can place data on strategic locations, in my situation i would create 5 pools with each 4 OSD's, where these 4 pools are all located in seperate 19" racks. In each rack i would hang:
* 1 MON
* 1 MDS
* 4 OSD's

Why 5 pools? This is because i would need a odd number of monitors. Yes, i could choose to place 3 monitors, but i would like to create a pool where al 6 machines are connected to the same switch. Is this reasonable? Or is that many monitors really overdone?

Now, the OSD's all have 4 to 6 harddisks (but lets stick to 4), now i have the option to run an OSD for each harddisk, which would give me shorter recover times when a disk fails, but would give me extra configuration / administration.

But i could also choose to make one btrfs stripe over these 4 disks and run one OSD. This would give me a higher recover time when a disk fails (since the whole stripe fails), but would keep my config smaller.

In the first setup i would only benefit if i could replace the failed disk hot-swap. If not, i would have to bring the whole system down, which would take the other 3 OSD's with it, thus leaving my cluster with 4 less OSD's.

I could buy more expensive hardware with hot-swap capabilities, but imho that is not really what i would like to do with Ceph.

I'd prefer the situation where i'd stripe over all 4 disks, giving me and extra pro. In this situation i could configure my node to panic whenever a disk is starting to give errors, so my cluster can take over immediately.

Am i right? Is this "the way to go"?

Then there is the journaling topic.

When creating a filesystem you get a big warning if the drive cache is enabled on the journaling partition. Imho you don't want to have a drive cache on your journal, but you do want to have one on your data partition.

This forces you to use a seperate disk for your journaling. Assume that i would have 4 disks in a btrfs stripe, would a fifth disk for journaling only be sufficient? I assume so, since it only has to hold data for a few seconds.

But how important is the journaling? If i choose to not use the journal, how big will my penalty be, for lets say a situation where most of the files will be small (webhosting / mailhosting usage).

I hope someone could give a answer on these questions, which would clarify things for a lot of people. (And it would add an interesting message to the ml ;-) )

Note: I've read http://marc.info/?l=ceph-devel&m=126990365515892&w=2
before, my post is based on that thread.

Signature · 19 lines
Met vriendelijke groet,

Wido den Hollander
Hoofd Systeembeheer / CSO
Telefoon Support Nederland: 0900 9633 (45 cpm)
Telefoon Support België: 0900 70312 (45 cpm)
Telefoon Direct: (+31) (0)20 50 60 104
Fax: +31 (0)20 50 60 111
E-mail: [email protected]
Website: http://www.pcextreme.nl
Kennisbank: http://support.pcextreme.nl/
Netwerkstatus: http://nmc.pcextreme.nl



--
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
#1 lore raw
Quoted 85 lines · Wido den Hollander

Hi,

When hanging around the mailinglist i noticed that there are a lot of
questions about Ceph and possible hardware setups.

After reading http://ceph.newdream.net/wiki/Designing_a_cluster i've still got a lot of questions hanging around, so this is why i'm making
this post.

I in my situation i would like to run Ceph on the cheapest (best bang
for buck) hardware available.

Think about simple servers with 4 to 6 harddisks (desktop mainboards,
cpu's and disks) and building Ceph on top of that.

We want to skip the expensive RAID controllers, since they become
obsolute when using Ceph and setting the replication on the desired
level.

Now we get to the OSD topic:
* One cosd per disk?
* Btrfs stripe accross these disks?
* What about journaling?

With a custom CRUSH map
( http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
) you
can place data on strategic locations, in my situation i would create 5
pools with each 4 OSD's, where these 4 pools are all located in seperate
19" racks. In each rack i would hang:
* 1 MON
* 1 MDS
* 4 OSD's

Why 5 pools? This is because i would need a odd number of monitors. Yes,
i could choose to place 3 monitors, but i would like to create a pool
where al 6 machines are connected to the same switch. Is this
reasonable? Or is that many monitors really overdone?

Now, the OSD's all have 4 to 6 harddisks (but lets stick to 4), now i
have the option to run an OSD for each harddisk, which would give me
shorter recover times when a disk fails, but would give me extra
configuration / administration.

But i could also choose to make one btrfs stripe over these 4 disks and
run one OSD. This would give me a higher recover time when a disk fails
(since the whole stripe fails), but would keep my config smaller.

In the first setup i would only benefit if i could replace the failed
disk hot-swap. If not, i would have to bring the whole system down,
which would take the other 3 OSD's with it, thus leaving my cluster with
4 less OSD's.

I could buy more expensive hardware with hot-swap capabilities, but imho
that is not really what i would like to do with Ceph.

I'd prefer the situation where i'd stripe over all 4 disks, giving me
and extra pro. In this situation i could configure my node to panic
whenever a disk is starting to give errors, so my cluster can take over
immediately.

Quoted 1 line

Am i right? Is this "the way to go"?

I don't know the way to go.
But I think that in the 1st case (1 OSD per hard disk) when a hard disk fails, it gets replicated elsewhere. During that time the other 3 OSDs on the same machine are still working fine and serving requests. And then some time later, you've got a brand new disk, you shutdown the machnie, that's 3 more OSDs down. In the 2nd case, as soon as 1 disk starts failing, your OSD (which is 4 disks) gets taken down, that's approximately equivalent to 4 OSDs going down at the same time if we compare to your 1st case.

So in both cases you have to shutdown 1 machine, but in the 1st case your cluster gets replicated in 2 stages, first the failing OSD, then the 3 other (when you change the disk). And before the 2nd stage the 3 disks that stayed alive still work... If the network is a bottleneck, the 1st case might be better, because less data gets replicated at the same time.

About your 2nd case: as cheap as the hardware may be, having 3 perfectly operational disks not working has a cost...

What I don't know, in both cases, is: when the machines gets back online, will it hold the same data as before being shutdown, or will they get entirely new data? I can remember that crush was quite stable and designed to avoid that kind of full cluster rebalance on failing/new OSD...

I don't understand how - in the 2nd case - the btrfs pool of 4 disks would "repair" its missing data, so that the data on the 3 good disks does not need to get replicated over the network.

Quoted 10 lines

Then there is the journaling topic.

When creating a filesystem you get a big warning if the drive cache is
enabled on the journaling partition. Imho you don't want to have a drive
cache on your journal, but you do want to have one on your data
partition.

Quoted 7 lines

This forces you to use a seperate disk for your journaling. Assume that
i would have 4 disks in a btrfs stripe, would a fifth disk for
journaling only be sufficient? I assume so, since it only has to hold
data for a few seconds.

Let me just copy/paste a question asked yesterday on irc, and Sage's answer:

me> sagewk, what is the best: - a jounal on a partition, same disk as osd data and disk write caching off, or - journal on a filesystem, same disk as osd data, write caching on? sagewk> partition with write cache off, i suspect.
sagewk> hopefully someday we'll be able to flush the disk cache from userspace and that annoyance will go away
me> so you don't expect a performance penalty running btrfs on a disk with caching deacivated
sagewk> not really. the writer threads should keep the disk busy, and the commit sequence has barriers that flushes the cache anyway.

My question was not exactly the same as yours, but I think the answer Sage gave is also valid in your case.

Fred

#2 lore raw
Quoted 7 lines
Quoted 6 lines

I'd prefer the situation where i'd stripe over all 4 disks, giving me and extra pro. In this situation i could configure my node to panic whenever a disk is starting to give errors, so my cluster can take over immediately.

Am i right? Is this "the way to go"?

Quoted 8 lines

I don't know the way to go. But I think that in the 1st case (1 OSD per hard disk) when a hard disk fails, it gets replicated elsewhere. During that time the other 3 OSDs on the same machine are still working fine and serving requests. And then some time later, you've got a brand new disk, you shutdown the machnie, that's 3 more OSDs down. In the 2nd case, as soon as 1 disk starts failing, your OSD (which is 4 disks) gets taken down, that's approximately equivalent to 4 OSDs going down at the same time if we compare to your 1st case.

The other 3 osds don't have to rereplicate if you swap the failed disk quickly, or otherwise inform the system that the failure is temporary. By default there is a 5 minute timeout. That can be adjusted, or we can add other administrative hooks to 'suspend' any declarations of permanent failure for this sort of case.

Quoted 8 lines

About your 2nd case: as cheap as the hardware may be, having 3 perfectly operational disks not working has a cost...

What I don't know, in both cases, is: when the machines gets back online, will it hold the same data as before being shutdown, or will they get entirely new data? I can remember that crush was quite stable and designed to avoid that kind of full cluster rebalance on failing/new OSD...

For independent disks, the the old data will still be there on the 3 that weren't replaced. If the 4 are striped without redundancy, all will be lost due to the singel failure. If they are striped with redudancy (btrfs mirroring, DM/MD or hardware raid, etc.), all 4 disks' data will be there (tho there will be some internal rebuild load in the raid).

Quoted 3 lines

I don't understand how - in the 2nd case - the btrfs pool of 4 disks would "repair" its missing data, so that the data on the 3 good disks does not need to get replicated over the network.

Currently it won't, unless you enable data mirroring (off by default). The problem is that costs you 2x the storage space, which combined with ceph mirroring means you're buying 4x the disk.

I lean toward a cosd per disk in this situation. The downside is there is a bit more work in setting up the CRUSH hierarchy and rules properly. User friendly tools to do this would certainly be nice.

sage

#3 lore raw

Hi,

Quoted 16 lines · Sage Weil
Quoted 7 lines
Quoted 6 lines

I'd prefer the situation where i'd stripe over all 4 disks, giving me and extra pro. In this situation i could configure my node to panic whenever a disk is starting to give errors, so my cluster can take over immediately.

Am i right? Is this "the way to go"?

Quoted 8 lines

I don't know the way to go. But I think that in the 1st case (1 OSD per hard disk) when a hard disk fails, it gets replicated elsewhere. During that time the other 3 OSDs on the same machine are still working fine and serving requests. And then some time later, you've got a brand new disk, you shutdown the machnie, that's 3 more OSDs down. In the 2nd case, as soon as 1 disk starts failing, your OSD (which is 4 disks) gets taken down, that's approximately equivalent to 4 OSDs going down at the same time if we compare to your 1st case.

Quoted 5 lines

The other 3 osds don't have to rereplicate if you swap the failed disk quickly, or otherwise inform the system that the failure is temporary. By default there is a 5 minute timeout. That can be adjusted, or we can add other administrative hooks to 'suspend' any declarations of permanent failure for this sort of case.

Ok, so upping this timeout to something like 10 minutes would be sufficient for swapping and OSD.

This is done via the mon_osd_down_out_interval paramater i assume (found in config.cc)

Quoted 16 lines
Quoted 9 lines

About your 2nd case: as cheap as the hardware may be, having 3 perfectly operational disks not working has a cost...

What I don't know, in both cases, is: when the machines gets back online, will it hold the same data as before being shutdown, or will they get entirely new data? I can remember that crush was quite stable and designed to avoid that kind of full cluster rebalance on failing/new OSD...

For independent disks, the the old data will still be there on the 3 that weren't replaced. If the 4 are striped without redundancy, all will be lost due to the singel failure. If they are striped with redudancy (btrfs mirroring, DM/MD or hardware raid, etc.), all 4 disks' data will be there (tho there will be some internal rebuild load in the raid).

Quoted 7 lines
Quoted 3 lines

I don't understand how - in the 2nd case - the btrfs pool of 4 disks would "repair" its missing data, so that the data on the 3 good disks does not need to get replicated over the network.

Currently it won't, unless you enable data mirroring (off by default). The problem is that costs you 2x the storage space, which combined with ceph mirroring means you're buying 4x the disk.

My intentions where never to use replication in btrfs, i meant using "RAID-0". So when one disk fails, you loose all your data in that particular node.

Quoted 4 lines

I lean toward a cosd per disk in this situation. The downside is there is a bit more work in setting up the CRUSH hierarchy and rules properly. User friendly tools to do this would certainly be nice.

Yes, the CRUSH map is somewhat more work and also the Ceph config needs some work.

About more then one OSD on one machine, is there a way how you can bind an OSD to a specific IP? Can't seem to find any configuration for this.

I assume you will need one IP per OSD on that machine?

And my journaling question, any views on that topic?

Thanks!

Quoted 6 lines

sage
--
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

Signature · 17 lines
Met vriendelijke groet,

Wido den Hollander
Hoofd Systeembeheer / CSO
Telefoon Support Nederland: 0900 9633 (45 cpm)
Telefoon Support België: 0900 70312 (45 cpm)
Telefoon Direct: (+31) (0)20 50 60 104
Fax: +31 (0)20 50 60 111
E-mail: [email protected]
Website: http://www.pcextreme.nl
Kennisbank: http://support.pcextreme.nl/
Netwerkstatus: http://nmc.pcextreme.nl

--
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 25 lines · Wido den Hollander

Hi,

Quoted 16 lines · Sage Weil
Quoted 7 lines
Quoted 6 lines

I'd prefer the situation where i'd stripe over all 4 disks, giving me and extra pro. In this situation i could configure my node to panic whenever a disk is starting to give errors, so my cluster can take over immediately.

Am i right? Is this "the way to go"?

Quoted 8 lines

I don't know the way to go. But I think that in the 1st case (1 OSD per hard disk) when a hard disk fails, it gets replicated elsewhere. During that time the other 3 OSDs on the same machine are still working fine and serving requests. And then some time later, you've got a brand new disk, you shutdown the machnie, that's 3 more OSDs down. In the 2nd case, as soon as 1 disk starts failing, your OSD (which is 4 disks) gets taken down, that's approximately equivalent to 4 OSDs going down at the same time if we compare to your 1st case.

Quoted 5 lines

The other 3 osds don't have to rereplicate if you swap the failed disk quickly, or otherwise inform the system that the failure is temporary. By default there is a 5 minute timeout. That can be adjusted, or we can add other administrative hooks to 'suspend' any declarations of permanent failure for this sort of case.

Quoted 5 lines

Ok, so upping this timeout to something like 10 minutes would be sufficient for swapping and OSD.

This is done via the mon_osd_down_out_interval paramater i assume (found in config.cc)

Yes. And you can modify this value on a running system (without modifying the .conf and restarting the monitor) with

$ ceph mon injectargs \* '--mon_osd_down_out_interval 600'

on the latest unstable.

Quoted 4 lines

About more then one OSD on one machine, is there a way how you can bind an OSD to a specific IP? Can't seem to find any configuration for this.

I assume you will need one IP per OSD on that machine?

Not currently via the .conf, only via the --bind 1.2.3.4:123 command line argument. Adding a bug for this.

Quoted 1 line

And my journaling question, any views on that topic?

I don't thank that turning the write cache off will affect btrfs too much, but I haven't tested it. It does need to be off if you use a separate partition. The other alternative is to put the journal file in btrfs, but that is slower.

sage

Quoted 31 lines

Thanks!

Quoted 6 lines

sage
--
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

Signature · 17 lines
Met vriendelijke groet,

Wido den Hollander
Hoofd Systeembeheer / CSO
Telefoon Support Nederland: 0900 9633 (45 cpm)
Telefoon Support België: 0900 70312 (45 cpm)
Telefoon Direct: (+31) (0)20 50 60 104
Fax: +31 (0)20 50 60 111
E-mail: [email protected]
Website: http://www.pcextreme.nl
Kennisbank: http://support.pcextreme.nl/
Netwerkstatus: http://nmc.pcextreme.nl

--
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
Quoted 39 lines · On Thursday 20 of May 2010 20:24:50 you wrote:
Quoted 25 lines · Wido den Hollander

Hi,

Quoted 16 lines · Sage Weil
Quoted 7 lines
Quoted 6 lines

I'd prefer the situation where i'd stripe over all 4 disks, giving me and extra pro. In this situation i could configure my node to panic whenever a disk is starting to give errors, so my cluster can take over immediately.

Am i right? Is this "the way to go"?

Quoted 8 lines

I don't know the way to go. But I think that in the 1st case (1 OSD per hard disk) when a hard disk fails, it gets replicated elsewhere. During that time the other 3 OSDs on the same machine are still working fine and serving requests. And then some time later, you've got a brand new disk, you shutdown the machnie, that's 3 more OSDs down. In the 2nd case, as soon as 1 disk starts failing, your OSD (which is 4 disks) gets taken down, that's approximately equivalent to 4 OSDs going down at the same time if we compare to your 1st case.

Quoted 5 lines

The other 3 osds don't have to rereplicate if you swap the failed disk quickly, or otherwise inform the system that the failure is temporary. By default there is a 5 minute timeout. That can be adjusted, or we can add other administrative hooks to 'suspend' any declarations of permanent failure for this sort of case.

Quoted 5 lines

Ok, so upping this timeout to something like 10 minutes would be sufficient for swapping and OSD.

This is done via the mon_osd_down_out_interval paramater i assume (found in config.cc)

Yes. And you can modify this value on a running system (without modifying the .conf and restarting the monitor) with

$ ceph mon injectargs \* '--mon_osd_down_out_interval 600'

on the latest unstable.

Quoted 7 lines
Quoted 4 lines

About more then one OSD on one machine, is there a way how you can bind an OSD to a specific IP? Can't seem to find any configuration for this.

I assume you will need one IP per OSD on that machine?

Not currently via the .conf, only via the --bind 1.2.3.4:123 command line argument. Adding a bug for this.

Is that one IP per cosd daemon really necessary? I'm currently running four osd nodes, two disk/cosd per each with single IP per node. So far it seems working:)

Quoted 17 lines
Quoted 1 line

And my journaling question, any views on that topic?

I don't thank that turning the write cache off will affect btrfs too much, but I haven't tested it. It does need to be off if you use a separate partition. The other alternative is to put the journal file in btrfs, but that is slower.

sage

Quoted 7 lines

Thanks!

Quoted 5 lines

sage
--
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

Michal Humpula

#6 lore raw
Quoted 11 lines · Michal Humpula
Quoted 7 lines
Quoted 4 lines

About more then one OSD on one machine, is there a way how you can bind an OSD to a specific IP? Can't seem to find any configuration for this.

I assume you will need one IP per OSD on that machine?

Not currently via the .conf, only via the --bind 1.2.3.4:123 command line argument. Adding a bug for this.

Is that one IP per cosd daemon really necessary? I'm currently running four osd nodes, two disk/cosd per each with single IP per node. So far it seems working:)

Oh sorry, I misunderstood the question. You can force the daemon to bind to a specific IP/port, but that's not necessary.

Normally the non-monitor daemons will just pick a random port (in the 6800-6900 range) and identify themselves as whatever IP is used when contacting the monitor. The monitors are the only daemons that have to bind to a specific well-known port (whatever you specify in ceph.conf).

sage

#7 lore raw
In reply to Fred Ar
Quoted 3 lines · On Thursday 20 May 2010 11:59:08 Fred Ar wrote:
Quoted 2 lines · Wido den Hollander

Hi,

<snip>

Quoted 13 lines
Quoted 2 lines

Am i right? Is this "the way to go"?

I don't know the way to go.
But I think that in the 1st case (1 OSD per hard disk) when a hard disk fails, it gets replicated elsewhere. During that time the other 3 OSDs on the same machine are still working fine and serving requests. And then some time later, you've got a brand new disk, you shutdown the machnie, that's 3 more OSDs down. In the 2nd case, as soon as 1 disk starts failing, your OSD (which is 4 disks) gets taken down, that's approximately equivalent to 4 OSDs going down at the same time if we compare to your 1st case.

Quoted 5 lines

So in both cases you have to shutdown 1 machine, but in the 1st case your cluster gets replicated in 2 stages, first the failing OSD, then the 3 other (when you change the disk). And before the 2nd stage the 3 disks that stayed alive still work... If the network is a bottleneck, the 1st case might be better, because less data gets replicated at the same time.

You could even plan it out and decomm each remaining osd one at a time at off- peak hours to minimize disruption and the possibility of stressing the system so much that something else fails.

Quoted 56 lines

About your 2nd case: as cheap as the hardware may be, having 3 perfectly operational disks not working has a cost...

What I don't know, in both cases, is: when the machines gets back online, will it hold the same data as before being shutdown, or will they get entirely new data? I can remember that crush was quite stable and designed to avoid that kind of full cluster rebalance on failing/new OSD...

I don't understand how - in the 2nd case - the btrfs pool of 4 disks would "repair" its missing data, so that the data on the 3 good disks does not need to get replicated over the network.

Quoted 10 lines

Then there is the journaling topic.

When creating a filesystem you get a big warning if the drive cache is
enabled on the journaling partition. Imho you don't want to have a drive
cache on your journal, but you do want to have one on your data
partition.

Quoted 7 lines

This forces you to use a seperate disk for your journaling. Assume that
i would have 4 disks in a btrfs stripe, would a fifth disk for
journaling only be sufficient? I assume so, since it only has to hold
data for a few seconds.

Let me just copy/paste a question asked yesterday on irc, and Sage's answer:

me> sagewk, what is the best: - a jounal on a partition, same disk as osd data and disk write caching off, or - journal on a filesystem, same disk as osd data, write caching on? sagewk> partition with write cache off, i suspect.
sagewk> hopefully someday we'll be able to flush the disk cache from userspace and that annoyance will go away me> so you don't expect a performance penalty running btrfs on a disk with caching deacivated sagewk> not really. the writer threads should keep the disk busy, and the commit sequence has barriers that flushes the cache anyway.

My question was not exactly the same as yours, but I think the answer Sage gave is also valid in your case.

Fred

--
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