Ceph: The Storage System of the Future

49

Transcript of Ceph: The Storage System of the Future

Page 1: Ceph: The Storage System of the Future
Page 2: Ceph: The Storage System of the Future

123

Page 3: Ceph: The Storage System of the Future

1. RAID y sus diferentes niveles

Page 4: Ceph: The Storage System of the Future

“RAID: Redundant Array of Independent Disks

Page 5: Ceph: The Storage System of the Future

RAID Y SUS NIVELES

○ Tradicionalmente se ha utilizado RAID como solución de almacenamiento

Page 6: Ceph: The Storage System of the Future

RAID Y SUS NIVELES

○ RAID utiliza diferentes niveles para obtener redundancia y/o rendimiento

○ RAID 0, 1, 5, 6...

Page 7: Ceph: The Storage System of the Future

RAID Y SUS NIVELES

○ RAID NO ESCALA

● Los tiempos de reconstrucción crecen cada vez más

● Las probabilidades de fallo aumentan drásticamente

Page 8: Ceph: The Storage System of the Future

RAID Y SUS NIVELES

Fuente: ActualTech

http://www.actualtech.io/really-outgrown-raid/

Page 9: Ceph: The Storage System of the Future

RAID Y SUS NIVELES

Fuente: ActualTech

http://www.actualtech.io/really-outgrown-raid/

Page 10: Ceph: The Storage System of the Future

RAID Y SUS NIVELES

○ ¿Qué alternativas tengo?

● Sistemas de ficheros distribuidos

● “Appliances” de diferentes fabricantes

● Ceph

Page 11: Ceph: The Storage System of the Future

2. ¡Escalando hacia el exabyte!

Page 12: Ceph: The Storage System of the Future

“¡CEPH NO ES UN SISTEMA DE

FICHEROS!

Page 13: Ceph: The Storage System of the Future

“¡CEPH ES UN SISTEMA DE

ALMACENAMIENTO DE OBJETOS!

Page 14: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 15: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 16: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 17: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

○ Objetos, bloques y ficheros○ Escala horizontalmente○ No tiene un punto único de fallo

(SPOF)○ Funciona en “commodity hardware”○ Autogestionado○ Open source (LGPL)

Page 18: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

○ Objetos, ficheros y bloques. Ceph puede exponer todo ellos al exterior

○ Todo esto se consigue gracias a: “Reliable Autonomic Distributed Object Store (RADOS)

Page 19: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 20: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Clientes Ceph: Se comunican directamente con los OSD’s.

Ceph utiliza CRUSH para decidir dónde colocar los datos.

Page 21: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 22: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

○ Estructura básica: Monitores y OSD’s

Page 23: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

○ Monitores: Contienen una copia maestra del mapa del cluster

○ OSD’s: Actúan como dispositivos de almacenamiento

Page 24: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

El mapa del cluster contiene:○ Mapa de los monitores○ Mapa de los OSD’s○ Mapa de los PG’s○ Mapa CRUSH○ Mapa MDS

Page 25: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

CephX como mecanismo de autenticación:

○ Similar a Kerberos○ Sin punto único de fallo. Cada monitor

puede crear y distribuir claves

Page 26: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 27: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 28: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Los clientes y los OSD’s del cluster tienen conocimiento de la estructura del cluster

Los clientes pueden hablar directamente con los OSD’s

Los OSD’s pueden utilizar sus recursos, RAM y CPU, para realizar las réplicas y otras tareas.

Page 29: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

El cliente escribe un objeto en el OSD primario y es el OSD el que lo replica

Page 30: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Ceph soporta el concepto de “pools” particiones lógicas para almacenar los objetos

Page 31: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Ceph “mapea” cada escritura a un placement group (PG) y cada PG a un OSD

Page 32: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Para calcular a que PG tiene que ir un objeto:

○ ID de la Pool y el objeto○ hash(id_objeto)○ modulo(hash(id_objeto))○ ID Pool.modulo(hash(id_objeto))

Page 33: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Cuando se añade un nuevo OSD, el mapa del cluster cambia y Ceph PG’s

Page 34: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Ceph soporta igualmente “Erasure Coding” donde cada objeto se guarda en “K” trozos de datos y “M” trozos de paridad”

Page 35: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!Utilizar la técnica del “erasure coding” permite utilizar de forma más eficiente el almacenamiento a costa del rendimiento

Ejemplo:○ N = k + m○ 5 = 3 + 2○ Encoding Rate “R” =

3 / 5 = 0.6○ Almacenamiento

requerido = 1 / r = 1.6

Page 36: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Aún con todo, Ceph no es perfecto. Cada escritura implica dos escrituras.

Page 37: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Para mejorar el rendimiento han desarrollado BlueStore

Utilizando una pequeña partición para metadatos, permite utilizar el resto del dispositivo sin un sistema de ficheros (RAW)

Mejorará el rendimiento de forma sustancial.

Page 38: Ceph: The Storage System of the Future

Ceph: ¡Escalando el exabyte!

Page 39: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Casos de uso

Page 40: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Ceph integrado en Atlantis (Cinder)

Reducción de costes de almacenamiento y mayor rendimiento

Page 41: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Totalmente integrado en OpenStack: VM’s, bloques, objetos y CephFS

Page 42: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 43: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Opciones de monitorización:

○ Calamari○ InkScope○ Grafana

Page 44: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 45: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!

Page 46: Ceph: The Storage System of the Future

Ceph: ¡Escalando hacia el exabyte!And now...

Page 47: Ceph: The Storage System of the Future

3. Pequeño tutorial sobre Ceph

Page 48: Ceph: The Storage System of the Future

Ceph: Tutorial

Primeros pasos:○ Instalar Vagrant y VirtualBox○ Instalar Git (https://goo.gl/Xoj9FF)○ Instalar los plugins de Vagrant:

● Vagrant-cachier● Vagrant-hostmanager