Skip to contentSkip to conversation

Feature request: "max mon" setting

DISCUSSION Amon Ott 5 participants 7 messages Nov 3, 2011 – Nov 7, 2011

lore
Share & tools
lore

Amon Ott

author
#0 lore raw

Hi all,

currently, all defined monitors are started automatically and included in the mon cluster. In a big cluster, you either need to define many monitors or risk a cluster failure, if the majority of monitors fails.

Documentation recommends three monitors. In our special cluster configuration, this would mean that if accidentially two nodes with monitors fail (e.g. one in maintenance and one crashes), the whole cluster dies. What I would really like would be that I can define a monitor on each node and e.g. set "max mon = 3". Each monitor starting up can then check how many monitors are already up and go to standby, if the number has already been reached. Regular rechecking could allow another monitor to become active, if one of the previously active monitors has died. Just like "max mds" actually.

A special case that gives me most headaches is the case of just two active nodes. According to documentation, the monitor problem means that one failing monitor kills the cluster whatever the number of defined monitors (1 or 2), even if we have all data safely placed on both nodes.

Amon Ott

Signature · 16 lines
Dr. Amon Ott
m-privacy GmbH           Tel: +49 30 24342334
Am Köllnischen Park 1    Fax: +49 30 24342336
10179 Berlin             http://www.m-privacy.de

Amtsgericht Charlottenburg, HRB 84946

Geschäftsführer:
 Dipl.-Kfm. Holger Maczkowsky,
 Roman Maczkowsky

GnuPG-Key-ID: 0x2DD3A649
--
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 3 lines · Amon Ott

Documentation recommends three monitors. In our special cluster configuration, this would mean that if accidentially two nodes with monitors fail (e.g. one in maintenance and one crashes), the whole cluster dies. What I would really

If you feel two monitors going down is too likely, run a monitor cluster of size 5. And if you feel 3 monitors going down is too likely, run 7.

Quoted 5 lines

like would be that I can define a monitor on each node and e.g. set "max mon = 3". Each monitor starting up can then check how many monitors are already up and go to standby, if the number has already been reached. Regular rechecking could allow another monitor to become active, if one of the previously active monitors has died. Just like "max mds" actually.

Unfortunately, that is fundamentally not wanted. That would let a so called "split brain" situation occur, and the whole purpose of the majority rule of monitors is to ensure that it does not happen. If we didn't care about that, the monitors left standing would never need to stop operating.

Quoted 4 lines

A special case that gives me most headaches is the case of just two active nodes. According to documentation, the monitor problem means that one failing monitor kills the cluster whatever the number of defined monitors (1 or 2), even if we have all data safely placed on both nodes.

Yes, 1 or 2 total physical nodes in a Ceph cluster makes it hard to do HA. You could run just one ceph-mon, then the other node failing doesn't affect the cluster at all (but naturally the one running ceph-mon must not fail).

Perhaps you can get a third machine to also be a monitor, even if it doesn't participate in storage etc. ceph-mon is a very lightweight process. Share a server that has other responsibilities, or buy the cheapest atom netbook you can find -- it should do the job just fine.

Clusters of <=2 nodes are pretty far from what Ceph was designed for, and while we use them all the time for testing, running a setup that small for real is pretty rare. Sorry.

author
#2 lore raw
Quoted 9 lines · On Thursday 03 November 2011 you wrote:
Quoted 4 lines · Amon Ott

Documentation recommends three monitors. In our special cluster configuration, this would mean that if accidentially two nodes with monitors fail (e.g. one in maintenance and one crashes), the whole cluster dies. What I would really

If you feel two monitors going down is too likely, run a monitor cluster of size 5. And if you feel 3 monitors going down is too likely, run 7.

So there is no problem in having much more than three, as long as it is an odd number.

Quoted 11 lines
Quoted 5 lines

like would be that I can define a monitor on each node and e.g. set "max mon = 3". Each monitor starting up can then check how many monitors are already up and go to standby, if the number has already been reached. Regular rechecking could allow another monitor to become active, if one of the previously active monitors has died. Just like "max mds" actually.

Unfortunately, that is fundamentally not wanted. That would let a so called "split brain" situation occur, and the whole purpose of the majority rule of monitors is to ensure that it does not happen. If we didn't care about that, the monitors left standing would never need to stop operating.

Alright, I see you point. A network split could be unfortunate, but it could also make problems with e.g. 7 monitors - 4 on one and 3 on the other partition. So best would be to really stick with 3.

Quoted 10 lines
Quoted 4 lines

A special case that gives me most headaches is the case of just two active nodes. According to documentation, the monitor problem means that one failing monitor kills the cluster whatever the number of defined monitors (1 or 2), even if we have all data safely placed on both nodes.

Yes, 1 or 2 total physical nodes in a Ceph cluster makes it hard to do HA. You could run just one ceph-mon, then the other node failing doesn't affect the cluster at all (but naturally the one running ceph-mon must not fail).

Quoted 4 lines

Perhaps you can get a third machine to also be a monitor, even if it doesn't participate in storage etc. ceph-mon is a very lightweight process. Share a server that has other responsibilities, or buy the cheapest atom netbook you can find -- it should do the job just fine.

Yes, this sounds like a useful idea.

Quoted 3 lines

Clusters of <=2 nodes are pretty far from what Ceph was designed for, and while we use them all the time for testing, running a setup that small for real is pretty rare. Sorry.

I agree that our needs are special. We want to be able to start with 2 and extend as customer needs grow, or start with 20 and shut some of them down if load gets low. I now understand that we should start with at least three nodes.

Thank you for clearing things up!

Amon Ott

Signature · 16 lines
Dr. Amon Ott
m-privacy GmbH           Tel: +49 30 24342334
Am Köllnischen Park 1    Fax: +49 30 24342336
10179 Berlin             http://www.m-privacy.de

Amtsgericht Charlottenburg, HRB 84946

Geschäftsführer:
 Dipl.-Kfm. Holger Maczkowsky,
 Roman Maczkowsky

GnuPG-Key-ID: 0x2DD3A649
--
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
#3 lore raw
Quoted 7 lines · Amon Ott
Quoted 6 lines · On Thursday 03 November 2011 you wrote:
Quoted 4 lines · Amon Ott

Documentation recommends three monitors. In our special cluster configuration, this would mean that if accidentially two nodes with monitors fail (e.g. one in maintenance and one crashes), the whole cluster dies. What I would really

Quoted 6 lines
Quoted 3 lines

If you feel two monitors going down is too likely, run a monitor cluster of size 5. And if you feel 3 monitors going down is too likely, run 7.

So there is no problem in having much more than three, as long as it is an odd number.

It actually can be an odd number. Just keep in mind that you need a strict majority (> N/2) for the cluster to go active. That last monitor just doesn't buy you much because the number of survivors required goes up by one but the number of failures you can tolerate does not. (e.g., a 4 monitor cluster can only tolerate 1 failure, just like a 3 node cluster.)

sage

#4 lore raw
In reply to Amon Ott
Quoted 4 lines · Amon Ott

I agree that our needs are special. We want to be able to start with 2 and extend as customer needs grow, or start with 20 and shut some of them down if load gets low. I now understand that we should start with at least three nodes.

It's not so special a usage case, you're just thinking of it wrong. Adding a new daemon of each type for every physical box you add is the wrong way to expand. You want to add OSDs for every box in order to take advantage of the storage; you CAN add an MDS for each box, but you should really be scaling them according to how much metadata activity you need to support; and the monitors need to be handled carefully in order to keep a strict majority of them alive at all times (and aside from durability the system doesn't much care about how many there are).
-Greg

#5 lore raw

Hi Greg,
Will there be any performance impact if there are too many mons?

Regards,
Leander Yu.

Quoted 5 lines · Gregory Farnum
Quoted 4 lines · Amon Ott

I agree that our needs are special. We want to be able to start with 2 and extend as customer needs grow, or start with 20 and shut some of them down if load gets low. I now understand that we should start with at least three nodes.

Quoted 15 lines

It's not so special a usage case, you're just thinking of it wrong. Adding a new daemon of each type for every physical box you add is the wrong way to expand. You want to add OSDs for every box in order to take advantage of the storage; you CAN add an MDS for each box, but you should really be scaling them according to how much metadata activity you need to support; and the monitors need to be handled carefully in order to keep a strict majority of them alive at all times (and aside from durability the system doesn't much care about how many there are).
-Greg
--
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

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

#6 lore raw
Quoted 2 lines · Leander Yu

Hi Greg,
Will there be any performance impact if there are too many mons?

Eventually there could be a small one. Every time the monitor systems do a map update (to, for instance, change the record of whether an OSD is up or down, or which MDS owns what data) it needs to get agreement from a strict majority of the monitors. The more monitors you have the higher the variance in latency you can get for this operation, and the more bandwidth the leader monitor needs to devote to sending out the updates to all the other monitors.
But under normal operation these map updates are "rare" (maybe one every 5 seconds) and they're never in the client's critical path for data transfer, so any performance issues would be noticed based on the side effects they produce, not by client performance.
-Greg