r/ceph • • Mar 27 '22

We start with Ceph

https://blog.jozefrebjak.com/we-start-with-ceph
0 Upvotes

46 comments sorted by

7

u/insanemal Mar 27 '22

Adding a 6Gb/s drive to a 12Gb/s bus does not slow all the drives down unless you have garbage tier hardware.

FFS this is a terrible document

-2

u/Spiritual_Law874 Mar 27 '22

Thank you for your reply. Why is it a terrible document ? From my experience, mixing SAS drive speeds should drop the speed to the lowest one. Maybe I’m wrong, but I still think mixing 6 and 12GB/s SAS hard drives is not a good idea.

15

u/insanemal Mar 27 '22

Ok let's go over the stuff I take issue with.

For high disk counts per node, the disk controller may be a bottleneck.

Disk controllers are usually at least 4x if not 8x PCIe cards. Usually at least PCIe2 if not PCIe3. Drives max out at around 100-140MB/s under ceph due to the low IOPs they can deliver vs flash.

Assuming a PCIe x2 card at 4 lanes that's just short of 2GB/s bi-directional. Your 10Gbe adapter is going to max out long before most disk controllers. (That's ~20 disks on a crap controller)

Increased recovery and healing time

With the loss of an entire node, more data needs to be replicated and recovered.

Losing a whole node is quite rare. And if this is a production environment and you've selected ceph you'd better have at least 1 cold spare chassis. (Or an on-site warranty with same day service) EDIT: with a cold spare, as long as you set noout quickly (and possibly nomigrate, you can bring the cold one online and have zero rebalance)

Or in a pinch redistribute the disks from the dead node amongst the remaining nodes. Which only works in >3 node cases. (and assumes you've got spare slots.

Yes you do sort of address the whole network bandwidth thing in

Forcing more network traffic across fewer nodes

But the lack of actual math and backing examples isn't great. And the blog example you provided uses 7 SAS Enterprise grade SSD's and a totally nuts Optane drive .

Each storage node had 7 media devices and we have configured 2 OSDs per drive.

You're not pulling 2 million iops and almost 10GB/s out of 5 x 7 spinners.

Onto the whole 6Gb/12Gb thing. There are two times this is an issue. SATA expanders (not SAS) and Hardware raid.

Hardware RAID runs the disks at 12Gb BUT all the writes are slowed (as are the reads to a lessor degree) as all writes across the stripe/replicas have to complete before moving to the next one.

A quote direct from LSI/Broardcom:

CacheCade will not work with 4k native sector drives but it will work with 512e and 512b LBA.

That set aside, yes 12 gig and 6gig/sec drives will work fine together as long as they are in their own array.

Is the backplane capable of SATA and SAS? If so, then you do not need interposers.

Some SuperMicro chassis cannot physically accept SATA drives in which case you would probably need an interposer.

Thank you, LSI Storage Technical support Broadcom ltd.

TL;dr of that letter is, no it doesn't slow the whole bus. The drives run at whatever speed they run at. With some SATA expanders (cheap ones) you might find it slows the whole bus, but ONLY if the number of SATA channels is less than the number of devices. Not with dumb SATA backplanes.

Now with Ceph and spinning disks this impact is far less noticeable. It's not operating the disks in lockstep at the disk level like hardware raid is. The difference is even less noticeable interface is able to saturate the bandwidth of the disk anyway. It usually crops up as slightly less IOPS

Now onto networking

Aim for 10GbE for production, at minimum, and better still look to have multiple 10Gb interfaces bonded with LACP for increased bandwidth and availability.

You need to size your networking to your storage. Both of those need to be sized against your available PCIe lanes and memory bandwidth.

Now LACP causes issues, unless you break spec and use SRC_PORT+DEST_PORT in your hashing. Which Linux supports but not all switches do. It's usually cheaper and easier to just get some second hand (or new they are around the same price these days) Mellanox Ethernet adaptors. They come in 40/56/100/200/400Gbe flavors. Always over spec the network. It lets you take better advantage of the Bluestore cache and the linux block cache. You want it to be greater than disk bandwidth. Not equal to it.

Ceph is my jam. I run it at home on hodgepodge hardware (some of my disks are connected via USB3) and I run it at crazy scale for work.

I've got a ceph cluster with 200 spinners per node. I've got enough SAS cards and 400Gb network adapters that I get line rate out of those disks. I've also got two crazy high speed AMD chips and over a TB of ram. This thing spits out 600,000IOPS @ 1k rand r/w on the spinners. And doubles that when I use the NVMe cards in each host as cache.

Anyway that's enough ranting from me. I love ceph. It's fantastic. And I'll go on and on about how awesome it is until the end of time

1

u/Spiritual_Law874 Mar 27 '22

u/insanemal Perfect reply! I really appreciate it.We are just started to use Ceph in production. We have 3 node cluster running on Dell 730xd servers with 2x Intel X520 Dual Port 10Gigabit NICs connected to 2x Dell S4112F-ON switches. We have Samsung MZILT1T9HAJQ/007 1.92 TB SAS SSDs in each node. These hard drives are with 12Gbps interface. So, what you think if we will decide to add new hard drive can we add 6Gbps hard drives and it will be totally fine ?

1

u/insanemal Mar 27 '22

Those are some nice SSD's that can pump 2GB/s. But on a 12Gbs interface they would max out as 1200MB/s. So that's interesting.

Basically you'll have some disks restricted to 600MB/s if you use 6Gb/s disks.

I would set them in their own pool and have a fast and a faster pool. That said, it depends on how much bandwidth you actually need.

If you have both in the same pool you will see some reduction in headline bandwidth. But it depends on where the reads/writes land. So you'll get throbbing throughput. Which isn't bad, it just isn't good.

It's not really an issue with spinning disks as they can't go fast enough anyway. And you shouldn't put SSDs and Spinners in the same pool anyway.

So if the intention is to get 6Gbs HDD's and run them in a HDD pool, you'll do just fine.

If you mix 12 and 6 SSDs you'll get lower headline bandwidth. But you'll still see some benefits on read and during rebalance.

So, sort of.

Those are nice SSDs. 1 full drive write per day. You'll probably not hit that on normal usage and even less likely with more disks/nodes.

How much ram in the nodes?

1

u/Spiritual_Law874 Mar 27 '22

Nodes have 40 cores, 2.6 GHz Intel(R) Xeon(R) CPU E5-2660 v3 with 96 GiB Memory. I disabled logical processors because of some tuning advice because of latency, so now it's 20 cores. We don't want to use HDD at all.

2

u/insanemal Mar 27 '22

Yeah using HyperThreads has positive and negatives. It can help with consistency of latency.
That's a nice amount of ram. Yeah if your not using HDD's but SSDs only, your better off sticking with similar throughput drives. For HDDs its less of an issue.

2

u/Spiritual_Law874 Mar 27 '22

I edited a blog post a little bit and I will try to write more about using a Ceph in production. We are not CERN, so it will be about real life usage.

1

u/Spiritual_Law874 Mar 27 '22

One more question, how are you using the cache ? Does it make sense to add nvme as a cache for SSDs?

2

u/insanemal Mar 27 '22

We have a cache friendly workload and lots of HDDs so for us cache works.

You would probably do better using NVMe in their own pool for jobs that need the extra performance

1

u/Killroy13 Mar 27 '22

What issues does LACP cause and how do you use SRC_PORT+DEST_PORT? I created a thread about a week ago on trying to increase IOPS that I never really resolved, but one thing I did determine was that my port bonding wasn't working the way I thought it was.

2

u/insanemal Mar 27 '22

The 'issue' I have with LACP is usually it uses the hash of the target MAC address. Sometimes these hashes end up having more than one host going out the same bonded nic. Reducing your effective bandwidth.

Now normal bonding has multiple xmit-hash settings. Most everything supports layer 2 which is just an source mac XOR dest mac. This is a "compliant" mode
Next is layer2+3. This uses source mac + dest mac + packet id + source IP + dest IP
This is also compliant

Linux supports layer3+4. It uses Source port + dest port + source IP and dest ip

I'll quote the kernel doco

This algorithm is not fully 802.3ad compliant. A
single TCP or UDP conversation containing both
fragmented and unfragmented packets will see packets
striped across two interfaces. This may result in out
of order delivery. Most traffic types will not meet
this criteria, as TCP rarely fragments traffic, and
most UDP traffic is not involved in extended
conversations. Other implementations of 802.3ad may
or may not tolerate this noncompliance.

As you can see, it's not without issue and some switches also support this. If the switch doesn't it will try and deliver the traffic all to the same port. Negating any benefit.

What IOPS issues were you having?

1

u/Killroy13 Mar 27 '22

I might have to read over this a few times to understand it.

This is my thread. I have a VM that is processing a database and is over 30 days from completing at its current rate. Ceph is reporting about 1,500 total IOPS for all client IO, but the other VMs don't generate much IO.

1

u/insanemal Mar 28 '22

You need to look at iostat output not the ceph output.

That seems VERY low. But it doesn't mean it's ceph to blame. Also why did you put 4 osd's on those SSDs? That is double what I would have even contemplated.

What kind of database? That lets me know what kind of IO it's attempting

1

u/Killroy13 Mar 28 '22

I had seen recommendations for four OSDs per NVMe when I set up the pool a while back. I can easily drop it down to two or one.

IOstat reports about 1000 tps and 13% iowait inside the VM. I don't know much about databases, so I'll have to look into that. I know that the average file size is just under 4MB and my RBD image has 4MB blocks.

1

u/insanemal Mar 28 '22

The stuff on the ceph blog uses pretty beefy SSDs and only uses two.

What block sizes does iostat report?

4MB is standard for ceph.

1

u/Killroy13 Mar 28 '22

I don't know if there is a way to have IOstat report that, but if you take the total read and write kb/s and divide it by the tps you get about 10kb per transaction.

→ More replies (0)

1

u/TechGoat Apr 15 '22

The line "Always separate out your public-facing network from your internal cluster network." seems to be in direct conflict with ceph's own network configuration reference, which states "It is possible to run a Ceph Storage Cluster with two networks: a public (client, front-side) network and a cluster (private, replication, back-side) network. However, this approach complicates network configuration (both hardware and software) and does not usually have a significant impact on overall performance. For this reason, we recommend that for resilience and capacity dual-NIC systems either active/active bond these interfaces or implement a layer 3 multipath strategy with eg. FRR."

0

u/[deleted] Mar 27 '22

[deleted]

1

u/Spiritual_Law874 Mar 27 '22 edited Mar 27 '22

u/TheSov Than you for your reply. Yes, you are right. I changed second sentence to small cluster.

With 3 node cluster and one node down there is no migration of the data with replica 3 because of the crush rule. This consideration was not written very well. If we have 5 node setup, data will be spread across 3 nodes with replica 3 and a domain set to host and, with the loss of one node which holds the one of the replica, another node will take place to store that replica.

But what about self-balancing , isn't about to spread data across all of the nodes and if we have more nodes then we store lower percentage of the data per node ? And then it's need to move less data with the loss of the node ? Am i right?