"La Performance en Continue" à JMaghreb 3.0 - 05/11/2014
manuel_servais_2012-2013_defence_stage_IAGL
1. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
Monitoring du système
de stockage de données du
CERN
Superviseurs :
Dr. Sébastien PONCE
Dr. Massimo LAMANNA
Tuteurs :
Dr. Romain ROUVOY
M. Raphaël MARVIE
3 Septembre 2013
Stage réalisé de Mars à Août 2013
Université Lille 1
Spécialisation IAGL – Ingénierie et Architecture des Grands Logiciels
Manuel SERVAIS
2. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
2/24
Sommaire
• Contexte
– Laboratoire
– Service
– CASTOR
– L’existant avant stage
– Technologies
• Sujets / Problèmes
– Parallélisation du mae-consumer
• Architecture streaming « MapReduce »
• Maemanager
• Tests
– L'existant après stage
– Autres contributions et Améliorations
• Conclusion
3. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
3/24
Contexte
– Laboratoire
– Service
– CASTOR
– L’existant avant stage
– Technologies
4. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
4/24
Laboratoire
CERN – Conseil Européen de la Recherche nucléaire
Fondé en 1954
Plus grand laboratoire de physique au monde
4 missions : Recherche ; Technologie; Coopération; Formation
5. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
5/24
Entreprise
LHC : 27 km de circonférences 100m sous terre
CERN Aéroport de
Genève
LHC
6. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
6/24
Service
CERN
~2400 employés
~10 000 collaborateurs
~100 000 visiteurs / an
plus de 110 nationalités
IT-DSS-FDO
IT : Information Technology (~300 p.)
DSS : Data & Storage Service (~35 p.)
FDO : File system & Disk Operation (~12 p.)
7. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
7/24
CASTOR
Projet de IT-DSS-FDO (~ 6p.)
~ Logiciel open-source de stockage de données
~ 600 serveurs
~ 12 000 disques + 30 000 bandes magnétiques
~ 80 Po de données (disques + bandes)
=> 80 000 000 000 Mo
≃ 114 000 000 CD (700 Mo / CD)
≃ 136 Km (1,2 mm par cd)
≃ aller-retour Lille – Dunkerque en voiture = 1h40 de route
~ 20 Go de logs par jour à analyser en temps réel
8. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
8/24
L'existant avant stage
Mae-consumer
Hadoop consumer
HBase consumer
9. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
9/24
mae-consumer
L'existant avant stage
10. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
10/24
L'existant avant stage
Cockpit
12. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
12/24
Sujet / Problèmes
1) Nombre de logs
– Capacité d'analyse devient insuffisante
Parallélisation pour améliorer la capacité de calcul
2) Récupération de données
– Historique sur de nouveaux graphiques
– « Re génération » de partie de graphique
13. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
13/24
Sujet / Problèmes
– Parallélisation du mae-consumer
• Architecture streaming « MapReduce »
• Maemanager
• Tests
– L'existant après stage
– Autres contributions et Améliorations
14. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
14/24
Parallélisation du mae-consumer
MapReduce ?
Split + 2 opérations : Map et Reduce
Cf. projet informatique 2.0 « MapReduce et son implémentation » Wikipédia
15. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
15/24
Plusieurs mae-consumers (Opération Map)
– Chaque mae-consumer analyse une partie des
données
Un reducer (Opération Reduce)
– Fusion des résultats
Architecture Streaming « MapReduce »
17. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
17/24
mae-manager
« Chef d'orchestre »
• Instanciations des processus
• Exécution de commandes
18. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
18/24
Tests
Machine de développement :
– Virtuelle
– Intel(R) Xeon(R) CPU L5630 @ 2,13 Ghz
2 coeurs
– 8 Go ram
Machine de production :
– Physique
– 2* Intel(R) Xeon(R) CPU L5520 @ 2,27 Ghz
2* 4 coeurs + HyperThreading = 8 coeurs, 16 threads
– 24 Go ram
Machine de tests :
– Physique,
– 2 * Intel(R) Xeon(R) CPU E5-2630L @ 2,00 Ghz
2* 6 coeurs + HyperThreading = 12 coeurs, 24 threads
– 50 Go ram + SSD
19. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
19/24
Tests
Speed up=
Tempsexécutionséquentiel
Tempsexécution parallèle
20. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
20/24
L'existant après stage
Mae-consumer
Hadoop consumer
HBase consumer
21. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
21/24
Autres contributions & Améliorations
• Récupération de données Hadoop
• Consolidations des données Hadoop
• Présentation & support (CERN & RAL)
• Maintenance du système
• Packaging
• Monitoring du monitoring
• Distribution sur machines
Améliorations
Contributions
22. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
22/24
Conclusion
• 2 objectifs :
- mae-consumer parallèle
vitesse multipliée par le nombre de cœurs
- récupération de données dans Hadoop
• Suivi d'un projet de A à Z
• Technologies (Python, RPyC, Hadoop, etc)
• Monde de la recherche
• Culture internationale
• Travail réalisé : utile pour les opérateurs
25. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
25/24
Contributions Hadoop
– Consolidation des données
• Fusion
• Uniformisation
• État actuel
– Utilisation
• État d'implémentation
26. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
26/24
Données Hadoop : fusion
• Fichiers générés toutes les 5 mins / instance /
type nœuds
• ≃10 000 fichiers par jours
• ≃3 650 000 fichiers par ans
• Hadoop : Fait pour les gros fichiers, pas les
petits
Fusion des fichiers (64 fichiers par jours)
27. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
27/24
• 2 clusters
• 3 formats
• Fichiers désordonnées
• Lignes inutiles
• ≃2 ans de données
Données Hadoop : uniformisation
hadoop fs -du -s -h /project/castorlogs/prod
22075.7g /project/castorlogs/prod
= ~22 To de logs
28. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
28/24
État actuel des données
• Plus de 30 000 MapReduces sur 6 mois
• AcronJob quotidien (castorc3 @ c2adm01)
• ≃ Juillet 2011 -> Aujourd'hui
• Données traduites, filtrées, triées, fusionnées
• Cluster Hadoop /project/castorlogs/prod
29. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
29/24
– Historique pour nouvelle métrique
– Re génération de parties du Cockpit
Données Hadoop : utilisation
30. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
30/24
– Commande RPyC dans console Python
--> Sélection fichiers Hadoop
--> Exécution MapReduce Hadoop
(sélection des données)
--> Téléchargement du fichier résultat
--> Lancement analyse
--> Retour asynchrone RPyC sur l'état d'avancement
– A faire :
--> intégration cockpit ( non plus une commande RPyC)
--> obtenir résultat de l'analyse
Données Hadoop : état implémentation ?
34. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
34/24
Métrique et résultat
Métrique
<metric>
name : Errors
unit : Count of errors
category : General
window : 60
conditions : LVL in ["Error"]
groupbykeys : INSTANCE, DAEMON
data : Counter (COUNT)
handle_unordered : time_threshold
nbins : 1
</metric>
Exemple de résultat
{
"c2alice": {
"nsd": 12 ,
"stagerd": 14 ,
"transfermanagerd": 8
},
"c2atlas": {
"nsd": 4 ,
"stagerd": 120 ,
"transfermanagerd": 28
}
}
35. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
35/24
Parallélisation
• Sur 1 seule machine
(mais extensible multi-machine, api Python)
• De données (DirQ)
• De calcul (métriques)
36. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
36/24
Parallélisation de données
Données partagées
37. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
37/24
Parallélisation de calcul
Métriques partagées
38. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
38/24
Parallélisation de données & de calcul
Combinaison des deux parallélisations
39. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
39/24
Parallélisation : utilisation pratique
Utilisation pratique
40. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
40/24
« mae-consumer » Nouvelle implémentation
43. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
43/24
Tests
• CASTOR (utilisé par le CERN)
– Test local
– Stress test
– Pre-prod
– Sur une machine de la prod
– En production
• CASTOR monitoring (utilisé par l'équipe qui gère CASTOR!)
– Test local
– Stress Test
– Prod avec vérification par opérateurs & moi
44. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
44/24
Tests
Speed up=
Tempsexécutionséquentiel
Tempsexécution parallèle
Efficacité=
Speed up
Nombre processus
45. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
45/24
Inscriptions
Technical Student programme 4-12 mois
Pour l'université Lille1 => 4-6 mois
http://jobs.web.cern.ch/fr/join-us/technical-student-programme
– Réponse fin novembre
– Allocation de subsistance « pour survivre en
Suisse »
– Logements
46. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
46/24
Tuyaux
• Choisis en fonction des besoins
• Recherchent développeurs en C/C++
• Aiment le Python
• Anglais (+ Français) (environnement internationale)
• Si logement en dehors du CERN, moins cher en France
47. CERN IT Department
CH-1211 Geneva 23
Switzerland
www.cern.ch/it
DSS
47/24
Bonus
• Cours
• Visites des installations
• Démonstrations
• Devenir guide
• Possibilités de continuité