La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

INFSO-RI-508833 Enabling Grids for E-sciencE www.eu-egee.org Gestión de trabajos en Glite Álvaro Fernández Casaní (IFIC – CSIC) Curso Grid y E-ciencia.

Presentaciones similares


Presentación del tema: "INFSO-RI-508833 Enabling Grids for E-sciencE www.eu-egee.org Gestión de trabajos en Glite Álvaro Fernández Casaní (IFIC – CSIC) Curso Grid y E-ciencia."— Transcripción de la presentación:

1 INFSO-RI-508833 Enabling Grids for E-sciencE www.eu-egee.org Gestión de trabajos en Glite Álvaro Fernández Casaní (IFIC – CSIC) Curso Grid y E-ciencia - 15-18 Julio 2008

2 Enabling Grids for E-sciencE INFSO-RI-508833 Sesión 1ª Parte ( 2 horas ) –Presentación y contenidos básicos ( 45’)  ¿Por qué se necesita gestión de trabajos en Grid?  Arquitectura en Glite (WMS)  Funcionalidad básica para el usuario.  Fases y Estados de los trabajos.  Errores típicos –Prácticas ( 1 h) (descanso) 2ª Parte ( 2 horas ) –Contenidos avanzados y continuación prácticas

3 Enabling Grids for E-sciencE INFSO-RI-508833 Contenidos Introducción: Gestión de trabajos Workload Management System (WMS) Uso del WMS: –Envío de trabajos –Fases y Estados de los trabajos –Comandos útiles Arquitectura interna del WMS Tests y Rendimiento Algoritmos de Planificación

4 Enabling Grids for E-sciencE INFSO-RI-508833 Gestión de Trabajos ¿Qué es la gestión de trabajos y recursos dentro del Grid? ¿Por qué es importante? –Facilita la utilización al usuario –Coordina la utilización de los recursos –Más Rapidez –Más Efectividad ¿Cuáles son los retos y dificultades? –Falta de control sobre los recursos –Múltiples capas de planificadores –Recursos compartidos y varianza –Conflictos en los objetivos de rendimiento

5 Enabling Grids for E-sciencE INFSO-RI-508833 Gestión de trabajos Ejemplo: –usuario –Sistema Operativo –Gestor Local ( de trabajos batch/interactivos) Objetivo: ejecución automática de nuestros programas en un entorno grid. –fácilmente –De forma confiable y eficiente –¿Podemos lograr pulsar un botón y obtener los resultados esperados? Necesitaríamos algo como un Sistema Operativo distribuido, salvando dificultades extras… Aún no hay solución definitiva, de momento el Middleware Grid proporciona las partes básicas necesarias.

6 Enabling Grids for E-sciencE INFSO-RI-508833 Conceptos Trabajos –similar a un proceso. Recursos: –Computacionales, almacenamiento, datos, red, … Middleware Grid: –Unifica componentes diferentes, dando acceso a estos recursos y coordinando. Planificador bajo y alto nivel –Planificadores Locales: gestionan la carga en un dominio local. –Planificador de alto nivel(grid): mandan trabajos a los planificadores locales.

7 Enabling Grids for E-sciencE INFSO-RI-508833 Globus Planificador básico sería el usuario mismo Globus da el middleware básico para crear infraestructura grid  Pre-Webservices ( versión usada actualmente por gLite)  SOA (globus >= 4.0) Capas y componentes que da los servicios básicos:  Transferencia datos (GridFtp), Autenticación/Autoriza cion (proxies x.509), Sistema de informacion básico (MDS)

8 Enabling Grids for E-sciencE INFSO-RI-508833 Globus ¿Objetivo alcanzado? NO ES SUFICIENTE, Para coordinar componentes y automatizar estas fases nos falta: –Brokering o Gestión de recursos automática –Monitorización y reenvío de aplicaciones fallidas –Integración con sistemas de replicas de datos, … –En definitiva:  Worload Management System (WMS) o gestores de carga y trabajos, que coordinan las capas básicas para lograr nuestros objetivos. User Nodes

9 Enabling Grids for E-sciencE INFSO-RI-508833 Planificación de trabajos ¿Qué hacer para ejecutar un trabajo grid? Best-effort 3 grandes fases: –Descubrimiento de recursos –Recolección de información y Selección –Ejecución del trabajo Fase 1: Descubrimiento de recursos –Filtrado autorizaciones –Requerimientos de las aplicaciones –Filtrado de requerimientos mínimos

10 Enabling Grids for E-sciencE INFSO-RI-508833 Planificación de trabajos (2) Fase 2: Recolección de información y Selección –Recopilación de información dinámica –Selección y planificación Fase 3: Ejecución –Reserva (opcional) –Envío del trabajo –Tareas preparatorias –Ejecución y monitorización –Finalización y obtención de resultados –Tareas de Limpieza

11 Enabling Grids for E-sciencE INFSO-RI-508833 Hasta ahora como se envian trabajos con globus? Usar el Information System para ver que recursos (CEs) están disponibles: lcg-infosites --vo gilda ce #CPU Free Total Jobs Running Waiting ComputingElement ---------------------------------------------------------- 10 10 1 0 1 grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-short 10 10 0 0 0 grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-long 10 10 2 0 2 grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-infinite 48 48 0 0 0 grid010.ct.infn.it:2119/jobmanager-lcgpbs-short 48 48 0 0 0 grid010.ct.infn.it:2119/jobmanager-lcgpbs-long 48 48 0 0 0 grid010.ct.infn.it:2119/jobmanager-lcgpbs-infinite …….[30% shown]. Ver cual conviene, enviar con comandos globus (veremos en practicas): –globus-job-run iceage-ce-01.ct.infn.it:2119/jobmanager-lcgpbs - q long /bin/hostname

12 Enabling Grids for E-sciencE INFSO-RI-508833 Comprobar que el trabajo ha acabado bien, reenviar en caso contrario… Esto para cada trabajo, cada usuario. Es necesario automatizar todas las tareas…

13 Enabling Grids for E-sciencE INFSO-RI-508833 WMS – Workload Management System WMS gestiona los trabajos en nombre del usuario Usuario no tiene por qué decidir dónde corren los trabajos Usuario define el trabajo y requerimientos. WMS gestiona todo el proceso Resultado: Envío fácil Usuario separado de cambios en los recursos WMS balancea la carga a nivel global UserWMS Compute Elements

14 Enabling Grids for E-sciencE INFSO-RI-508833 14 WMS CEs Local Workstation UI UI (user interface) has preinstalled client software WMS User describes job in text file using Job Description Language Submits job to WMS using (usually) the command-line interface ssh Workload Management System

15 Enabling Grids for E-sciencE INFSO-RI-508833 Topologia del Grid y WMS Computing Element Storage Element Site X Information System submit query retrieve User Interface publish state File and Replica Catalogs Authorization Service query update credential publish state discover services

16 Enabling Grids for E-sciencE INFSO-RI-508833 Servicios Importantes: User Interface (UI) Punto de entrada al grid Cliente de –Servicios Globus (GSI, MDS/openldap, Gram, GridFtp, GASS,..) –Proxy Server –WMS (wmproxy client)  Envío de trabajos  Monitorización  Obtención de salida –Data Management (LFC)  Copia y registro  Réplica –Servicios de información ( II, BDII, R-GMA) Librerías de programación y APIs disponibles ( C++, Java) –Adicionalmente librerías mpi, openssl, … UI JDL

17 Enabling Grids for E-sciencE INFSO-RI-508833 Computing Element flavours  LCG-CE (GT4 pre-WS GRAM) –Globus client, Condor-G –Globus code not modified  CREAM (WS-I) –CREAM client, ICE –Condor-G (collaboration with Condor team) –BES (collaboration with OMII-EU for new BES 1.0 support)  Condor-C (was in gLite-CE) –Condor-G –Maintained by Condor –VDT includes BLAH & glexec BLAH is the interface to the local resource manager (via plug-ins) Condor-G Globus client gLite WMS User CREAM CEMon ICE CREAM or BES client EGEE authZ, InfoSys, Accounting In production Existing prototype gLite component non-gLite component Batch System LCG-CE (GT2/4 + add-ons) Condor-C BLAH User / Resource UI Site GIP

18 Enabling Grids for E-sciencE INFSO-RI-508833 Usar WMS Trabajos corren en batch mode en el grid. Pasos: 1.Crear Fichero de texto en “Job Description Language” 2.Comprobación opcional: list the compute elements that match your requirements (“list match” command) 3.Enviar el trabajo ~ “glite-wms-job-submit myfile.jdl” Non-blocking – Cada trabajo da un identificador. 4.Comprobar el estado del trabajo 5.Obtener el resultado del trabajo

19 Enabling Grids for E-sciencE INFSO-RI-508833 UI WMproxy Job Contr. Workload Manager LFC Inform. Service Computing Element Storage Element WMS node Characts. & status Job submission

20 Enabling Grids for E-sciencE INFSO-RI-508833 UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status Glite-wms-job-submit myjob.jdl Myjob.jdl JobType = “Normal”; Executable = "$(CMS)/exe/sum.exe"; InputSandbox = {"/home/user/WP1testC","/home/file*”, "/home/user/DATA/*"}; OutputSandbox = {“sim.err”, “test.out”, “sim.log"}; Requirements = other. GlueHostOperatingSystemName == “linux" && other. GlueHostOperatingSystemRelease == "Red Hat 7.3“ && other.GlueCEPolicyMaxCPUTime > 10000; Rank = other.GlueCEStateFreeCPUs; submitted Job Status Job Description Language (JDL) to specify job characteristics and requirements Job submission

21 Enabling Grids for E-sciencE INFSO-RI-508833 UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage Input Sandbox files Job waiting submitted Job Status WMproxy : network daemon responsible for accepting incoming requests Job submission

22 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage waiting submitted WM: acts to satisfy the request Job Workload manager

23 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage waiting submitted Match- Maker/ Broker Where must this job be executed ? Fase 1: Descubrimiento Recursos

24 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage waiting submitted Match- Maker/ Broker Matchmaker: responsible to find the “best” CE for a job Fase 1: Descubrimiento Recursos Filtrado autorizaciones Requerimientos de las aplicaciones Filtrado de requerimientos mínimos

25 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage waiting submitted Match- Maker/ Broker Where are (which SEs) the needed data ? What is the status of the Grid ? Fase 1: Descubrimiento Recursos Filtrado autorizaciones Requerimientos de las aplicaciones Filtrado de requerimientos mínimos Fase 2: Caracterización Información dinámica

26 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage waiting submitted Match- Maker/ Broker CE choice Fase 2: Selección y planificación

27 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage waiting submitted Job Adapter Job Adapter: responsible for the final “touches” to the job before performing submission (e.g. creation of wrapper script, PFN, etc.) Fase 2: Selección y planificación

28 Enabling Grids for E-sciencE INFSO-RI-508833 Fase 2: Selección y planificación Job submission UI WMproxy Job Contr. Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage Job Controller: responsible for the actual job management operations (done via CondorG) Job submitted waiting ready

29 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI WMproxy Job Contr. - CondorG Workload Manager LFC Inform. Service Computing Element Storage Element RB node CE characts & status SE characts & status RB storage Job submitted waiting ready scheduled Fase 3: Ejecución Reserva (opcional) Envío del trabajo

30 Enabling Grids for E-sciencE INFSO-RI-508833 Detalle del Computing Element (CE) Homogeneous set of worker nodes Grid gate node Local resource management system: Condor / PBS / LSF master Globus gatekeeper Job request Info system Logging gridmapfile I.S. Logging

31 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI Network Server Job Contr. - CondorG Workload Manager Replica Location Server Inform. Service Computing Element Storage Element RB node RB storage Job Status submitted waiting ready scheduled running “Grid enabled” data transfers/ accesses Job Input Sandbox files Fase 3: Ejecución Tareas preparatorias Ejecución y monitorización

32 Enabling Grids for E-sciencE INFSO-RI-508833 Job submission UI Network Server Job Contr. - CondorG Workload Manager Replica Location Server Inform. Service Computing Element Storage Element RB node RB storage Job Status Output Sandbox files submitted waiting ready scheduled running done Fase 3: Ejecución Finalización y obtención de Resultados (1) Tareas de Limpieza (1)

33 Enabling Grids for E-sciencE INFSO-RI-508833 Reenvío Automático de trabajos Si el trabajo falla puede deberse a varias causas: –Error del WMS –Error del middleware globus –Error del recurso remoto ( Máquina caída, mal configurada, error del SO) –Error del trabajo mismo Se puede configurar el reenvío automático (a otro recurso). El máximo de reenvíos sera el minimo entre: –Parámetro del JDL:  RetryCount = (1 para envío único, por defecto es 3) –Parámetro de configuración del WMS:  MaxRetryCount

34 Enabling Grids for E-sciencE INFSO-RI-508833 Consultar estado del trabajo Para controlar el estado actual del trabajo: glite-job-status [–verbosity 0|1|2 ] [--vo ] [-i ] –--verbosity cantidad de información entre 0 (menos) y 2 (más información) –-c fichero de configuración –-vo the Virtual Organization (si el usuario quiere elegirla) –-i Fichero contiene los job_ids de los trabajos a consultar

35 Enabling Grids for E-sciencE INFSO-RI-508833 Resultados del trabajo Para obtener los ficheros de salida del trabajo: glite-wms-job-output [-i ] –-i Fichero contiene los job_ids de los trabajos a consultar – contiene los identificadores de los trabajos

36 Enabling Grids for E-sciencE INFSO-RI-508833 Obtener resultados UI Network Server Job Contr. - CondorG Workload Manager Replica Location Server Inform. Service Computing Element Storage Element RB node RB storage Job Status submitted waiting ready scheduled running done Glite-wms-job-output

37 Enabling Grids for E-sciencE INFSO-RI-508833 Obtener resultados UI Network Server Job Contr. - CondorG Workload Manager Replica Location Server Inform. Service Computing Element Storage Element RB node RB storage Job Status Output Sandbox files submitted waiting ready scheduled running done cleared Fase 3: Ejecución Finalización y obtención de Resultados (2) Tareas de Limpieza (2)

38 Enabling Grids for E-sciencE INFSO-RI-508833 Otros comandos útiles: Historial Además del estado actual (glite-wms-job-status), podemos conocer el historial de los trabajos con: glite-job-get-logging info [–v 0|1|2 ] [--vo ] [-i ] –-v cantidad de información entre 0 (menos) y 2 (más información) –-c fichero de configuración –-vo the Virtual Organization (si el usuario quiere elegirla) –-i Fichero contiene los job_ids de los trabajos a consultar Puede dar mucha información, pero puede ser dificil interpretarla para descubrir errores: –Para identificar errores del trabajo, utilizar la salida estándar del mismo –Para identificar errores de mw y del testbed en general puede utilizarse: y también con algun truco los logs del CE, RB, … (no demasiado “amigable”)

39 Enabling Grids for E-sciencE INFSO-RI-508833 Job monitoring UI Log Monitor Logging & Bookkeeping Network Server Job Contr. - CondorG Workload Manager Computing Element RB node LM: parses CondorG log file (where CondorG logs info about jobs) and notifies LB LB: receives and stores job events; processes corresponding job status Log of job events glite-job-status glite-job-get-logging-info Job status

40 Enabling Grids for E-sciencE INFSO-RI-508833 Estados de un trabajo

41 Enabling Grids for E-sciencE INFSO-RI-508833 Otros comandos útiles: Lista recursos Para listar los recursos compatibles: Glite-wms-job-list-match [--rank] [-c ] [-vo ] [-o ] –Devuelve una lista de recursos (CEs) compatibles, ordenados por el rank –--rank devuelve el valor numérico calculado –-c fichero de configuración –-vo the Virtual Organization (si el usuario quiere elegirla) –-o la lista se guarde en

42 Enabling Grids for E-sciencE INFSO-RI-508833 WMS - The big picture

43 Enabling Grids for E-sciencE INFSO-RI-508833 Componentes del WMS Task queue –To keep submission requests if resources are not available –Matchmaking of jobs in the queue is tried periodically or upon resource availability changes (through ISM) Information Super Market (ISM) –Decouples information collection from its use –Updated by:  Notification of availability from gLite CE  Information Systems through ISM updater –Notifications from CE can trigger matchmaking Job submission –Using Globus GRAM (classic CE) –Using Condor-C (gLite CE)

44 Enabling Grids for E-sciencE INFSO-RI-508833 Servidor WMS/Resource Broker Recibe los trabajos y realiza las acciones adecuadas hasta su ejecución. Compuesto por varios demonios en la misma máquina: WMPROXY: recibe las peticiones del UI –Componentes Globus GSI/openssl para autenticación y autorización. –Recibe el trabajo y sus ficheros necesarios. Devuelve los ficheros de salida (a través de Globus GASS y gridFTP). –Recibe el proxy del usuario, y hace de interfaz con el ProxyServer para la renovación periódica. –Guarda el trabajo en una cola permanente.

45 Enabling Grids for E-sciencE INFSO-RI-508833 Resource Broker (2) Workload Manager (WM):Coordina la ejecución del trabajo –Obtiene trabajos de la cola permanente y va actualizando su estado. –Llama al Matchmaker para obtener recursos compatibles. –Selecciona el mejor dependiendo de la política utilizada. –Con los recursos llama al JobAdapter y después al JobController. MatchMaker (MM): busca recursos (CE) compatibles –Interfaz con el Sistema de Información, y de Data Management –Utiliza Condor ClassAds y matchmaking entre trabajos y recursos. –Implementa los algoritmos de selección de recursos. –Devuelve una lista de recursos compatibles

46 Enabling Grids for E-sciencE INFSO-RI-508833 Resource Broker (3) Job Adapter (JA): prepara el trabajo para la ejecución –Crea los scripts necesarios para ejecutar el trabajo en algún WN del CE seleccionado. Los wrapper scripts  Obtienen los ficheros de entrada necesarios del WMS y del Data Management Service  Establecen las variables de entorno necesarias.  Invocan correctamente el ejecutable del trabajo (normal, mpi,..)  Informan de cambios y posibles errores (ver siguiente L&B)  Upload de los ficheros de salida de usuario al WMS  Registro de posibles réplicas de datos de salida con Data Management Service  Acciones de limpieza al finalizar Job Controller (JC): interfaz con Condor-G –Envío fiable de trabajos a recursos globus, cancelación,.. –LogMonitor (LM), capta eventos importantes de Condor-G

47 Enabling Grids for E-sciencE INFSO-RI-508833 Logging & Bookeping (L&B) Almacena información sobre la ejecución de los trabajos –El estado actual de un trabajo –Historial de cambios de un trabajo Compuesto por –LB Server: Contiene la base de datos de los trabajos –LocalLogger: Aceptan mensajes de las fuentes que producen información sobre cambios en el trabajo.  Instalado en: RB, CE, (opcionalmente en el UI)  Envío asíncrono de mensajes al LB Server. –Librerias cliente(C++): informan al LocalLogger de los cambios  linkado en UI, RB, y usado por wrapper scripts

48 Enabling Grids for E-sciencE INFSO-RI-508833 WMPROXY – interfaz del WMS Introduction to WMPROXY Architecture of WMPROXY inside WMS Features and JDL attributes

49 Enabling Grids for E-sciencE INFSO-RI-508833 Introduction gLite idea was to move towards a Service Oriented Architecture (SOA) Imply services communicate through the exchange of messages –Moving to WS-* interfaces –Still missing a real standard. Many WS-* specifications –Activity inside OGF-GIN WMS started moving the access services: –(“old”) Network server receives user requests from UI, using an own protocol and interface. Communication from UI based on provided cli and apis –WMProxy service is web based and provides an standard interface to manage jobs.

50 Enabling Grids for E-sciencE INFSO-RI-508833 Taken from: M.Pappalardo - EuChina Grid Interoperability Meeting, Aprim 23 2007 50 WMPROXY features Workload Manager Proxy (WMProxy) –Developed by Datamat and included in the WMS –Web Service Interface  Simplicity/Extensibility  Accessibility: greater community of users  Integration: Eases interoperability among different middlewares –Stepping towards Interoperability  SOA conformance: WSDL service description  WS-I compliance: support for multi-language, multi-platform clients –Features  Provide Access to gLite Workload Management System  Serve a large number of requests  Improve performances  Improve usability  Provide new functionalities

51 Enabling Grids for E-sciencE INFSO-RI-508833 Taken from: M.Pappalardo - EuChina Grid Interoperability Meeting, Aprim 23 2007 51 WMProxy: Architecture (1/4) Service Container: –Apache + GridSite + FastCGI SOAP tooling –Stub generation is performed through gSOAP (C++) Security: –SSL Authentication –DN / FQAN-based Authorization Operations: –Job Submission and Control services implementation (C++) –Gridsite Delegation service implementation (C++)

52 Enabling Grids for E-sciencE INFSO-RI-508833 Taken from: M.Pappalardo - EuChina Grid Interoperability Meeting, Aprim 23 2007 52 WMProxy: Architecture (2/4) gSOAP layer: –intermediate layer between gSOAP and the WMProxy core Directory Manager: –Job reserved area Creation/Management on the server file system LB Access: –interaction with LB components –job registration –logging for job events –job information queries Request Delivery: –deliver request to Workload Management

53 Enabling Grids for E-sciencE INFSO-RI-508833 Taken from: M.Pappalardo - EuChina Grid Interoperability Meeting, Aprim 23 2007 53 WMProxy: Architecture (3/4) WMProxy integration with the WMS LB Proxy Workload Manager Client Local File System LB Data Base Server Host Logging & Bookkeeping MOD SSL MOD FastCGI WMProxy Server Apache Request Queue SOAP/ HTTPS Gridsite Delegation Job Sub/Contr.

54 Enabling Grids for E-sciencE INFSO-RI-508833 Taken from: M.Pappalardo - EuChina Grid Interoperability Meeting, Aprim 23 2007 54 WMProxy: Architecture (4/4) WMProxy modules Client WMProxy Operations LB AccessDelegation Request Delivery Directory Manager AuthorizationgSOAP Layer gSOAP Independant WMProxy Server

55 Enabling Grids for E-sciencE INFSO-RI-508833 Usage: Command Line Interface Interface is described in the WSDL Command line interface based on the that one to provide access: glite-wms-job-submit submits a job to a WMProxy Service. It requires a JDL file as input and returns a WMS job identifier. glite-wms-delegate-proxy allows the user to delegate her proxy credential to the WMProxy service. –This delegated credential can then be used for job submissions. glite-wms-job-list-match lists the identifiers of jobs submitted to a WMProxy Service by the user issuing the command. glite-wms-job-cancel cancels one or more jobs previously submitted to WMProxy Service. glite-wms-job-output Retrieve output files of a job, when finished. After this operation the job itself is purged and no more operation can be done on it glite-wms-job-perusal Manage the perusal functionality for a certain job such us: –Enabling perusal for one (or more) file(s) - Allowing perusal file retrieval - Disabling perusal functionality glite-wms-job-info (new in 3.1): Allow retrieving useful information about the user delegated proxy, the delegated identification details of the user, the jdl of a previously submitted job, etc

56 Enabling Grids for E-sciencE INFSO-RI-508833 Resúmen componentes del WMS (II) ReplicaCatalogue Logging & Book-keeping ResourceBrokerStorageElementComputingElement InformationService Job Status DataSets info Author. &Authen. Job Submit Event Job Query Job Status Input “sandbox” Input “sandbox” + Broker Info Output “sandbox” Publish SE & CE info “User interface”

57 Enabling Grids for E-sciencE INFSO-RI-508833 Other Wmproxy Usage Features Credential delegation (glite-wms-delegate-proxy) is used to make the security framework lighter: –Time consuming proxy delegation is done once per session –Job submission uses the delegation id to send jobs –Still can be delegated with each job-submission (as before) – not recommended Types of Requests: –JOB, DAG, COLLECTION Types of supported JOB: –NORMAL, INTERACTIVE, MPICH, PARTITIONABLE(deprecated), CHECHKPOINTABLE(deprecated), PARAMETRIC Bulk job submission: enables submission of multiple jobs at the same time –Reduces time of submission –Single call to WMProxy server –Single Authentication and Authorization process –Sharing of files between jobs Job’s Sandboxes: share common files Asynchronous Job Start

58 Enabling Grids for E-sciencE INFSO-RI-508833 Examples Taken from: TEGEE-JRA1-TEC-590869-JDL- Attributes-v0-8T 58 Features: JDL Attributes Inclusion of pre- and post- execution scripts: –PROLOGUE, EPILOGUE –PROLOGUEARGUMENTS, EPILOGUEARGUMENTS Compression and expansion of input sandbox files: –ZippedISB = “BossArchive_1_2_1.tgz”; –AllowZippedISB = true; (overrides ZippedIsb with the input sandbox files) Define how much time should the job be maintained in queue for execution: –ExpiryTime = 1112339655; Job Perusal: obtain partial results of the output files before job finishes: –PerusalFileEnable = true; –PerusalTimeInterval = 10; –PerusalFilesDestURI = “gsiftp://ghemon.cnaf.infn.it/home/glite/peek”; (not mandatory, could use the glite-wms-job-perusal command to retrieve files)

59 Enabling Grids for E-sciencE INFSO-RI-508833 Data Requirements JDL Attributes Sandbox files can be stored at a https/gridftp server: –InputSandboxBaseURI = "gsiftp://matrix.datamat.it:5432/tmp"; or multiple servers:  OutputSandbox = { "myjobOutput","run1/event1","myjobError"};  OutputSandboxDestURI = { "gsiftp://matrix.datamat.it:5432/tmp/myjobOutput ", "gsiftp://grid003.ct.infn.it:6789/home/cms/event1", "myjobError“}; DataRequirements contains 3 attributes: –InputData: List of InputData = { “lfn:/EO.test.file”, “lds:cms.test.file”, “guid:135b7b23-4a6a-11d7-87e7-9d101f8c8b70”, “query:select_my_DC1_files” }; –DataCatalogType (“rls”, “si” storage-index, “dli” data location interface) –DataCatalog (addess of catalog - DataCatalog = http://data.example.org/CMSDataSetCatalog ); http://data.example.org/CMSDataSetCatalog Matchmaking to find a CE close to the SE: –OutputSE = “grid001.cnaf.infn.it";

60 Enabling Grids for E-sciencE INFSO-RI-508833 Data Requirements Example DataRequirements = { [ DataCatalogType = "DLI"; DataCatalog = "https://cms.org:8877/dli"; InputData = {"lfn:/my/test/data1", "guid:44rr44rr77hh77kkaa3", "lds:my.test.dataset", "query:my_query"}; ], [ DataCatalogType = "SI"; DataCatalog = "https://glite.org:9443/StorageIndex"; InputData = {"lfn:/eo/test.file", "guid:ddffrg5451"}; ], [ DataCatalogType = "RLS"; DataCatalog = "https://eu-datagrid.org/RLS"; InputData = {"lfn:/atlas/test.file", "guid:ggrgrg5656"}; ], [ DataCatalogType = "RLS"; InputData = {"lfn:/myvo/test.file", "guid:adbdefgilm1234"}; ],.... };

61 Enabling Grids for E-sciencE INFSO-RI-508833 Other Features Shallow resubmision: when submission fails due to a mw failure, and not application fail. –ShallowRetryCount = 3; Deep resubmision: RetryCount = 0; –shallow retry count is reset to zero each time a deep resubmission of the job is done. Collections: set of independent jobs –Attributes like a DAG, but no Dependencies among nodes set. nodes = { [n1], [n2], …};

62 Enabling Grids for E-sciencE INFSO-RI-508833 Complex Workflows Direct Acyclic Graph (DAG) is a set of jobs where the input, output, or execution of one or more jobs depends on one or more other jobs A Collection is a group of jobs with no dependencies –basically a collection of JDL’s A Parametric job is a job having one or more attributes in the JDL that vary their values according to parameters Using compound jobs it is possible to have one shot submission of a (possibly very large, up to thousands) group of jobs –Submission time reduction  Single call to WMProxy server  Single Authentication and Authorization process  Sharing of files between jobs –Availability of both a single Job Id to manage the group as a whole and an Id for each single job in the group nodeE nodeC nodeA nodeD nodeB

63 Enabling Grids for E-sciencE INFSO-RI-508833 Other features in WMS Hold and resume of jobs MPI without shared filesystems File peeking (read-only file access while job is running) Pilot jobs –Speed bulk jobs –Submit pilot to CE to prepare execution environment and then pull jobs to be executed from RB CE reputability ranking –Statistics about recent job failures in CE –Information to be used for scheduling

64 Enabling Grids for E-sciencE INFSO-RI-508833 ICE-CREAM CE evolution CREAM: Web Service Computing Element –Cream WSDL allows defining custom user interface –C++ CLI interface allows direct submission Lightweight Fast notification of job status changes –via CEMon Improved security –no “fork-scheduler” Will support for bulk jobs on the CE –optimization of staging of input sandboxes for jobs with shared files ICE: Interface to Cream Environment –being integrated in WMS for submissions to CREAM

65 Enabling Grids for E-sciencE INFSO-RI-508833 Test WMS- Rendimiento Results of the WMS testing presented at the EGEE-06 conference –CMS: 100 collections * 200 jobs/collection, 3 UIs, 33 CEs  ~ 2.5 h to submit jobs 0.5 seconds/job  ~ 17 hours to transfer jobs to a CE 3 seconds/job 26K jobs/day  Negligible failure rate due to WMS –Shallow resubmission  failure rate drops to less than 1% with 3 resubmissions ATLAS CMS (Transparencia EGEE/INFN)

66 Enabling Grids for E-sciencE INFSO-RI-508833 ALGORITMOS DE PLANIFICACIÓN Encargados de elegir el CE donde se va a mandar el trabajo. Algoritmos de matchmaking realizan –Fase 1: Descubrimiento de recursos, y –Fase 2: Recolección de información y Selección. Depende de: –Requerimientos del trabajo (JDL) –Preferencias del usuario (JDL) –Características y estado de los CEs (Sistema Información) –Localización de los datos necesarios en los SEs (Data Management) Escenarios posibles: 1.Envío directo 2.Trabajo sin requerimientos de datos 3.Trabajo con requerimientos de datos

67 Enabling Grids for E-sciencE INFSO-RI-508833 Envío directo del trabajo Cuando se sabe a qué recurso se quiere enviar: –Glite-wms-job-submit –resource  Añade en JDL el atributo SubmitTo= En ese caso no se realiza NINGÚN paso del algoritmo de matchmaking ni otras comprobaciones: –No comprueba si el usuario está autorizado –No comprueba si el sitio acepta trabajos. (Producción,…) –No se interacciona con el Catálogo de ficheros (Data Management) ni con el sistema de información –No se utiliza ni Requirements, ni Rank, ni ningún atributo relacionado con los Catálogos de ficheros

68 Enabling Grids for E-sciencE INFSO-RI-508833 Trabajos sin requerimientos de datos Se especifican requerimientos sobre el CE (atributo Requirements), pero no sobre datos El algoritmo interacciona con el Sistema de Información en dos Fases: –Fase 1: Descubrimiento de recursos (y comprobación de requirements):  Contacta con el BDII para obtener lista inicial de recursos  En los que esté autorizado  Cumplan los requirements del JDL  Si el trabajo ha reenviado automáticamente, se quitan los anteriores que fallan  La lista se pasa a la siguiente fase –Fase 2: Caracterización de recursos (y cálculo del RANK)  Se contacta con cada CE (GRIS) para obtener la información más actualizada ( se optimiza consultando al BDII en algunos casos)  Se obtienen los atributos del RANK y se calcula su valor para cada CE

69 Enabling Grids for E-sciencE INFSO-RI-508833 Trabajos sin requerimientos de datos (2) Una vez se tiene la lista de CEs ordenada por el RANK: –El WM selecciona el que tiene mayor rango calculado –Si hay varios con el mismo rango máximo, se selecciona aleatoriamente uno de ellos Se puede indicar que se quiere selección aleatoria total, se puede indicar en el JDL: –Rank = 1; –(Todos los CEs tienen el mismo rango, se selecciona uno al azar) Se puede decir que se adopte una selección estocástica: –Se pone en el JDL el atributo FuzzyRank = true; –El rango calculado del CE = probabilidad de ser seleccionado –Cuanto mayor rango, más probabilidades

70 Enabling Grids for E-sciencE INFSO-RI-508833 Se puede utilizar este algoritmo para enviar a un sitio determinado, añadiendo en el JDL: –Requirements = other.GlueCEUniqueId == “ " ;  (ej:Requirements = other.GlueCEUniqueId == “cg05.ific.uv.es:2119/jobmanager-lcgpbs-long" ;) En este caso realizaría la comprobación de requeriments, autorización, etcétera

71 Enabling Grids for E-sciencE INFSO-RI-508833 Trabajo con requerimientos de datos Tiene en cuenta la localización de ficheros remotos, interaccionando con el Data Management System: –Para saber los SEs donde están los ficheros de entrada –Y los SEs donde se debe guardar la salida Antes de la Fase 1 (Requirements) y 2 (Rank): –Hace una fase de pre-match con los datos –Filtra los CEs que cumplan los requerimientos de datos

72 Enabling Grids for E-sciencE INFSO-RI-508833 Requerimientos sobre réplicas de datos Establecidos a través de otros atributos del JDL: –InputData representa los ficheros de entrada remotos  InputData = {“lfn:mi-fichero1”,”lfn:mi-fichero2”};  Logical File Name, ver presentación de Data Management. –DataAccessProtocol define los protocolos que pueden ser usados por la aplicación para acceder a los ficheros de entrada  DataAccessProtocol = “gsiftp”; –OutputSE (opcional) SE donde se quiere guardar los ficheros de salida por el trabajo (ver algoritmo pre-match)  OutputSE = “gilda-se-01.pd.infn.it”; –OutputData (opcional) define los datos de salida para que sean registrados automáticamente  OutputData = { [ OutputFile="my_file_1.out"; LogicalFileName="lfn:my_test_result“; StorageElement="lxshare0291.cern.ch" ], [ OutputFile="my_file_2.out“; LogicalFileName="lfn:my_debugging" ] };

73 Enabling Grids for E-sciencE INFSO-RI-508833 Pre-Match 1) Contacta con el DataManagement (LFC) para resolver LFNs y recolectar info sobre SEs con al menos un fich de InputData. 2) Contacta al BDII: Se buscan los CEs que cumplen autorización y OutputSE esta en cerca (CloseCE) Además, estos SE deben hablar al menos un DataAccessProtocol. –Obtener SEMountPoint –Se cuentan el número de ficheros proporcionados por cada SE Clasifica por el número de ficheros almacenados en cada SE. OutputSE is a closeSE for CEId For each SE close to CEId One SEProtocol belongs to one DataAcces sProtocol Retrieve SEMountPoint Count ….. yes no CE list for file size for

74 Enabling Grids for E-sciencE INFSO-RI-508833 Fases 1 (Requirements) y 2 (Rank) Fase check Requirements: –Se empieza con los CEs que tienen el máximo número de ficheros. –Se van quitando los que no cumplan los requerimientos del usuario. Fase Ranking: –Se realiza de igual manera al tradicional –Se puede poner el nuevo atributo:  Rank = other.DataAccessCost; (estima costes acceso fichero)

75 Enabling Grids for E-sciencE INFSO-RI-508833 Fichero BrokerInfo Para conocer datos como –El CE donde se esta ejecutando el trabajo –Las localizaciones exactas de los ficheros de entrada (InputData) –Otras informaciones importantes Se crea el fichero.BrokerInfo por el WMS (RB) y es enviado con el trabajo: –Disponible en el WN durante la ejecución del trabajo –Disponible para el Usuario, si se pone en OutputSandbox: OutputSandbox = {“.BrokerInfo”, ….}; Basado en sintaxis Classads, se puede parsear usando comandos

76 Enabling Grids for E-sciencE INFSO-RI-508833 Ejemplo.BrokerInfo [ ComputingElement = [ CloseStorageElements = { [ GlueSAStateAvailableSpace = 399645448; GlueCESEBindCEAccesspoint = "/flatfiles/SE00"; mount = GlueCESEBindCEAccessPoint; name = "grid009.to.infn.it"; freespace = GlueSAStateAvailableSpace ] }; name = "grid008.to.infn.it:2119/jobmanager-lcgpbs-long" ]; InputFNs = { }; StorageElements = { }; VirtualOrganisation = "dteam" ]

77 Enabling Grids for E-sciencE INFSO-RI-508833 Ejemplo.BrokerInfo DataAccessProtocol = { "gridftp", "file" }; InputFNs = { [ name = "lfn:wp1-test-file-01-lfn"; SFNs = { "sfn://testbed013.cern.ch/wp1/wp1-test-file-01", "sfn://testbed113.cern.ch/wp1/wp1-test-file-01" } ], [ name = "lfn:wp1-test-file-02-lfn"; SFNs = { "sfn://testbed001.cern.ch/wp1/wp1-test-file-02", "sfn://testbed005.cern.ch/wp1/wp1-test-file-02" } ], [ name = "lfn:wp1-test-file-03-lfn"; SFNs = { "sfn://testbed002.cern.ch/wp1/wp1-test-file-03" } ] }

78 Enabling Grids for E-sciencE INFSO-RI-508833 (Obsoleto) Comando BrokerInfo (WN y UI) /opt/glite/bin/glite-brokerinfo [-v] [-f filename] function [parameter] [parameter]... -v : for verbose, formatted output -f : for specify a brokerinfo file –function is one of the following:  getCE returns the name of the CE the job is running on  getVirtulOrganization returns the name of the VO specified in the VirtualOrganization JDL attribute  getDataAccessProtocol returns the protocol list specified in the DataAccessProtocol JDL attribute  getInputData returns the files specified in the InputData JDL attribute  getSEs returns the list of the SE with contain a copy of at least one file among those specified in the InputData JDL attribute  getCloseSEs returns a list of SEs close to the CE  getSEMountPoint returns the access point for the specified, if it is in the list of close SEs of the WN  getSEPort returns the port number used by for the data transfer protocol  getLFN2SFN returns the storage file name of the file specified by is a logical file name of a GUID specified in the InputData attribute

79 Enabling Grids for E-sciencE INFSO-RI-508833 Referencias Usado Material de diversas presentaciones de Egee y diversos autores. Gilda Tutorials: https://grid.ct.infn.it/twiki/bin/view/GILDA/UserTutorials https://grid.ct.infn.it/twiki/bin/view/GILDA/UserTutorials WMPROXY user Guide: https://edms.cern.ch/document/674643/1 https://edms.cern.ch/document/674643/1 Atributos JDL: https://edms.cern.ch/document/590869/1


Descargar ppt "INFSO-RI-508833 Enabling Grids for E-sciencE www.eu-egee.org Gestión de trabajos en Glite Álvaro Fernández Casaní (IFIC – CSIC) Curso Grid y E-ciencia."

Presentaciones similares


Anuncios Google