Universit degli Studi di Bari Corso di Laurea
Università degli Studi di Bari – Corso di Laurea Specialistica in Informatica “Tecnologia dei Servizi “Grid e cloud computing” A. A. 2009/2010 Giorgio Pietro Maggi giorgio. maggi@ba. infn. it, http: //www. ba. infn. it/~maggi Lezione 9 a - 16 Dicembre 2009 Il materiale didattico usato in questo corso è stato mutuato da quello utilizzato da Paolo Veronesi per il corso di Griglie Computazionali per la Laurea Specialistica in Informatica tenuto nell’anno accademico 2008/09 presso l’Università degli Studi di Ferrara. Paolo Veronesi paolo. veronesi@cnaf. infn. it, pveronesi@unife. it http: //www. cnaf. infn. it/~pveronesi/unife/ Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 0
Outline p UI p Computing Element p Workload Management System Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 1
Today’s focus: Information Services Execution Management • Job description & submission • Scheduling • Resource provisioning Data Services • Common access facilities • Efficient & reliable transport • Replication services Resource Management Self-Management • Discovery • Monitoring • Control • Self-configuration • Self-optimization • Self-healing OGSA Information Services Security • Registry • Notification • Logging/auditing • Cross-organizational users • Trust nobody • Authorized access only DONE OGSA “profiles” Web services foundation DONE Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 2
User Interface (UI) p UI is the user’s interface to the Grid - Command-line interface to n n Attribute/Proxy certificate Job operations p p p n Data operations p p p n p To submit a job Monitor its status Retrieve output Upload file to SE Create replica Discover replicas Other grid services To run a job user creates a JDL (Job Description Language) file Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 3
PART I Computing Element Definition Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 4
Computing Services in the Layered Grid Architecture Internet Architecture Computing Element “Sharing single resources”: negotiating access, controlling use” Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a Collective Application Resource Connectivity Transport Internet Fabric Link 5 Internet Protocol Architecture Application
Computing resources at the fabric layer p Cluster. A cluster is a container that groups together n n p p Subclusters: Subcluster elements represent “homogeneous” collections of computational nodes; Nodes: unique nodes, such as individual computing nodes. A cluster may be referenced by more then one computing services at the “Resource” layer. Sub. Cluster. A subcluster represents a “homogeneous” collection of nodes, where the homogeneity is defined by a collection whose required node attributes all have the same value. For example, a subcluster represents a set of nodes with the same CPU, memory, OS, network interfaces, etc. Strictly speaking, subclusters are not necessary, but they provide a convenient way of representing useful collections of nodes. A subcluster captures a node count and the set of attributes for which homogeneous values are being asserted. Host. Represents a physical computing element. This element characterizes the physical configuration of a computing node: processors, software, storage elements, etc. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 6
Computing resources at the fabric layer: hierarchy Resource Fabric Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 7
Computing Element (1/3) p p p The CE service needs an abstract representation in order to save information about CE service instances in a Grid Information Service and perform discovery. The schema expresses an abstraction (for example, the CE properties and functionality) in a structured, machine-processable form. The “GLUE” CE schema contains a minimum but necessary set of qualifying attributes needed to distinguish different service instances and to perform discovery. Typically some of the attributes are static, or rarely change, while other attributes, for example the ones about the status of the CE, are dynamic. The schema described in the following slides, is based on the following CE abstraction: an entry point into a queuing system. n n There is one computing element per queue. <hostname_LRMS>: <port>/<LRMS-queue> Queuing systems with multiple queues are represented by creating one computing element per queue. The information associated with a computing element is limited only to information relevant to the queue. All information about the physical resources access by a queue are represented by the Cluster information element. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 8
Computing Element (2/3) p p The Computing Element (CE) is the service representing a computing resource and comprises a set of functionalities related to computing. Functionalities: n n n job management (job submission, job control, etc. ), provision of information about the resource characteristics and status, resource reservation enforcement, resource reservation usage monitoring, Accounting: must measure user activities on the CE resources, providing resource usage information. This information, after having been properly translated in an appropriate format, is then forwarded to the Grid Accounting System. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 9
Computing Element (3/3) p p p A CE refers to a set, or cluster of computational resources, managed by a Local Resource Management Systems (LRMS). This cluster can encompass resources that are heterogeneous in their hardware and software configuration. When a CE encompasses heterogeneous resources, it is not sufficient to let the underlying LRMS dispatch jobs to any worker nodes. Instead, when a job has been submitted to a CE, the underlying resource management system must be instructed to submit the job to a resource matching the requirements specified by the user. The interface with the underlying LRMS must be very well specified (possibly according to existing standards), to ease the integration of new resource management systems (even by third party entities) as needed. The definition and provision of common interfaces to different resource management systems is still an open issue, but there are proposed recommendations currently under discussion (such as the Distributed Resource Management Architecture API, DRMAA, currently discussed within the Global Grid Forum). Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 10
Job types Sequential, batch jobs p Parallel (MPI) jobs p Checkpointable jobs p Interactive jobs p DAG jobs (set of jobs with inter-dependencies modeled with Directed Cycle-Free Graphs) p Partitionable jobs p n Jobs to be partitioned within the CE Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 11
Push vs pull model A given CE can work both in push as pull mode. p PUSH: the job is pushed to a CE for its execution. When a job is pushed to a CE, it gets accepted only if there are resources matching the requirements specified by the user, and which are usable according to the local policies set by the local administrator. The jobs gets then dispatched to a worker node matching all these constraints. p PULL: the CE is asking the Workload Management Service (i. e. the job scheduler) for jobs. When a CE is willing to receive a job (according to policies specified by the local administrator, e. g. when the CE local queue is empty or it is getting empty), it requests a job from a known Workload Management Service. This notification request must include the characteristics and the policies applied to the available resources, so that this information can be used by the Workload Management Service to select a suitable job to be executed on the considered resource. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 12
Pull model: getting a job from the Workload Manager Service p p Approach 1: the CE requests a job from all known Workload Management Services. If two or more Workload Management Services offer a job, only the first one to arrive is accepted by the CE, while the others are refused. Approach 2: the CE requests a job from just one Workload Management Service. The CE then gets ready to accept a job from this Workload Management Service. If the contacted Workload Management Service has no job to offer within a certain time frame, another Workload Management Service is notified. Such a mechanism would allow supporting priorities on resource usage: a CE belonging to a certain VO would contact first a Workload Management Service referring to that VO, and only if it does not have jobs to be executed, the Workload Management Services of other VOs are notified, according to policies defined by the owner of the resource. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 13
1. Job Management is the main functionality provided by the CE. It allows to: 1. run jobs (which includes also the staging of all the required files). Characteristics and requirements of jobs that must be executed are specified by using a given language, for example the Job Description Language (JDL) (which is also used within the whole job scheduler - Workload Management System); 2. get an assessment of the foreseen quality of service for a given job to be submitted: • • 3. 4. 5. 6. 7. existence of resources matching the requirements and available according to the local policies local queue traversal time (the time elapsed since the job entered the queue of the LRMS until it starts execution). cancel previously submitted jobs; suspend / resume jobs, if the LRMS allows these operations; send signals to jobs. get the status of some specified jobs, or of all the active jobs ``belonging'' to the user issuing the request; be notified on job status, for example when a job changes its status or when a certain status is reached. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 14
2. Information Provisioning A CE must also provide information describing itself. p In the push model this information is published in the information Service, and it is used during resource discovery (through the match-making engine in the workload manager) which matches available resources to queued jobs. p In the pull model the CE information is embedded in the ``CE availability'‘ message, which is sent by the CE to a Workload Management Service. The matchmaker then uses this information to find a suitable job for the CE. p The information that each CE should provide will include: 1. 2. 3. 4. the characteristics of the CE (e. g. the types and numbers of existing resources, their hardware and software configurations, etc. ); the status of the CE (e. g. the number of in use and available resources, the number of running and pending jobs, etc. ); the policies enforced on the CE resources (e. g. the list of users and/or VOs authorized to run jobs on the resources of the CE, etc. ). resource usage: must measure user activities on the CE resources, providing resource usage information. This information, after having been properly translated in an appropriate format, has to be forwarded to the Grid Accounting System. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 15
PART II CE Information Schema Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 16
CE Information Schema Structure (1/3) p The Computing Element is a container and can include the following objects: n Info (required): p Unique. ID: unique identifier for the computing element. Example: CE-hn: CE-port/jobmanager-CE-lrms-CE-queue p p n Information. Service. URL: URL of the local information service providing for info about this entity. Name: a name for this service State (optional): p p p LRMSType: Name of local resource management system LRMSVersion: Version of local resource manager GRAMVersion: the GRAM (Grid Resource Access Manager) version Host. Name: fully qualified host name for host exposing the CE interface under consideration. Gatekeeper. Port: Port number on which the CE service is listening. Total. CPUs. Num: Number of CPUs available to the jobs submitted to the CE. NB: this number should not be used to total available resources as more then one job queue may be pointed to the same physical resources Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 17
CE Information Schema Structure (2/3) p Policy (optional) : n n n p Max. Wall. Clock. Time: the maximum wall clock time allowed for jobs submitted to the CE in mins (0=not specified) Max. CPUTime: the maximum CPU time allowed for jobs submitted to the CE in mins (0=not specified) Max. Total. Jobs: the maximum allowed number of jobs in the CE (0=not specified) Max. Running. Jobs: the maximum number of jobs allowed to be running (0=not specified) Priority: info about the Queue Priority State (optional) : n n n Running. Jobs: Number of currently running jobs Total. Jobs: number of jobs in the CE (=Running. Jobs+Waiting. Jobs) Status: queue status which can be p p n n 1. Queueing: the queue can accept job submission, but can’t be served by the scheduler 2. Production: the queue can accept job submissions and is served by a scheduler 3. Closed: The queue can’t accept job submission and can’t be served by a scheduler 4. Draining: the queue can’t accept job submission, but can be served by a scheduler Waiting. Jobs: number of jobs that are in a state different than running Worst. Response. Time: Worst time between job submission till when job starts its execution in sec Estimated. Response. Time: Estimated time between job submission till when job starts its execution in sec Free. CPUs: Number of free CPUs available to a scheduler (generally used with Condor) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 18
CE Information Schema Structure (3/3) p Job (optional, and not used in production): n n n p Local. Owner: Owner local username Global. Owner: Owner GSI subject name Local. ID: Job local id Global. ID: Job global id Status: Job status {SUBMITTED, WAITING, READY, SCHEDULED, RUNNING, ABORTED, DONE, CLEARED, CHECKPOINTED} Scheduler. Specific: Scheduler specific info Access. Control. Base (optional): n Rule: A rule that grants/denies access to the Computing Element service. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 19
CE Info Generalization Aggregation Composition (strong Aggregation) State Policy Job Access Control Base Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 20
Computing Element (CE) A CE is a grid batch queue with a “grid gate” front-end: L&B Logging Job request Gatekeeper Information system Resource BDII Accounting Grid gate node Local resource management system: Condor / PBS / LSF master Set of worker nodes (WNs) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 21
wms Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 22
CE and Workload Management System Grid Architecture Application Workload Management System Computing Element Collective Resource Connectivity Fabric Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 23
Workload Management System (WMS) p The user interacts with Grid via a Workload Management System for job submission. p The Goal of WMS is the distributed job scheduling and resource management in a Grid environment. p What does it allow Grid users to do? n n n n n Find the list of resources suitable to run a specific job Submit a job/DAG for execution on a remote Computing Element Check the status of a submitted job/DAG Cancel one or more submitted jobs/DAGs Retrieve the output files of a completed job/DAG (output sandbox) Retrieve and display bookkeeping information about submitted jobs/DAGs Retrieve and display logging information about submitted jobs/DAGs Retrieve checkpoint states of a submitted checkpointable job Start a local listener for an interactive job p The WMS tries to optimize the usage of resources Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 24
Submission p p For a computation job there are two main types of request: submission and cancellation. In particular the meaning of the submission request is to pass the responsibility of the job to the WM. The WM will then pass the job to an appropriate CE for execution, taking into account the requirements and the preferences expressed in the job description. The decision of which resource should be used is the outcome of a matchmaking process between the submission requests and the available resources. The availability of resources for a particular task depends not only on the state of the resources, but also on the utilization policies that the resource administrators and/or the administrator of the VO the user belongs to have put in place. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 25
WMS Components p WMS is currently composed of the following parts: 1. User Interface (UI) : access point for the user to the WMS; this is the place where the user interacts with WMS 2. Workload Management System(WMS) : the broker of GRID resources, responsible to find the “best” resources where to submit jobs 3. Job Submission Service (JSS) : provides a reliable submission system, i. e. delivers jobs to the computing elements chosen by the resource broker, resubmission is attempted in case of failure according to the job owner request. 4. Information cache : a repository of resource information that is available in read only mode to the matchmaking engine and whose update is the result of either the arrival of notifications or active polling of resources or some arbitrary combination of both. 5. Logging and Bookkeeping services (LB) : service provides support for the job monitoring functionality: it stores logging and bookkeeping information concerning events generated by the various components of the WMS. Using this information, the LB service keeps a state machine view of each job. 6. 7. Task Queue Proxy renewal: a Proxy Renewal Service is available to assure that, for all the lifetime of a job, a valid user proxy exists within the WMS, and this proxy renewal service relies on the. My. Proxy service for renewing credentials associated to the request. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 26
Task queue It gives the possibility to keep a submission request for a while if no resources are immediately available that match the job requirements. p Non-matching requests will be retried either periodically (in an eager scheduling approach) or as soon as notifications of available resources appear in the ISM (in a lazy scheduling – i. e. pull - approach). p Alternatively such situations could only lead to an immediate abort of the job for lack of a matching resource. p Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 27
Proxy certificate p p A job gets associated a valid proxy certificate (the submitting user’s one) when it is submitted by the WMS-User Interface. Validity of such a certificate is set by default to 12 hours unless a longer validity is explicitly requested by the user when generating the proxy. Problems could occur if the job spends on CE (in a queue or running) more time than lifetime of its proxy certificate. In order to submit long-running jobs, users can either generate proxy credentials with an appropriate lifetime or (more safely) rely on the features of the My. Proxy server. The underlying idea is that the user registers in a My. Proxy server a valid long-term certificate proxy that will be used by the WMS to perform a periodic credential renewal for the submitted job; in this way the user is no longer obliged to create very long lifetime proxies when submitting jobs lasting for a great amount of time. The My. Proxy credential repository system consists of a server and a set of client tools that can be used to delegate and retrieve credentials to and from a server. Normally, a user would n n 1. start by using the myproxy_init client program along with the permanent credentials necessary to contact the server 2. delegate a set of proxy credentials to the server along with authentication information and retrieval restrictions. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 28
Job Preparation p. Information to be specified n Job characteristics (e. g. executable, stdin, etc. ) n Requirements and Preferences of the computing system (e. g. CPU speed, multi-processor machines, …) n Software dependencies (i. e. needed software to be installed already on machines which will eventually execute the job) n Job Data requirements element, etc. ) (e. g. input data, output storage n Optimization creteria p. All this is specified using a Job Description Language (JDL) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 29
Job Description Language (JDL) 1/5 p p p Based upon Condor’s CLASSified ADvertisement language (Class. Ad): a simple expression-based language to specify both resources and requests. Class. Ad is a fully extensible language Class. Ad is constructed with the classad construction operator [] p It is a sequence of attributes separated by semi-colons. p An attribute is a pair (key, value), where value can be a Boolean, an Integer, a list of strings, … p <attribute> = <value>; p e. g. [ attr 1 = value 1; attr 2 = value 2; . . . attrn = valuen; ] So, the JDL allows to define a set of attribute, the WMS takes into account when making its scheduling decision Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 30
Job Description Language (JDL) 2/5 p The supported attributes are grouped in two categories: n Job (Attributes) Define the job itself n Resources p Taken into account by the WMS for carrying out the matchmaking algorithm p Computing Resource (Attributes) Used to build expressions of Requirements and/or Rank attributes by the user Have to be prefixed with “other. ” p Data and Storage resources (Attributes) Input data to process, SE where to store output data, protocols spoken by application when accessing SEs Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 31
Job Description Language (JDL): relevant attributes 3/5 p Executable (mandatory) n p Arguments (optional) n p List of environment settings Input. Sandbox (optional) n n p Standard input/output/error of the job Environment (optional) n p Job command line arguments Std. Input, Std. Output, Std. Err (optional) n p The command name List of files on the UI local disk needed by the job for running The listed files will automatically staged to the remote resource Output. Sandbox (optional) n List of files, generated by the job, which have to be retrieved Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 32
Job Description Language (JDL): relevant attributes 4/5 p Requirements n n n Job requirements on computing resources Specified using attributes of resources published in the Information Service If not specified, default value defined in UI configuration file is considered p p Default: other. Active (the resource has to be able to accept jobs) Rank n n n Expresses preference (how to rank resources that have already met the Requirements expression) Specified using attributes of resources published in the Information Service If not specified, default value defined in the UI configuration file is considered p Default: -other. Estimated. Traversal. Time (the lowest estimated traversal time) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 33
Job Description Language (JDL): “data” attributes 5/5 p Input. Data (optional) n n p Replica. Catalog (mandatory if Input. Data has been specified with at least one Logical File Name) n p The Replica Catalog Identifier Data. Access. Protocol (mandatory if Input. Data has been specified) n p Refers to data used as input by the job: these data are published in the Replica Catalog and stored in the SEs) PFNs and/or LFNs The protocol or the list of protocols which the application is able to speak with for accessing Input. Data on a given SE Output. SE (optional) n n The Uniform Resource Identifier of the output SE WMS uses it to choose a CE that is compatible with the job and is close to SE Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 34
Examples JDL File (1) Executable = “grid. Test”; Std. Error = “stderr. log”; Std. Output = “stdout. log”; Input. Sandbox = {“home/veronesi/test/grid. Test”}; Output. Sandbox = {“stderr. log”, “stdout. log”}; Input. Data = “LF: testbed 0 -00019”; Replica. Catalog = “ldap: //sunlab 2 g. cnaf. infn. it: 2010/ lc=test, rc=WP 2 INFN Test, dc=infn, dc=it”; Data. Access. Protocol = “gridftp”; Requirements = other. Architecture==“INTEL” && other. Op. Sys==“LINUX” && other. Free. Cpus >=4; Rank = “other. Max. Cpu. Time”; Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 35
Examples JDL File (2) p Such a JDL would make the myexe executable be transferred on a remote CE whose queue is managed by the PBS batch system and be run taking the myinput. txt file (also copied form the UI node) as input. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 36
DAG description p Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a where n 1. jdl, n 2. jdl and n 3. jdl are in turn job descriptions representing the nodes of the DAG and the dependencies attributes states that node. B and node. C cannot start before node. A has been successfully executed 37
Input/output sandbox p p It is important to note that the input and output sandboxes are intended for relatively small files (few megabytes) like scripts, standard input, and standard output streams. If you are using large input files or generating large output files, you should instead directly read from or write to a storage element. As each submitting user is assigned by the WMS with a limited quota on the WMS machine disk, abuse of the input and output sandboxes will shortly make the quota fill-up and the WMS not accept further jobs submission for the given user. Input sandbox: n p let’s suppose to have a job that needs for the execution a certain set of files having a small size and available on the submitting machine. Let’s also suppose that for performance reasons it is preferable not going through the data transfer services for the staging of these files on the executing node. Then the user can use the Input. Sandbox attribute to specify the files that have to be copied from the submitting machine to the execution CE via the WMS. Output sandbox: n For the standard output and error of the job the user shall instead always specify just file names (without any directory path) through the Std. Output and Std. Error JDL attributes. To have them copied back on the WMS-UI machine it suffices to list them in the Output. Sandbox and use after job completion the job-output command described later in this document. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 38
Requirement and rank p p p The parameters Requirements and Rank control the resource matching for the job. The expression given for the requirements specifies the constraints necessary for a job to run. If more than one resource matches the job requirements, then the rank is used to determine which is the most desirable resource i. e. the one to which the job is submitted (the higher the rank value the better is the resource). Both, the Requirements and the rank attributes, can be arbitrary expressions which use the parameters published by the resources in the Information System Examples: n to express that a job requires at least 25 minutes of CPU time and 100 minutes of real time, the expression is: Requirements = other. Glue. CEPolicy. Max. CPUTime >= 1500 && other. Glue. CEPolicy. Max. Wall. Clock. Time >= 6000; n Glue. Host. Application. Software. Run. Time. Environment is usually used to describe application software packages which are installed on a site. For example: Requirements = Member(other. Glue. Host. Application. Software. Run. Time. Environment , "ALICE-3. 07. 01"); n n Rank = - other. Glue. CEState. Estimated. Response. Time Rank = other. Glue. CEState. Free. CPUs ; Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 39
WMS main commands (1/2) p p p job-list-match: Displays the list of identifiers of the resources (and the corresponding ranks - if requested) on which the user is authorized and satisfying the job requirements included in the JDL. This only works for jobs; for DAGs you have to issue this commands on the single nodes JDLs. job-submits a job/DAG to the grid. It requires a JDL file as input and returns a job/DAG Identifier. job-status This command prints the status of a job/DAG previously submitted using glite-job-submit. n n n The job status request is sent to the LB (Logging and Bookkeeping service) that provides the requested information. When issued for a DAG it provides the status information for the DAG itself and all of its nodes. It is also possible to retrieve the status of individual nodes of a DAG simply passing their own identifiers to the command. The LB service using the job/DAG related events sent by each WMS component handling the request, keeps a state machine view of each job/DAG. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 40
WMS main commands (2/2) p job-output The glite-job-output command can be used to retrieve the output files of a job/DAG that has been submitted with a job description file including the Output Sandbox attribute. n n p After the submission, when the job/DAG has terminated its execution, the user can upload the files generated by the job/DAG and temporarily stored on the WMSmachine as specified by the Output. Sandbox attribute, issuing the job-output with as input the ID returned by the job submission command As a DAG does not have its own output sandbox, when the command is issues for such a request retrieves the output sandboxes of all the DAG nodes. job-cancel This command cancels a job previously submitted using glite-job-submit. Before cancellation, it prompts the user for confirmation. n It is not allowed to issue a cancel request for a node of a DAG: you have to cancel the whole DAG using the provided handle instead. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 41
Job States p p p SUBMITTED: the user has submitted the job via UI WAITING. the WMS has received the job READY: A CE, which matches job requirements, has been selected, and the job is transferred to the JSS SCHEDULED: the JSS has sent the job to the CE RUNNING: the job is running on the CE DONE: this state has different meanings: - p OUTPUTREADY: the output sandbox is ready to be retrieved by the user n p p DONE (ok) : the execution has terminated on the CE (WN) with success DONE (failure) : the execution has terminated on the CE (WN) with some problems DONE (cancelled) : the job has been cancelled with success reflects the time difference between end of computation on CE and the moment WMS got necessary notification about job termination. CLEARED: the user has retrieved all output files successfully, and the job bookkeeping information is purged some time after the job enters in this state. ABORTED: the job has failed n The job may fail for several reasons one of them is external to its execution (no resource found). Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 42
State Diagram SUBMITTED WAITING READY DONE(cancelled) SCHEDULED ABORTED RUNNING DONE(failed) DONE(ok) OUTPUTREADY CLEARED Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 43
Job identifier p The Job (and DAG) Identifiers produced by the workload management software of the form: https: //edt 003. cnaf. infn. it: 9000/Ny. IYrq. E_a 8 igk 4 f 0 CLXNKA p p The first part of the Id (https: //edt 003. cnaf. infn. it: 9000 in the example above) is the endpoint URL of the LB server holding the job/DAG logging and bookkeeping information and this allows the WMS to know which LB server has to be contacted for monitoring a given job/DAG. The second part (Ny. IYrq. E_a 8 igk 4 f 0 CLXNKA) generated by the WMSUI taking into account some client local information ensures instead grid-wide uniqueness of the identifier. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 44
Job Submission Scenario Logical File Catalog (LFC) UI JDL Information Service (IS) WMS Logging & Bookkeeping (LB) Job Submission Service (JSS) Storage Element (SE) Compute Element CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 45
A Job Submission Example UI JDL Logical File Catalog (LFC) Input Sandbox Information Service (IS) Job Status submitted Job Submit Event (WMS) Logging & Bookkeeping (LB) Job Submission Service (JSS) Storage Element (SE) Compute Element (CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 46
A Job Submission Example UI JDL Logical File Catalog (LFC) Information Service (IS) Job Status submitted waiting WMS Logging & Bookkeeping (LB) Job Submission Service (JSS) Storage Element (SE) Compute Element (CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 47
A Job Submission Example Logical File Catalog (LFC) UI JDL Information Service (IS) Job Status submitted waiting ready WMS Logging & Bookkeeping (LB) Job Submission Service (JSS) Storage Element (SE) Compute Element (CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 48
A Job Submission Example UI JDL Logical File Catalog (LFC) Information Service (IS) Job Status submitted waiting ready (WMS) Logging & Bookkeeping (LB) Broker. Info Storage Element (SE) Job Submission Service (JSS) Compute Element (CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 49 scheduled
A Job Submission Example Logical File Catalog (LFC) UI JDL Job Status submitted Information Service (IS) waiting ready Input Sandbox scheduled (WMS) running Logging & Bookkeeping (LB) Job Submission Service (JSS) Storage Element (SE) Compute Element (CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 50
A Job Submission Example Logical File Catalog (LFC) UI JDL Job Status submitted Information Service (IS) waiting ready scheduled (WMS) running Logging & Bookkeeping (LB) Job Submission Service (JSS) Job Status Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a Storage Element (SE) Computing Element (CE) 51
A Job Submission Example Logical File Catalog (LFC) UI JDL Job Status submitted Information Service waiting ready scheduled WMS running Storage Element Logging & Bookkeeping Job Submission Service Job Status Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a Compute Element 52 done
A Job Submission Example Logical File Catalog UI JDL Job Status submitted Information Service waiting ready scheduled WMS running Storage Element Logging & Bookkeeping Job Submission Service Output Sandbox Job Status Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a done outputready Compute Element 53
A Job Submission Example Logical File Catalog (LFC) UI JDL Job Status submitted Information Service (IS) waiting ready scheduled Output Sandbox WMS running Logging & Bookkeeping (LB) Job Submission Service (JS) Storage Element (SE) outputready Compute Element (CE) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a done 54 cleared
Job resubmission p. If something goes wrong, the WMS tries to reschedule and resubmit the job (possibly to a different resource) p. Maximum number of resubmissions (considering all the resources matching the requirements): min(Retry. Count, submission_retries) n Retry. Count: JDL attribute n submission_retries: attribute in the WMS configuration file p. E. g. , to disable job resubmission for a particular job: Retry. Count=0; in the JDL file Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 55
User Interface configuration file p Can be set if user is not happy with default one p Most relevant attributes: n WMSes p n LBserver(s) p p p n The LB to be used for a job is chosen by the WMS So when a dg-job-status <dg-jobid> is issued, the LB to contact is specified in the dg-jobid This list specifies the LB(s) that must be contacted when issuing a dg-job-status –all / dgjob-get-logging-info –all (to have information for all the jobs belonging to that user) Default JDL Requirements p n When submitting a job, the first specified WMS is tried, if the operation fails the second one is considered, etc. other. active Default JDL Rank p - other. Estimated. Traversal. Time Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 56
Job Submission Phases 1. 2. 3. 4. User logs in on the User Interface User issues a voms-proxy-init and enters his certificate’s password, getting a valid proxy certificate User configures the Job Description Language file describing the submission profile User issues a: job-submit Hello. World. jdl 1. and gets back from the system a unique Job Identifier (Job. Id) 5. User issues a: job-status Job. Id 1. to get logging information about the current status of his Job 6. When the “Output. Ready” status is reached, the user can issue a job-get-output Job. Id to retrieve the output generated. The system returns the name of the temporary directory where the job output can be found on the User Interface machine. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 57
Scheduling (1/3) p Scheduling is the core functionality of the WMS. It has to find the best suitable computing resource (CE) where the job will be executed. p It interacts with Data Management service and Information Service. They supply the job scheduler with all the information required for the resolution of the matches. p The CE chosen by the job scheduler has to match the job requirements (e. g. runtime environment, data access requirements, and so on). p. If two or more CEs satisfy all the requirements, the one with the best Rank is chosen. p. The job scheduler has to deal with three Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a possible scenarios 58
Scheduling (2/3) Scenario 1: Direct Job Submission p p Job is scheduled on a given CE (specified in the job-submit command via –r option) WMS doesn’t perform any matchmaking algorithm Scenario 2: Job Submission without data-access Requirements p p Neither CE nor input data are specified. The scheduler starts the matchmaking algorithm, which consists of two phases: § Requirements check (WMS contacts the local cache or the Information Service to check which CEs satisfy all the requirements) § If more than one CE satisfies the job requirements, the CE with the best rank is chosen by the scheduler Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 59
Scheduling (3/3) Scenario 3: Job Submission with also data-access Requirements p p CE is not specified in the JDL The scheduler interacts with Data Management service to find out the most suitable CE taking into account also the SEs where both input data sets are physically stored and output data sets should be staged on completion of job execution The scheduler strategy consists of submitting jobs close to data The main two phases of the match making algorithm remain unchanged: § Requirements check § Rank computation p What changes with respect to the second scenario? Now, the scheduler restricts the search to the CEs that satisfy the data -access requirements (for example, which are close to data, i. e. part of the same Grid site) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 60
Workload Management System Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 61
Job management requests (submission, cancellation) expressed via a Job Description Language (JDL) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 62
Keeps submission Requests are kept for a while, waiting for being dispatched If there is no matching resource available Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 63
Repository of resource information Updated via notifications and/or active polling on sources Provide matchmaker With information to decide best resources for request. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 64
Finds an appropriate CE or resource for job request according to the information from ISM. Taking into account job preferences, resource status, policies on resources Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 65
Performs the actual job submission and monitoring Normally it is Condor. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 66
Computing Element is the place where you jobs run Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 67
Workload Manager Proxy WMProxy n n Provides access to WMS functionality through a Web Services based interface Each job submitted to a WMProxy Service is given the delegated credentials of the user who submitted it. These credentials can then be used to perform operations requiring interactions with other services WMProxy advantages: p p p n web service, SOAP job collections, DAG jobs, shared and compressed sandboxes WMProxy caveats: p p needs delegated credentials Delegate once, submit many Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 68
p Workload Manager (WM) n Is responsible for p p Information Supermarket (ISM) n is responsible for p p Calls Matchmaker to find the resource which best matches the job requirements. Interacting with Information System and File catalog. Calculates the ranking of all the matchmaked resource basically consists of a repository of resource information that is available in read only mode to the matchmaking engine Job Adapter n is responsible for p making the final touches to the JDL expression for a job, before it is passed to Condor. C for the actual submission p creating the job wrapper script that creates the appropriate execution environment in the CE worker node § transfer of the input and of the output sandboxes Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 69
p Job Controller (JC) n p Is responsible for p Converts the condor submit file into Class. Ad p hands over the job to Condor. C Condor n responsible for p performing the actual job management operations: job submission, removal p Log Monitor n is responsible for p watching the Condor log file p intercepting interesting events concerning active jobs § events affecting the job state machine p triggering appropriate actions. Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 70
p Task Queue n n n Gives the possibility to keep track of the requests if no resources are immediatelly avalaible Non-matching requests will be retried periodically (eager scheduling) Or wait for notification of avalaible resources (lazy scheduling) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 71
Computing Element is built on a homogeneous farm of computing nodes (called Worker Nodes) Also there are many components inside CE such as gatekeeper, globus-jobmanager, . . Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 72
Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a Gatekeeper Grants access to the CE and map grid user to a local user id. 73
Batch System A cluster of compute nodes controlled by a head node. handles the job execution Example: Torque (Open PBS), PBS Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 74
Location of files Network Daemon UI LFC Characteristics of resources Workload Manager Inform. Service Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a CE characts & status Storage Element 75
Daemon responsible for accepting incoming requests Network Daemon JDL LFC waiting UI Input Sandbox files Workload WMS Manager storage Inform. Service glite-wms-job-submit myjob. jdl Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a submitted CE characts & status Storage Element 76
Job Status submitted Network Daemon UI LFC waiting Job Workload WMS Manager storage WM: responsible to take the appropriate actions to satisfy the request Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a Inform. Service CE characts & status Storage Element 77
submitted Network Daemon UI Workload WMS Manager storage LFC waiting Match. Maker/ Broker Inform. Service Where this job can be executed ? Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a CE characts & status Storage Element 78
submitted Network Matchmaker: responsible Daemon UI to find the “best” CE where to submit a job LFC waiting Match. Maker/ Broker Workload WMS Manager storage Inform. Service Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a CE characts & status Storage Element 79
Where is the needed Input. Data ? submitted Network Daemon UI LFC Workload WMS Manager storage Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a waiting Match. Maker/ Broker Inform. Service What is the status of the Grid ? CE characts & status Storage Element 80
submitted Network Daemon UI Workload WMS Manager storage LFC waiting Match. Maker/ Broker Inform. Service CE choice Job Contr. Condor. G WMS Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a CE characts & status Storage Element 81
submitted Network Daemon LFC waiting UI Workload WMS Manager storage Job Contr. Condor. G Inform. Service Job Adapter CE characts JA: responsible WMS for the final “touches” & status to the job before performing submission (e. g. creation of wrapper script, etc. ) Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a SE characts & status Storage Element 82
submitted Network Daemon LFC waiting UI ready Workload WMS Manager storage Inform. Service Job Contr. Condor. G JC: responsible for the actual job management operations (done via Condor. G) Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a WMS CE characts & status Storage Element 83
submitted Network Daemon LFC waiting UI Workload WMS Manager storage ready Inform. Service scheduled Job Contr. Condor. G Input Sandbox files Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a WMS CE characts & status SE characts & status Job Storage Element 84
submitted Network Daemon LFC waiting UI Workload WMS Manager storage ready Inform. Service scheduled Job Contr. Condor. G Input Sandbox running WMS “Grid enabled” data transfers/ accesses Computing Element Storage Element Job Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 85
submitted Network Daemon LFC waiting UI Workload WMS Manager storage ready Inform. Service scheduled Job Contr. Condor. G Output Sandbox files Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a running WMS done Storage Element 86
submitted Network Daemon LFC waiting UI Workload WMS Manager storage glite-wms-get-output <job. ID> Output Sandbox Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a ready Inform. Service scheduled Job Contr. Condor. G running WMS done Storage Element 87
submitted Network Daemon LFC waiting UI Output Sandbox files Workload WMS Manager storage ready Inform. Service scheduled Job Contr. Condor. G running done WMS cleared Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a Storage Element 88
glite-wms-job-status <job. ID> glite-wms-job-logging-info <job. ID> UI Network Daemon LB: receives and stores job events; processes corresponding job status Job status LB proxy Logging & Bookkeeping Workload Manager Job Contr. Condor. G WMS Log of job events Computing Element Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 89
Other core Grid services VOMS p My. Proxy p FTS (File Transfer Service) p LFC (Logical File Catalog) p Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 90
References p EGEE User’s Guide: WMS Service, EGEE-JRA 1 -TEC-572489 (https: //edms. cern. ch/document/572489/1), see Section 1 and 2. p p EGEE Middleware Architecture and planning, EU Deliverable DJRA 1. 4, EGEE-DJRA 1. 1 -594698 -v 1. 0, (https: //edms. cern. ch/document/594698/), see Section 8 Class. Ad (https: //www. cs. wisc. edu/condor/classad) Tecnologia dei Servizi “Grid e cloud computing” - Lezione 9 a 91
- Slides: 92