condor tutorial ggf-5 / hpdc-11 july 2002

190
John Bent and Douglas Thain Computer Sciences Department University of Wisconsin-Madison [email protected], [email protected] http://www.cs.wisc.edu/condor Condor Tutorial GGF-5 / HPDC-11 July 2002

Upload: sharla

Post on 11-Feb-2016

43 views

Category:

Documents


1 download

DESCRIPTION

Condor Tutorial GGF-5 / HPDC-11 July 2002. Outline. Session One - Doug About Condor (17 slides) Frieda the Scientist (26 slides) Session Two – John Managing Jobs (25 slides) Sharing Resources (30 slides) Session Three – Doug Expanding to the Grid (36 slides) Case Study: DTF (17 slides) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Condor Tutorial GGF-5 / HPDC-11 July 2002

John Bent and Douglas ThainComputer Sciences DepartmentUniversity of Wisconsin-Madison

[email protected], [email protected]://www.cs.wisc.edu/condor

Condor TutorialGGF-5 / HPDC-11

July 2002

Page 2: Condor Tutorial GGF-5 / HPDC-11 July 2002

2http://www.cs.wisc.edu/condor

Outline› Session One - Doug

About Condor (17 slides) Frieda the Scientist (26 slides)

› Session Two – John Managing Jobs (25 slides) Sharing Resources (30 slides)

› Session Three – Doug Expanding to the Grid (36 slides) Case Study: DTF (17 slides)

› Session Four - John Research Directions (38 slides) Wrap-Up and Discussion

Page 3: Condor Tutorial GGF-5 / HPDC-11 July 2002

3http://www.cs.wisc.edu/condor

About Condor

› What does Condor do?› What is Condor good for?› What kind of results can I

expect?

Page 4: Condor Tutorial GGF-5 / HPDC-11 July 2002

4http://www.cs.wisc.edu/condor

The Condor Project (Established ‘85)Distributed High Throughput Computing research performed by a team of ~25 faculty, full time staff and students who:

face software engineering challenges in a distributed UNIX/Linux/NT environment,

are involved in national and international collaborations, actively interact with academic and commercial users, maintain and support a large distributed production

environment, and educate and train students.

Funding – US Govt. (DoD, DoE, NASA, NSF),AT&T, IBM, INTEL, Microsoft UW-Madison

Page 5: Condor Tutorial GGF-5 / HPDC-11 July 2002

5http://www.cs.wisc.edu/condor

What is High-Throughput Computing?› High-performance: CPU cycles/second

under ideal circumstances. “How fast can I run simulation X on this

machine?”› High-throughput: CPU cycles/day (week,

month, year?) under non-ideal circumstances. “How many times can I run simulation X in the

next month using all available machines?”

Page 6: Condor Tutorial GGF-5 / HPDC-11 July 2002

6http://www.cs.wisc.edu/condor

What is Condor?› Condor converts collections of

distributively owned workstations and dedicated clusters into a distributed high-throughput computing facility.

› Condor uses ClassAd Matchmaking to make sure that everyone is happy.

Page 7: Condor Tutorial GGF-5 / HPDC-11 July 2002

7http://www.cs.wisc.edu/condor

The Condor System› Unix and NT› Operational since 1986› Manages more than 1300 CPUs at

UW-Madison› Software available free on the web› More than 150 Condor installations

worldwide in academia and industry

Page 8: Condor Tutorial GGF-5 / HPDC-11 July 2002

8http://www.cs.wisc.edu/condor

Some HTC Challenges› Condor does whatever it takes to run

your jobs, even if some machines… Crash (or are disconnected) Run out of disk space Don’t have your software installed Are frequently needed by others Are far away & managed by someone else

Page 9: Condor Tutorial GGF-5 / HPDC-11 July 2002

9http://www.cs.wisc.edu/condor

What is ClassAd Matchmaking?

› Condor uses ClassAd Matchmaking to make sure that work gets done within the constraints of both users and owners.

› Users (jobs) have constraints: “I need an Alpha with 256 MB RAM”

› Owners (machines) have constraints: “Only run jobs when I am away from my desk

and never run jobs owned by Bob.”

Page 10: Condor Tutorial GGF-5 / HPDC-11 July 2002

10http://www.cs.wisc.edu/condor

Upgrade to Condor-GA Grid-enabled version of Condor that provides robust job management for Globus.

Robust replacement for globusrun Provides extensive fault-tolerance Brings Condor’s job management

features to Globus jobs

Page 11: Condor Tutorial GGF-5 / HPDC-11 July 2002

11http://www.cs.wisc.edu/condor

What Have We Done on the Grid Already?

› Example: NUG30 quadratic assignment problem 30 facilities, 30 locations

• minimize cost of transferring materials between them

posed in 1968 as challenge, long unsolved

but with a good pruning algorithm & high-throughput computing...

Page 12: Condor Tutorial GGF-5 / HPDC-11 July 2002

12http://www.cs.wisc.edu/condor

NUG30 Solved on the Grid with Condor +

GlobusResource simultaneously utilized:› the Origin 2000 (through LSF ) at NCSA.› the Chiba City Linux cluster at Argonne › the SGI Origin 2000 at Argonne. › the main Condor pool at Wisconsin (600 processors)› the Condor pool at Georgia Tech (190 Linux boxes) › the Condor pool at UNM (40 processors)› the Condor pool at Columbia (16 processors) › the Condor pool at Northwestern (12 processors) › the Condor pool at NCSA (65 processors)› the Condor pool at INFN (200 processors)

Page 13: Condor Tutorial GGF-5 / HPDC-11 July 2002

13http://www.cs.wisc.edu/condor

NUG30 - Solved!!!Sender: [email protected] Subject: Re: Let the festivities begin.

Hi dear Condor Team,

you all have been amazing. NUG30 required 10.9 years of Condor Time. In just seven days ! More stats tomorrow !!! We are off celebrating !condor rules !cheers,JP.

Page 14: Condor Tutorial GGF-5 / HPDC-11 July 2002

14http://www.cs.wisc.edu/condor

The IdeaComputing power

is everywhere, we try to make it usable

by anyone.

Page 15: Condor Tutorial GGF-5 / HPDC-11 July 2002

15http://www.cs.wisc.edu/condor

Outline› About Condor› Frieda the Scientist› Managing Jobs› Sharing Resources› Expanding to the Grid› Case Study: DTF› Research Directions

Page 16: Condor Tutorial GGF-5 / HPDC-11 July 2002

16http://www.cs.wisc.edu/condor

Meet Frieda.She is a

scientist. But she has a

bigproblem.

Page 17: Condor Tutorial GGF-5 / HPDC-11 July 2002

17http://www.cs.wisc.edu/condor

Frieda’s Application …Simulate the behavior of F(x,y,z) for 20 values of x, 10 values of y and 3 values of z (20*10*3 = 600 combinations) F takes on the average 3 hours to compute

on a “typical” workstation (total = 1800 hours) F requires a “moderate” (128MB) amount of

memory F performs “moderate” I/O - (x,y,z) is 5 MB

and F(x,y,z) is 50 MB

Page 18: Condor Tutorial GGF-5 / HPDC-11 July 2002

18http://www.cs.wisc.edu/condor

I have 600simulations to run.

Where can I get help?

Page 19: Condor Tutorial GGF-5 / HPDC-11 July 2002

Norim the Genie:“Install a Personal Condor!”

Page 20: Condor Tutorial GGF-5 / HPDC-11 July 2002

20http://www.cs.wisc.edu/condor

Installing Condor› Download Condor for your operating

system› Available as a free download from

http://www.cs.wisc.edu/condor› Stable –vs- Developer Releases

Naming scheme similar to the Linux Kernel…› Available for most Unix platforms and

Windows NT

Page 21: Condor Tutorial GGF-5 / HPDC-11 July 2002

21http://www.cs.wisc.edu/condor

So Frieda Installs Personal Condor on her

machine…› What do we mean by a “Personal” Condor? Condor on your own workstation, no

root access required, no system administrator intervention needed

› So after installation, Frieda submits her jobs to her Personal Condor…

Page 22: Condor Tutorial GGF-5 / HPDC-11 July 2002

22http://www.cs.wisc.edu/condor

yourworkstation

personalCondor

600 Condorjobs

Page 23: Condor Tutorial GGF-5 / HPDC-11 July 2002

23http://www.cs.wisc.edu/condor

Personal Condor?!

What’s the benefit of a Condor “Pool” with just

one user and one machine?

Page 24: Condor Tutorial GGF-5 / HPDC-11 July 2002

24http://www.cs.wisc.edu/condor

Your Personal Condor will ...› … keep an eye on your jobs and will

keep you posted on their progress› … implement your policy on the

execution order of the jobs› … keep a log of your job activities› … add fault tolerance to your jobs› … implement your policy on when the

jobs can run on your workstation

Page 25: Condor Tutorial GGF-5 / HPDC-11 July 2002

25http://www.cs.wisc.edu/condor

Getting Started: Submitting Jobs to

Condor› Choosing a “Universe” for your job Just use VANILLA for now

› Make your job “batch-ready”› Creating a submit description file› Run condor_submit on your submit

description file

Page 26: Condor Tutorial GGF-5 / HPDC-11 July 2002

26http://www.cs.wisc.edu/condor

Making your job batch-ready

› Must be able to run in the background: no interactive input, windows, GUI, etc.

› Can still use STDIN, STDOUT, and STDERR (the keyboard and the screen), but files are used for these instead of the actual devices

› Organize data files

Page 27: Condor Tutorial GGF-5 / HPDC-11 July 2002

27http://www.cs.wisc.edu/condor

Creating a Submit Description File

› A plain ASCII text file› Tells Condor about your job:

Which executable, universe, input, output and error files to use, command-line arguments, environment variables, any special requirements or preferences (more on this later)

› Can describe many jobs at once (a “cluster”) each with different input, arguments, output, etc.

Page 28: Condor Tutorial GGF-5 / HPDC-11 July 2002

28http://www.cs.wisc.edu/condor

Simple Submit Description File

# Simple condor_submit input file# (Lines beginning with # are comments)# NOTE: the words on the left side are not# case sensitive, but filenames are!Universe = vanillaExecutable = my_jobQueue

Page 29: Condor Tutorial GGF-5 / HPDC-11 July 2002

29http://www.cs.wisc.edu/condor

Running condor_submit› You give condor_submit the name of the

submit file you have created› condor_submit parses the file, checks for

errors, and creates a “ClassAd” that describes your job(s)

› Sends your job’s ClassAd(s) and executable to the condor_schedd, which stores the job in its queue Atomic operation, two-phase commit

› View the queue with condor_q

Page 30: Condor Tutorial GGF-5 / HPDC-11 July 2002

30http://www.cs.wisc.edu/condor

Running condor_submit% condor_submit my_job.submit-fileSubmitting job(s).1 job(s) submitted to cluster 1.

% condor_q

-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> : ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD

1.0 frieda 6/16 06:52 0+00:00:00 I 0 0.0 my_job

1 jobs; 1 idle, 0 running, 0 held

%

Page 31: Condor Tutorial GGF-5 / HPDC-11 July 2002

31http://www.cs.wisc.edu/condor

Another Submit Description File

# Example condor_submit input file# (Lines beginning with # are comments)# NOTE: the words on the left side are not# case sensitive, but filenames are!Universe = vanillaExecutable = /home/wright/condor/my_job.condorInput = my_job.stdinOutput = my_job.stdoutError = my_job.stderrArguments = -arg1 -arg2InitialDir = /home/wright/condor/run_1Queue

Page 32: Condor Tutorial GGF-5 / HPDC-11 July 2002

32http://www.cs.wisc.edu/condor

“Clusters” and “Processes”› If your submit file describes multiple jobs,

we call this a “cluster”› Each job within a cluster is called a

“process” or “proc”› If you only specify one job, you still get a

cluster, but it has only one process› A Condor “Job ID” is the cluster number, a

period, and the process number (“23.5”)› Process numbers always start at 0

Page 33: Condor Tutorial GGF-5 / HPDC-11 July 2002

33http://www.cs.wisc.edu/condor

Example Submit Description File for a

Cluster# Example condor_submit input file that defines# a cluster of two jobs with different iwdUniverse = vanillaExecutable = my_jobArguments = -arg1 -arg2

InitialDir = run_0 Queue Becomes job 2.0InitialDir = run_1

Queue Becomes job 2.1

Page 34: Condor Tutorial GGF-5 / HPDC-11 July 2002

34http://www.cs.wisc.edu/condor

% condor_submit my_job.submit-file

Submitting job(s).2 job(s) submitted to cluster 2.

% condor_q

-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> : ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD 1.0 frieda 6/16 06:52 0+00:02:11 R 0 0.0 my_job 2.0 frieda 6/16 06:56 0+00:00:00 I 0 0.0 my_job

2.1 frieda 6/16 06:56 0+00:00:00 I 0 0.0 my_job

3 jobs; 2 idle, 1 running, 0 held

%

Page 35: Condor Tutorial GGF-5 / HPDC-11 July 2002

35http://www.cs.wisc.edu/condor

Submit Description File for a BIG Cluster of Jobs

› Specify initial directory for each job is specified with the $(Process) macro, and instead of submitting a single job, we use “Queue 600” to submit 600 jobs at once

› $(Process) will be expanded to the process number for each job in the cluster (from 0 up to 599 in this case), so we’ll have “run_0”, “run_1”, … “run_599” directories

› All the input/output files will be in different directories!

Page 36: Condor Tutorial GGF-5 / HPDC-11 July 2002

36http://www.cs.wisc.edu/condor

Submit Description File for a BIG Cluster of Jobs

# Example condor_submit input file that defines# a cluster of 600 jobs with different iwdUniverse = vanillaExecutable = my_jobArguments = -arg1 –arg2InitialDir = run_$(Process)Queue 600

Page 37: Condor Tutorial GGF-5 / HPDC-11 July 2002

37http://www.cs.wisc.edu/condor

Using condor_rm› If you want to remove a job from the

Condor queue, you use condor_rm› You can only remove jobs that you own

(you can’t run condor_rm on someone else’s jobs unless you are root)

› You can give specific job ID’s (cluster or cluster.proc), or you can remove all of your jobs with the “-a” option.

Page 38: Condor Tutorial GGF-5 / HPDC-11 July 2002

38http://www.cs.wisc.edu/condor

Temporarily halt a Job› Use condor_hold to place a job on

hold Kills job if currently running Will not attempt to restart job until

released› Use condor_release to remove a hold

and permit job to be scheduled again

Page 39: Condor Tutorial GGF-5 / HPDC-11 July 2002

39http://www.cs.wisc.edu/condor

Using condor_history› Once your job completes, it will no

longer show up in condor_q › You can use condor_history to view

information about a completed job› The status field (“ST”) will have either a

“C” for “completed”, or an “X” if the job was removed with condor_rm

Page 40: Condor Tutorial GGF-5 / HPDC-11 July 2002

40http://www.cs.wisc.edu/condor

Getting Email from Condor

› By default, Condor will send you email when your jobs completes With lots of information about the run

› If you don’t want this email, put this in your submit file:

notification = never

› If you want email every time something happens to your job (preempt, exit, etc), use this:

notification = always

Page 41: Condor Tutorial GGF-5 / HPDC-11 July 2002

41http://www.cs.wisc.edu/condor

Getting Email from Condor (cont’d)

› If you only want email in case of errors, use this:

notification = error

› By default, the email is sent to your account on the host you submitted from. If you want the email to go to a different address, use this:

notify_user = [email protected]

Page 42: Condor Tutorial GGF-5 / HPDC-11 July 2002

42http://www.cs.wisc.edu/condor

Outline› About Condor› Frieda the Scientist› Managing Jobs› Sharing Resources› Expanding to the Grid› Case Study: DTF› Research Directions

Page 43: Condor Tutorial GGF-5 / HPDC-11 July 2002

43http://www.cs.wisc.edu/condor

A Job’s life story: The “User Log” file

› A UserLog must be specified in your submit file: Log = filename

› You get a log entry for everything that happens to your job: When it was submitted, when it starts

executing, preempted, restarted, completes, if there are any problems, etc.

› Very useful! Highly recommended!

Page 44: Condor Tutorial GGF-5 / HPDC-11 July 2002

44http://www.cs.wisc.edu/condor

Sample Condor User Log

000 (8135.000.000) 05/25 19:10:03 Job submitted from host: <128.105.146.14:1816>

...

001 (8135.000.000) 05/25 19:12:17 Job executing on host: <128.105.165.131:1026>

...

005 (8135.000.000) 05/25 19:13:06 Job terminated.

(1) Normal termination (return value 0)

Usr 0 00:00:37, Sys 0 00:00:00 - Run Remote Usage

Usr 0 00:00:00, Sys 0 00:00:05 - Run Local Usage

Usr 0 00:00:37, Sys 0 00:00:00 - Total Remote Usage

Usr 0 00:00:00, Sys 0 00:00:05 - Total Local Usage

9624 - Run Bytes Sent By Job

7146159 - Run Bytes Received By Job

9624 - Total Bytes Sent By Job

7146159 - Total Bytes Received By Job

...

Page 45: Condor Tutorial GGF-5 / HPDC-11 July 2002

45http://www.cs.wisc.edu/condor

Uses for the User Log› Easily read by human or machine

C++ library and Perl Module for parsing UserLogs is available

› Event triggers for meta-schedulers Like DagMan…

› Visualizations of job progress Condor JobMonitor Viewer

Page 46: Condor Tutorial GGF-5 / HPDC-11 July 2002

Condor JobMonito

rScreensh

ot

Page 47: Condor Tutorial GGF-5 / HPDC-11 July 2002

47http://www.cs.wisc.edu/condor

Job Priorities w/ condor_prio

› condor_prio allows you to specify the order in which your jobs are started

› Higher the prio #, the earlier the job will start% condor_q-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> :

ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD 1.0 frieda 6/16 06:52 0+00:02:11 R 0 0.0 my_job

% condor_prio +5 1.0% condor_q

-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> : ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD

1.0 frieda 6/16 06:52 0+00:02:13 R 5 0.0 my_job

Page 48: Condor Tutorial GGF-5 / HPDC-11 July 2002

48http://www.cs.wisc.edu/condor

Want other Scheduling possibilities?

Extend with the Scheduler Universe

› In addition to VANILLA, another job universe is the Scheduler Universe.

› Scheduler Universe jobs run on the submitting machine and serve as a meta-scheduler.

› DAGMan meta-scheduler included

Page 49: Condor Tutorial GGF-5 / HPDC-11 July 2002

49http://www.cs.wisc.edu/condor

DAGMan› Directed Acyclic Graph

Manager› DAGMan allows you to specify the

dependencies between your Condor jobs, so it can manage them automatically for you.

› (e.g., “Don’t run job “B” until job “A” has completed successfully.”)

Page 50: Condor Tutorial GGF-5 / HPDC-11 July 2002

50http://www.cs.wisc.edu/condor

What is a DAG?› A DAG is the data structure

used by DAGMan to represent these dependencies.

› Each job is a “node” in the DAG.

› Each node can have any number of “parent” or “children” nodes – as long as there are no loops!

Job A

Job B Job C

Job D

Page 51: Condor Tutorial GGF-5 / HPDC-11 July 2002

51http://www.cs.wisc.edu/condor

Defining a DAG› A DAG is defined by a .dag file, listing each of

its nodes and their dependencies:# diamond.dagJob A a.subJob B b.subJob C c.subJob D d.subParent A Child B CParent B C Child D

› each node will run the Condor job specified by its accompanying Condor submit file

Job A

Job B Job C

Job D

Page 52: Condor Tutorial GGF-5 / HPDC-11 July 2002

52http://www.cs.wisc.edu/condor

Submitting a DAG› To start your DAG, just run condor_submit_dag

with your .dag file, and Condor will start a personal DAGMan daemon which to begin running your jobs:% condor_submit_dag diamond.dag

› condor_submit_dag submits a Scheduler Universe Job with DAGMan as the executable.

› Thus the DAGMan daemon itself runs as a Condor job, so you don’t have to baby-sit it.

Page 53: Condor Tutorial GGF-5 / HPDC-11 July 2002

53http://www.cs.wisc.edu/condor

DAGMan

Running a DAG› DAGMan acts as a “meta-scheduler”,

managing the submission of your jobs to Condor based on the DAG dependencies.

CondorJobQueue

C

D

A

A

B.dagFile

Page 54: Condor Tutorial GGF-5 / HPDC-11 July 2002

54http://www.cs.wisc.edu/condor

DAGMan

Running a DAG (cont’d)› DAGMan holds & submits jobs to the

Condor queue at the appropriate times.

CondorJobQueue

C

D

B

C

B

A

Page 55: Condor Tutorial GGF-5 / HPDC-11 July 2002

55http://www.cs.wisc.edu/condor

DAGMan

Running a DAG (cont’d)› In case of a job failure, DAGMan continues

until it can no longer make progress, and then creates a “rescue” file with the current state of the DAG.

CondorJobQueue

X

D

A

BRescue

File

Page 56: Condor Tutorial GGF-5 / HPDC-11 July 2002

56http://www.cs.wisc.edu/condor

DAGMan

Recovering a DAG› Once the failed job is ready to be re-run,

the rescue file can be used to restore the prior state of the DAG.

CondorJobQueue

C

D

A

BRescue

File

C

Page 57: Condor Tutorial GGF-5 / HPDC-11 July 2002

57http://www.cs.wisc.edu/condor

DAGMan

Recovering a DAG (cont’d)

› Once that job completes, DAGMan will continue the DAG as if the failure never happened.

CondorJobQueue

C

D

A

B

D

Page 58: Condor Tutorial GGF-5 / HPDC-11 July 2002

58http://www.cs.wisc.edu/condor

DAGMan

Finishing a DAG› Once the DAG is complete, the DAGMan

job itself is finished, and exits.

CondorJobQueue

C

D

A

B

Page 59: Condor Tutorial GGF-5 / HPDC-11 July 2002

59http://www.cs.wisc.edu/condor

Additional DAGMan Features

› Provides other handy features for job management… nodes can have PRE & POST scripts failed nodes can be automatically re-

tried a configurable number of times job submission can be “throttled”

Page 60: Condor Tutorial GGF-5 / HPDC-11 July 2002

60http://www.cs.wisc.edu/condor

We’ve seen how Condor will

… keep an eye on your jobs and will keep you posted on their progress

… implement your policy on the execution order of the jobs

… keep a log of your job activities… add fault tolerance to your jobs ?

Page 61: Condor Tutorial GGF-5 / HPDC-11 July 2002

61http://www.cs.wisc.edu/condor

What if each job needed to run for

20 days?

What if I wanted to interrupt a job with

a higher priority job?

Page 62: Condor Tutorial GGF-5 / HPDC-11 July 2002

62http://www.cs.wisc.edu/condor

Condor’s Standard Universe to the rescue!

› Condor can support various combinations of features/environments in different “Universes”

› Different Universes provide different functionality for your job: Vanilla – Run any Serial Job Scheduler – Plug in a meta-scheduler Standard – Support for transparent

process checkpoint and restart

Page 63: Condor Tutorial GGF-5 / HPDC-11 July 2002

63http://www.cs.wisc.edu/condor

Process Checkpointing› Condor’s Process Checkpointing mechanism

saves all the state of a process into a checkpoint file Memory, CPU, I/O, etc.

› The process can then be restarted from right where it left off

› Typically no changes to your job’s source code needed – however, your job must be relinked with Condor’s Standard Universe support library

Page 64: Condor Tutorial GGF-5 / HPDC-11 July 2002

64http://www.cs.wisc.edu/condor

Relinking Your Job for submission to the Standard Universe

To do this, just place “condor_compile” in front of the command you normally use to link your job:condor_compile gcc -o myjob myjob.c

OR

condor_compile f77 -o myjob filea.f fileb.f

OR

condor_compile make –f MyMakefile

Page 65: Condor Tutorial GGF-5 / HPDC-11 July 2002

65http://www.cs.wisc.edu/condor

Limitations in the Standard Universe

› Condor’s checkpointing is not at the kernel level. Thus in the Standard Universe the job may not Fork() Use kernel threads Use some forms of IPC, such as pipes

and shared memory› Many typical scientific jobs are OK

Page 66: Condor Tutorial GGF-5 / HPDC-11 July 2002

66http://www.cs.wisc.edu/condor

When will Condor checkpoint your job?

› Periodically, if desired For fault tolerance

› To free the machine to do a higher priority task (higher priority job, or a job from a user with higher priority) Preemptive-resume scheduling

› When you explicitly run condor_checkpoint, condor_vacate, condor_off or condor_restart command

Page 67: Condor Tutorial GGF-5 / HPDC-11 July 2002

67http://www.cs.wisc.edu/condor

Outline› About Condor› Frieda the Scientist› Managing Jobs› Sharing Resources› Expanding to the Grid› Case Study: DTF› Research Directions

Page 68: Condor Tutorial GGF-5 / HPDC-11 July 2002

68http://www.cs.wisc.edu/condor

What Condor Daemons are

running on my machine, and what

do they do?

Page 69: Condor Tutorial GGF-5 / HPDC-11 July 2002

69http://www.cs.wisc.edu/condor

Condor Daemon LayoutPersonal Condor / Central Manager

master

collector

negotiator

schedd

startd

= Process Spawned

Page 70: Condor Tutorial GGF-5 / HPDC-11 July 2002

70http://www.cs.wisc.edu/condor

condor_master› Starts up all other Condor daemons› If there are any problems and a daemon

exits, it restarts the daemon and sends email to the administrator

› Checks the time stamps on the binaries of the other Condor daemons, and if new binaries appear, the master will gracefully shutdown the currently running version and start the new version

Page 71: Condor Tutorial GGF-5 / HPDC-11 July 2002

71http://www.cs.wisc.edu/condor

condor_master (cont’d)› Acts as the server for many Condor

remote administration commands: condor_reconfig, condor_restart,

condor_off, condor_on, condor_config_val, etc.

Page 72: Condor Tutorial GGF-5 / HPDC-11 July 2002

72http://www.cs.wisc.edu/condor

condor_startd› Represents a machine to the

Condor system› Responsible for starting,

suspending, and stopping jobs› Enforces the wishes of the

machine owner (the owner’s “policy”… more on this soon)

Page 73: Condor Tutorial GGF-5 / HPDC-11 July 2002

73http://www.cs.wisc.edu/condor

condor_schedd› Represents users to the Condor system› Maintains the persistent queue of jobs› Responsible for contacting available

machines and sending them jobs› Services user commands which

manipulate the job queue: condor_submit,condor_rm, condor_q,

condor_hold, condor_release, condor_prio, …

Page 74: Condor Tutorial GGF-5 / HPDC-11 July 2002

74http://www.cs.wisc.edu/condor

condor_collector› Collects information from all other

Condor daemons in the pool “Directory Service” / Database for a Condor

pool› Each daemon sends a periodic update

called a “ClassAd” to the collector› Services queries for information:

Queries from other Condor daemons Queries from users (condor_status)

Page 75: Condor Tutorial GGF-5 / HPDC-11 July 2002

75http://www.cs.wisc.edu/condor

condor_negotiator› Performs “matchmaking” in Condor› Gets information from the collector

about all available machines and all idle jobs

› Tries to match jobs with machines that will serve them

› Both the job and the machine must satisfy each other’s requirements

Page 76: Condor Tutorial GGF-5 / HPDC-11 July 2002

76http://www.cs.wisc.edu/condor

Happy Day! Frieda’s organization purchased

a Beowulf Cluster!› Frieda Installs Condor on

all the dedicated Cluster nodes, and configures them with her machine as the central manager…

› Now her Condor Pool can run multiple jobs at once

Page 77: Condor Tutorial GGF-5 / HPDC-11 July 2002

77http://www.cs.wisc.edu/condor

yourworkstation

personalCondor

600 Condorjobs

Condor Pool

Page 78: Condor Tutorial GGF-5 / HPDC-11 July 2002

78http://www.cs.wisc.edu/condor

Layout of the Condor PoolCentral Manager (Frieda’s)

master

collector

negotiatorschedd

startd

= ClassAd Communication Pathway

= Process Spawned Cluster Nodemaster

startd

Cluster Nodemaster

startd

Page 79: Condor Tutorial GGF-5 / HPDC-11 July 2002

79http://www.cs.wisc.edu/condor

condor_status% condor_status

Name OpSys Arch State Activity LoadAv Mem ActvtyTime

haha.cs.wisc. IRIX65 SGI Unclaimed Idle 0.198 192 0+00:00:04

antipholus.cs LINUX INTEL Unclaimed Idle 0.020 511 0+02:28:42

coral.cs.wisc LINUX INTEL Claimed Busy 0.990 511 0+01:27:21

doc.cs.wisc.e LINUX INTEL Unclaimed Idle 0.260 511 0+00:20:04

dsonokwa.cs.w LINUX INTEL Claimed Busy 0.810 511 0+00:01:45

ferdinand.cs. LINUX INTEL Claimed Suspended 1.130 511 0+00:00:55

vm1@pinguino. LINUX INTEL Unclaimed Idle 0.000 255 0+01:03:28

vm2@pinguino. LINUX INTEL Unclaimed Idle 0.190 255 0+01:03:29

Page 80: Condor Tutorial GGF-5 / HPDC-11 July 2002

80http://www.cs.wisc.edu/condor

Frieda tries out parallel jobs…

› MPI Universe & PVM Universe› Schedule and start an MPICH job

on dedicated resourcesExecutable = my-mpi-jobUniverse = MPIMachine_count = 8queue

Page 81: Condor Tutorial GGF-5 / HPDC-11 July 2002

81http://www.cs.wisc.edu/condor

The Boss says Frieda can add her

co-workers’ desktop machines

into her Condor pool as well…

but only if they can also submit jobs.

(Boss Fat Cat)

Page 82: Condor Tutorial GGF-5 / HPDC-11 July 2002

82http://www.cs.wisc.edu/condor

Layout of the Condor PoolCentral Manager (Frieda’s)

master

collector

negotiatorschedd

startd

= ClassAd Communication Pathway

= Process Spawned

Desktop

scheddstartd

masterDesktop

scheddstartd

master

Cluster Nodemaster

startd

Cluster Nodemaster

startd

Page 83: Condor Tutorial GGF-5 / HPDC-11 July 2002

83http://www.cs.wisc.edu/condor

Some of the machines in the Pool do not have

enough memory or scratch disk space

to run my job!

Page 84: Condor Tutorial GGF-5 / HPDC-11 July 2002

84http://www.cs.wisc.edu/condor

Specify Requirements!› An expression (syntax similar to C or Java)› Must evaluate to True for a match to be made

Universe = vanillaExecutable = my_jobInitialDir = run_$(Process)Requirements = Memory >= 256 && Disk > 10000Queue 600

Page 85: Condor Tutorial GGF-5 / HPDC-11 July 2002

85http://www.cs.wisc.edu/condor

Specify Rank!› All matches which meet the requirements can

be sorted by preference with a Rank expression. › Higher the Rank, the better the match

Universe = vanillaExecutable = my_jobArguments = -arg1 –arg2InitialDir = run_$(Process)Requirements = Memory >= 256 && Disk > 10000Rank = (KFLOPS*10000) + MemoryQueue 600

Page 86: Condor Tutorial GGF-5 / HPDC-11 July 2002

86http://www.cs.wisc.edu/condor

How can my jobs access their data

files?

Page 87: Condor Tutorial GGF-5 / HPDC-11 July 2002

87http://www.cs.wisc.edu/condor

Access to Data in Condor

› Use Shared Filesystem if available› No shared filesystem?

Condor can transfer files• Automatically send back changed files• Atomic transfer of multiple files

Standard Universe can use Remote System Calls

Page 88: Condor Tutorial GGF-5 / HPDC-11 July 2002

88http://www.cs.wisc.edu/condor

Remote System Calls› I/O System calls trapped and sent back to

submit machine› Allows Transparent Migration Across

Administrative Domains Checkpoint on machine A, restart on B

› No Source Code changes required› Language Independent› Opportunities for Application Steering

Example: Condor tells customer process “how” to open files

Page 89: Condor Tutorial GGF-5 / HPDC-11 July 2002

89http://www.cs.wisc.edu/condor

Customer Job

Job Startup

Submit

Schedd

Shadow

Startd

Starter

CondorSyscall Lib

Page 90: Condor Tutorial GGF-5 / HPDC-11 July 2002

90http://www.cs.wisc.edu/condor

condor_q -ioc01(69)% condor_q -io

-- Submitter: c01.cs.wisc.edu : <128.105.146.101:2996> : c01.cs.wisc.edu

ID OWNER READ WRITE SEEK XPUT BUFSIZE BLKSIZE

72.3 edayton [ no i/o data collected yet ]

72.5 edayton 6.8 MB 0.0 B 0 104.0 KB/s 512.0 KB 32.0 KB

73.0 edayton 6.4 MB 0.0 B 0 140.3 KB/s 512.0 KB 32.0 KB

73.2 edayton 6.8 MB 0.0 B 0 112.4 KB/s 512.0 KB 32.0 KB

73.4 edayton 6.8 MB 0.0 B 0 139.3 KB/s 512.0 KB 32.0 KB

73.5 edayton 6.8 MB 0.0 B 0 139.3 KB/s 512.0 KB 32.0 KB

73.7 edayton [ no i/o data collected yet ]

0 jobs; 0 idle, 0 running, 0 held

Page 91: Condor Tutorial GGF-5 / HPDC-11 July 2002

91http://www.cs.wisc.edu/condor

I am adding nodes to the Cluster… but

the Engineering Department has priority on these

nodes.

(Boss Fat Cat)

Policy Configuration

Page 92: Condor Tutorial GGF-5 / HPDC-11 July 2002

92http://www.cs.wisc.edu/condor

The Machine (Startd) Policy Expressions

START – When is this machine willing to start a job

RANK - Job PreferencesSUSPEND - When to suspend a jobCONTINUE - When to continue a suspended

jobPREEMPT – When to nicely stop running a jobKILL - When to immediately kill a preempting

job

Page 93: Condor Tutorial GGF-5 / HPDC-11 July 2002

93http://www.cs.wisc.edu/condor

Freida’s Current Settings

START = TrueRANK =SUSPEND = FalseCONTINUE =PREEMPT = FalseKILL = False

Page 94: Condor Tutorial GGF-5 / HPDC-11 July 2002

94http://www.cs.wisc.edu/condor

Freida’s New Settings for the Chemistry

nodesSTART = TrueRANK = Department ==

“Chemistry”SUSPEND = FalseCONTINUE =PREEMPT = FalseKILL = False

Page 95: Condor Tutorial GGF-5 / HPDC-11 July 2002

95http://www.cs.wisc.edu/condor

Submit file with Custom Attribute

Executable = charm-runUniverse = standard+Department = Chemistryqueue

Page 96: Condor Tutorial GGF-5 / HPDC-11 July 2002

96http://www.cs.wisc.edu/condor

What if “Department” not specified?

START = TrueRANK =

(Department =?= UNDEFINED)*-5 + (Department == “Chemistry”)*2

SUSPEND = FalseCONTINUE =PREEMPT = FalseKILL = False

Page 97: Condor Tutorial GGF-5 / HPDC-11 July 2002

97http://www.cs.wisc.edu/condor

Another exampleSTART = TrueRANK =

(Department =?= UNDEFINED)*-5 + (Department == “Chemistry”)*2 + (Department == “Physics”)

SUSPEND = FalseCONTINUE =PREEMPT = FalseKILL = False

Page 98: Condor Tutorial GGF-5 / HPDC-11 July 2002

98http://www.cs.wisc.edu/condor

The Cluster is fine. But not the

desktop machines. Condor can only use the desktops when they would otherwise be idle.

(Boss Fat Cat)

Policy Configuration, cont

Page 99: Condor Tutorial GGF-5 / HPDC-11 July 2002

99http://www.cs.wisc.edu/condor

So Frieda decides she wants the desktops to:

› START jobs when their has been no activity on the keyboard/mouse for 5 minutes and the load average is low

› SUSPEND jobs as soon as activity is detected

› PREEMPT jobs if the activity continues for 5 minutes or more

› KILL jobs if they take more than 5 minutes to preempt

Page 100: Condor Tutorial GGF-5 / HPDC-11 July 2002

100http://www.cs.wisc.edu/condor

Macros in the Config FileNonCondorLoadAvg = (LoadAvg - CondorLoadAvg)

BackgroundLoad = 0.3HighLoad = 0.5KeyboardBusy = (KeyboardIdle < 10)CPU_Busy = ($(NonCondorLoadAvg) >= $

(HighLoad))MachineBusy = ($(CPU_Busy) || $(KeyboardBusy))ActivityTimer = (CurrentTime -

EnteredCurrentActivity)

Page 101: Condor Tutorial GGF-5 / HPDC-11 July 2002

101http://www.cs.wisc.edu/condor

Desktop Machine PolicySTART = $(CPU_Idle) && KeyboardIdle > 300SUSPEND = $(MachineBusy)CONTINUE = $(CPU_Idle) && KeyboardIdle >

120PREEMPT = (Activity == "Suspended") &&

$(ActivityTimer) > 300KILL = $(ActivityTimer) > 300

Page 102: Condor Tutorial GGF-5 / HPDC-11 July 2002

102http://www.cs.wisc.edu/condor

Policy Review› Users submitting jobs can specify

Requirements and Rank expressions› Administrators can specify Startd Policy

expressions individually for each machine (Start,Suspend,etc)

› Expressions can use any job or machine ClassAd attribute

› Custom attributes easily added› Bottom Line: Enforce almost any policy!

Page 103: Condor Tutorial GGF-5 / HPDC-11 July 2002

103http://www.cs.wisc.edu/condor

General User Commands› condor_status View Pool Status

› condor_q View Job Queue› condor_submit Submit new Jobs› condor_rm Remove Jobs› condor_prio Intra-User Prios› condor_history Completed Job Info› condor_submit_dag Specify Dependencies› condor_checkpoint Force a checkpoint› condor_compile Link Condor library

Page 104: Condor Tutorial GGF-5 / HPDC-11 July 2002

104http://www.cs.wisc.edu/condor

Administrator Commands› condor_vacate Leave a machine now

› condor_on Start Condor› condor_off Stop Condor› condor_reconfig Reconfig on-the-fly› condor_config_val View/set config› condor_userprio User Priorities› condor_stats View detailed usage

accounting stats

Page 105: Condor Tutorial GGF-5 / HPDC-11 July 2002

105http://www.cs.wisc.edu/condor

CondorView Usage Graph

Page 106: Condor Tutorial GGF-5 / HPDC-11 July 2002

106http://www.cs.wisc.edu/condor

Outline› About Condor› Frieda the Scientist› Managing Jobs› Sharing Resources› Expanding to the Grid› Case Study: DTF› Research Directions

Page 107: Condor Tutorial GGF-5 / HPDC-11 July 2002

107http://www.cs.wisc.edu/condor

Back to the Story:Disaster Strikes!

Frieda Needs Remote Resources…

Page 108: Condor Tutorial GGF-5 / HPDC-11 July 2002

108http://www.cs.wisc.edu/condor

Frieda Goes to the Grid!

› First Frieda takes advantage of her Condor friends!

› She knows people with their own Condor pools, and gets permission to access their resources

› She then configures her Condor pool to “flockflock” to these pools

Page 109: Condor Tutorial GGF-5 / HPDC-11 July 2002

109http://www.cs.wisc.edu/condor

yourworkstation

Friendly Condor Pool

personalCondor

600 Condorjobs

Condor Pool

Page 110: Condor Tutorial GGF-5 / HPDC-11 July 2002

110http://www.cs.wisc.edu/condor

How Flocking Works› Add a line to your condor_config :

FLOCK_HOSTS = Pool-Foo, Pool-Bar

Schedd

Collector

Negotiator

Central Manager

(CONDOR_HOST)

Collector

Negotiator

Pool-Foo Central Manager

Collector

Negotiator

Pool-BarCentral Manager

SubmitMachine

Page 111: Condor Tutorial GGF-5 / HPDC-11 July 2002

111http://www.cs.wisc.edu/condor

Condor Flocking› Remote pools are contacted in the order

specified until jobs are satisfied› The list of remote pools is a property of

the Schedd, not the Central Manager So different users can Flock to different

pools And remote pools can allow specific users

› User-priority system is “flocking-aware” A pool’s local users can have priority over

remote users “flocking” in.

Page 112: Condor Tutorial GGF-5 / HPDC-11 July 2002

112http://www.cs.wisc.edu/condor

Condor Flocking, cont.› Flocking is “Condor” specific technology…› Frieda also has access to Globus resources

she wants to use She has certificates and access to Globus

gatekeepers at remote institutions› But Frieda wants Condor’s queue

management features for her Globus jobs!› She installs Condor-G so she can submit

“Globus Universe” jobs to Condor

Page 113: Condor Tutorial GGF-5 / HPDC-11 July 2002

113http://www.cs.wisc.edu/condor

Condor-G: Globus + Condor

Globus › middleware deployed

across entire Grid› remote access to

computational resources› dependable, robust data

transfer

Condor› job scheduling across

multiple resources› strong fault tolerance with

checkpointing and migration

› layered over Globus as “personal batch system” for the Grid

Page 114: Condor Tutorial GGF-5 / HPDC-11 July 2002

Condor-G Installation: Tell it what you need…

Page 115: Condor Tutorial GGF-5 / HPDC-11 July 2002

… and watch it go!

Page 116: Condor Tutorial GGF-5 / HPDC-11 July 2002

116http://www.cs.wisc.edu/condor

Frieda Submits a Globus Universe Job

› In her submit description file, she specifies: Universe = Globus Which Globus Gatekeeper to use Optional: Location of file containing your

Globus certificate (thanks, Massimo!)universe = globusglobusscheduler = beak.cs.wisc.edu/jobmanagerexecutable = prognamequeue

Page 117: Condor Tutorial GGF-5 / HPDC-11 July 2002

117http://www.cs.wisc.edu/condor

How It Works

Schedd

LSF

Personal Condor Globus Resource

Page 118: Condor Tutorial GGF-5 / HPDC-11 July 2002

118http://www.cs.wisc.edu/condor

How It Works

Schedd

LSF

Personal Condor Globus Resource

600 Globusjobs

Page 119: Condor Tutorial GGF-5 / HPDC-11 July 2002

119http://www.cs.wisc.edu/condor

How It Works

Schedd

LSF

Personal Condor Globus Resource

GridManager

600 Globusjobs

Page 120: Condor Tutorial GGF-5 / HPDC-11 July 2002

120http://www.cs.wisc.edu/condor

How It Works

Schedd JobManager

LSF

Personal Condor Globus Resource

GridManager

600 Globusjobs

Page 121: Condor Tutorial GGF-5 / HPDC-11 July 2002

121http://www.cs.wisc.edu/condor

How It Works

Schedd JobManager

LSF

User Job

Personal Condor Globus Resource

GridManager

600 Globusjobs

Page 122: Condor Tutorial GGF-5 / HPDC-11 July 2002

Condor Globus Universe

Page 123: Condor Tutorial GGF-5 / HPDC-11 July 2002

123http://www.cs.wisc.edu/condor

Globus Universe Concerns

› What about Fault Tolerance? Local Crashes

• What if the submit machine goes down? Network Outages

• What if the connection to the remote Globus jobmanager is lost?

Remote Crashes• What if the remote Globus jobmanager crashes?• What if the remote machine goes down?

Page 124: Condor Tutorial GGF-5 / HPDC-11 July 2002

124http://www.cs.wisc.edu/condor

Changes to the Globus JobManager for Fault

Tolerance› Ability to restart a JobManager› Enhanced two-phase commit

submit protocol

Page 125: Condor Tutorial GGF-5 / HPDC-11 July 2002

125http://www.cs.wisc.edu/condor

Globus Universe Fault-Tolerance: Submit-side

Failures› All relevant state for each submitted job

is stored persistently in the Condor job queue.

› This persistent information allows the Condor GridManager upon restart to read the state information and reconnect to JobManagers that were running at the time of the crash.

› If a JobManager fails to respond…

Page 126: Condor Tutorial GGF-5 / HPDC-11 July 2002

126http://www.cs.wisc.edu/condor

Globus Universe Fault-Tolerance:Lost Contact with Remote

JobmanagerCan we contact gatekeeper?

Yes – network was downNo – machine crashed

or job completed

Yes - jobmanager crashed No – retry until we can talk to gatekeeper again…

Can we reconnect to jobmanager?

Has job completed?

No – is job still running?

Yes – update queue

Restart jobmanager

Page 127: Condor Tutorial GGF-5 / HPDC-11 July 2002

127http://www.cs.wisc.edu/condor

Globus Universe Fault-Tolerance: Credential

Management› Authentication in Globus is done

with limited-lifetime X509 proxies› Proxy may expire before jobs finish

executing› Condor can put jobs on hold and

email user to refresh proxy› Todo: Interface with MyProxy…

Page 128: Condor Tutorial GGF-5 / HPDC-11 July 2002

128http://www.cs.wisc.edu/condor

But Frieda Wants More…

› She wants to run standard universe jobs on Globus-managed resources For matchmaking and dynamic

scheduling of jobs For job checkpointing and migration For remote system calls

Page 129: Condor Tutorial GGF-5 / HPDC-11 July 2002

129http://www.cs.wisc.edu/condor

Solution: Condor GlideIn

› Frieda can use the Globus Universe to run Condor daemons on Globus resources

› When the resources run these GlideIn jobs, they will temporarily join her Condor Pool

› She can then submit Standard, Vanilla, PVM, or MPI Universe jobs and they will be matched and run on the Globus resources

Page 130: Condor Tutorial GGF-5 / HPDC-11 July 2002

130http://www.cs.wisc.edu/condor

How It Works

Schedd

LSF

Collector

Personal Condor Globus Resource

600 Condorjobs

Page 131: Condor Tutorial GGF-5 / HPDC-11 July 2002

131http://www.cs.wisc.edu/condor

How It Works

Schedd

LSF

Collector

Personal Condor Globus Resource

600 Condorjobs

GlideIn jobs

Page 132: Condor Tutorial GGF-5 / HPDC-11 July 2002

132http://www.cs.wisc.edu/condor

How It Works

Schedd

LSF

Collector

Personal Condor Globus Resource

GridManager

600 Condorjobs

GlideIn jobs

Page 133: Condor Tutorial GGF-5 / HPDC-11 July 2002

133http://www.cs.wisc.edu/condor

How It Works

Schedd JobManager

LSF

Collector

Personal Condor Globus Resource

GridManager

600 Condorjobs

GlideIn jobs

Page 134: Condor Tutorial GGF-5 / HPDC-11 July 2002

134http://www.cs.wisc.edu/condor

How It Works

Schedd JobManager

LSF

Startd

Collector

Personal Condor Globus Resource

GridManager

600 Condorjobs

GlideIn jobs

Page 135: Condor Tutorial GGF-5 / HPDC-11 July 2002

135http://www.cs.wisc.edu/condor

How It Works

Schedd JobManager

LSF

Startd

Collector

Personal Condor Globus Resource

GridManager

600 Condorjobs

GlideIn jobs

Page 136: Condor Tutorial GGF-5 / HPDC-11 July 2002

136http://www.cs.wisc.edu/condor

How It Works

Schedd JobManager

LSF

User Job

Startd

Collector

Personal Condor Globus Resource

GridManager

600 Condorjobs

GlideIn jobs

Page 137: Condor Tutorial GGF-5 / HPDC-11 July 2002

137http://www.cs.wisc.edu/condor

Job Submission Machine

Job Execution Site

Job

Condor-G GridManager

GASS Server

Condor-G Scheduler

Persistant Job Queue

End User Requests

Condor Shadow

Process for Job X

Condor-G Collector

Globus Daemons +

Local Site Scheduler

[See Figure 1]

Condor Daemons

Job X

Condor System Call

Trapping & Checkpoint Library

Resource

Information

Transfer Job X

Redirected System Call

Data

Page 138: Condor Tutorial GGF-5 / HPDC-11 July 2002

138http://www.cs.wisc.edu/condor

GlideIn Concerns› What if a Globus resource kills my GlideIn job?

That resource will disappear from your pool and your jobs will be rescheduled on other machines

Standard universe jobs will resume from their last checkpoint like usual

› What if all my jobs are completed before a GlideIn job runs? If a GlideIn Condor daemon is not matched with a job

in 10 minutes, it terminates, freeing the resource

Page 139: Condor Tutorial GGF-5 / HPDC-11 July 2002

139http://www.cs.wisc.edu/condor

Common Questions, cont.My Personal Condor is flocking with a bunch

of Solaris machines, and also doing a GlideIn to a Silicon Graphics O2K. I do not want to statically partition my jobs.

Solution: In your submit file, say: Executable = myjob.$$(OpSys).$$(Arch)The “$$(xxx)” notation is replaced with

attributes from the machine ClassAd which was matched with your job.

Page 140: Condor Tutorial GGF-5 / HPDC-11 July 2002

140http://www.cs.wisc.edu/condor

In ReviewWith Condor Frieda can…

… manage her compute job workload … access local machines … access remote Condor Pools via

flocking … access remote compute resources

on the Grid via Globus Universe jobs … carve out her own personal Condor

Pool from the Grid with GlideIn technology

Page 141: Condor Tutorial GGF-5 / HPDC-11 July 2002

141http://www.cs.wisc.edu/condor

yourworkstation

Friendly Condor Pool

personalCondor

600 Condorjobs

Globus Grid

PBS LSF

Condor

Condor Pool

glide-in jobs

Page 142: Condor Tutorial GGF-5 / HPDC-11 July 2002

142http://www.cs.wisc.edu/condor

Outline› About Condor› Frieda the Scientist› Managing Jobs› Sharing Resources› Expanding to the Grid› Case Study: DTF› Research Directions

Page 143: Condor Tutorial GGF-5 / HPDC-11 July 2002

143http://www.cs.wisc.edu/condor

Leveraging Grid Resources

› The Caltech CMS group is using Grid resources today for detector simulation and data processing prototyping

› Even during this simulation and prototyping phase the computational and data challenges are substantial…

Page 144: Condor Tutorial GGF-5 / HPDC-11 July 2002

http://www.cs.wisc.edu/condor

Case Study: CMS Production

› An ongoing collaboration between: Physicists & Computer Scientists

• Vladimir Litvin (Caltech CMS)• Scott Koranda, Bruce Loftis, John Towns

(NCSA)• Miron Livny, Peter Couvares, Todd

Tannenbaum, Jamie Frey (UW-Madison Condor)

Software• Condor, Globus, CMS

Page 145: Condor Tutorial GGF-5 / HPDC-11 July 2002

145http://www.cs.wisc.edu/condor

CMS PhysicsThe CMS detector at the

LHC will probe fundamental forces in our Universe and search for the yet-undetected Higgs Boson

Detector expected to come online 2006

Page 146: Condor Tutorial GGF-5 / HPDC-11 July 2002

146http://www.cs.wisc.edu/condor

CMS Physics

Page 147: Condor Tutorial GGF-5 / HPDC-11 July 2002

147http://www.cs.wisc.edu/condor

ENORMOUS Data Challenges Ahead

› One sec of CMS running will equal data volume equivalent to 10,000 Encyclopaedia Britannicas

› Data rate handled by the CMS event builder (~500 Gbit/s) will be equivalent to amount of data currently exchanged by the world's telecom networks

› Number of processors in the CMS event filter will equal number of workstations at CERN today (~4000)

Page 148: Condor Tutorial GGF-5 / HPDC-11 July 2002

148http://www.cs.wisc.edu/condor

Challenges of a CMS Run› CMS run naturally

divided into two phases› Specific challenges

each run generates ~100 GB of data to be moved and archived elsewhere

many, many runs necessary

simulation & reconstruction jobs at different sites

this can require major human effort starting & monitoring jobs, moving data

physics reconstruction from simulated data• 100’s of jobs per run• jobs coupled via

Objectivity database access

• ~100 GB data archived

Monte Carlo detector response simulation• 100’s of jobs per run• each generating ~ 1

GB• all data passed to next

phase and archived

Page 149: Condor Tutorial GGF-5 / HPDC-11 July 2002

149http://www.cs.wisc.edu/condor

CMS Run on the Grid› Caltech CMS staff

prepares input files on local workstation

› Pushes “one button” to submit a DAGMan job to Condor

› DAGMan job at Caltech submits secondary DAGMan job to UW Condor pool (~700 CPUs)

› Input files transferred by Condor to UW pool using Globus GASS file transfer

Condor DAGMan job running at

Caltech

Caltech workstation

Input files via Globus GASS

UW Condor pool

Page 150: Condor Tutorial GGF-5 / HPDC-11 July 2002

150http://www.cs.wisc.edu/condor

CMS Run on the Grid› Secondary DAGMan job

launches 100 Monte Carlo jobs on Wisconsin Condor pool each job runs 12~24

hours each generates ~1GB

data Condor handles

checkpointing & migration

no staff intervention

Condor DAGMan job running at Caltech

Secondary Condor DAGMan job on WI pool

100 Monte Carlo jobs on Wisconsin Condor pool

Globus

Globus

Page 151: Condor Tutorial GGF-5 / HPDC-11 July 2002

151http://www.cs.wisc.edu/condor

CMS Run on the Grid› When each Monte Carlo job

completes, data automatically transferred to UniTree at NCSA by a POST script each file ~ 1 GB transferred by calling

Globus-enabled FTP client “gsiftp”

NCSA UniTree runs Globus-enabled FTP server

authentication to FTP server on user’s behalf using digital certificate

100 Monte Carlo jobs on Wisconsin Condor pool

NCSA UniTree withGlobus-enabled FTP server

100 data files transferred via

Globus gsiftp (~ 1 GB each)

Page 152: Condor Tutorial GGF-5 / HPDC-11 July 2002

152http://www.cs.wisc.edu/condor

CMS Run on the Grid› When all Monte Carlo jobs

complete, Condor DAGMan at UW reports success to DAGMan at Caltech

› DAGMan at Caltech submits another Globus-universe job to Condor to stage data from NCSA UniTree to NCSA Linux cluster data transferred using

Globus-enabled FTP authentication on user’s

behalf using digital certificate

Condor starts job via Globus jobmanager on cluster to stage data

Secondary Condor DAGMan job on WI pool

NCSA Linux cluster

Secondary DAGMan reports success

Condor DAGMan job running at Caltech

gsiftp fetches data from UniTree

Page 153: Condor Tutorial GGF-5 / HPDC-11 July 2002

153http://www.cs.wisc.edu/condor

CMS Run on the Grid› Condor DAGMan at

Caltech launches physics reconstruction jobs on NCSA Linux cluster job launched via Globus

jobmanager on NCSA cluster

no user intervention required

authentication on user’s behalf using digital certificate

Master Condor job running at Caltech

Master starts reconstruction jobs via Globus jobmanager on cluster

NCSA Linux cluster

Page 154: Condor Tutorial GGF-5 / HPDC-11 July 2002

154http://www.cs.wisc.edu/condor

CMS Run on the Grid› When reconstruction jobs

at NCSA complete, data automatically archived to NCSA UniTree data transferred using

Globus-enabled FTP› After data transferred,

DAGMan run is complete, and Condor at Caltech emails notification to staff

NCSA Linux cluster

data files transferred via Globus gsiftp to UniTree for archiving

Page 155: Condor Tutorial GGF-5 / HPDC-11 July 2002

155http://www.cs.wisc.edu/condor

CMS Run Details› Condor + Globus› allows Condor to submit

jobs to remote host via a Globus jobmanager

› any Globus-enabled host reachable (with authorization)

› Condor jobs run in the “Globus” universe

› use familiar Condor classads for submitting jobs

universe = globusglobusscheduler = beak.cs.wisc.edu/jobmanager- condor-INTEL-LINUXenvironment = CONDOR_UNIVERSE=scheduler

executable = CMS/condor_dagman_runarguments = -f -t -l . -Lockfile cms.lock -Condorlog cms.log -Dag cms.dag -Rescue cms.rescueinput = CMS/hg_90.tar.gzremote_initialdir = Prod2001

output = CMS/hg_90.outerror = CMS/hg_90.errlog = CMS/condor.log

notification = alwaysqueue

Page 156: Condor Tutorial GGF-5 / HPDC-11 July 2002

156http://www.cs.wisc.edu/condor

CMS Run Details› At Caltech, DAGMan

ensures reconstruction job B runs only after simulation job A completes successfully & data is transferred

› At UW, no job dependencies, but DAGMan POST scripts used to stage out data

# Caltech: main.dagJob jobA_632 Prod2000/hg_90_gen_632.cdrJob jobB_632 Prod2000/hg_90_sim_632.cdrScript pre jobA_632 Prod2000/pre_632.cshScript post jobB_632 Prod2000/post_632.cshPARENT jobA_632 CHILD jobB_632

# UW: simulation.dagJob sim_0 sim_0.cdrScript post sim_0 post_0.cshJob sim_1 sim_1.cdrScript post sim_1 post_1.csh# ...Job sim_98 sim98.cdrScript post sim_98 post_98.cshJob sim_99 sim_99.cdrScript post sim_99 post_99.csh

Page 157: Condor Tutorial GGF-5 / HPDC-11 July 2002

157http://www.cs.wisc.edu/condor

Future Directions› Include additional

sites in both steps: allow Monte Carlo jobs

at Wisconsin to “glide-in” to Grid sites not running Condor

add path so that physics reconstruction jobs may run on other sites in addition to NCSA cluster

Master Condor job running at

Caltech

Secondary Condor job on WI pool

75 Monte Carlo jobs on Wisconsin Condor pool

25 Monte Carlo jobs on

LosLobos via Condor glide-in

Page 158: Condor Tutorial GGF-5 / HPDC-11 July 2002

158http://www.cs.wisc.edu/condor

NCSA Linux cluster OR

UNM Linux Cluster

5) UW DAGMan reports success to Caltech DAGMan

Condor DAGMan running at Caltech

7) gsiftp fetches data from UniTree

NCSA UniTree - Globus-enabled FTP server

4) data files transferred via gsiftp, ~ 1 GB each

Secondary Condor DAGMan job on UW

pool

3) Monte Carlo jobs on UW Condor pool

2) Launch secondary DAGMan job on UW pool; input files via Globus GASS

Caltech workstation

6) DAGMan starts reconstruction jobs via Globus jobmanager on cluster

8) Processed objectivity database stored to UniTree

9) Reconstruction job reports success to DAGMan

1) Submit DAGMan to Condor

Page 159: Condor Tutorial GGF-5 / HPDC-11 July 2002

159http://www.cs.wisc.edu/condor

Outline› About Condor› Frieda the Scientist› Managing Jobs› Sharing Resources› Expanding to the Grid› Case Study: DTF› Research Directions

Page 160: Condor Tutorial GGF-5 / HPDC-11 July 2002

160http://www.cs.wisc.edu/condor

Research Directions› Storage needs management too!

Discover, claim, use, release, monitor...› Grid communities...

Bring storage and cpus together.› Components:

NeST provides storage management. Bypass enables transparent access. Advanced ClassAds are the glue.

Page 161: Condor Tutorial GGF-5 / HPDC-11 July 2002

161http://www.cs.wisc.edu/condor

Frieda is Back!› Frieda is on sabbatical in Italy.› Database stored in Bologna› Need to run 300 instances of

simulator.› But, all the machines are in Wisconsin!› What to do?

Page 162: Condor Tutorial GGF-5 / HPDC-11 July 2002

162http://www.cs.wisc.edu/condor

Hmmm…

Page 163: Condor Tutorial GGF-5 / HPDC-11 July 2002

163http://www.cs.wisc.edu/condor

New framework needed› Remote I/O is possible anywhere› Build notion of locality into system?› What are possibilities?

Move job to data Move data to job Allow job to access data remotely

› Need framework to expose these policies

Page 164: Condor Tutorial GGF-5 / HPDC-11 July 2002

164http://www.cs.wisc.edu/condor

Grid Communities› A meeting place for many

resources and users.› A structure for reasoning

about complex systems.› A natural expression of

locality between cpus and storage.

Page 165: Condor Tutorial GGF-5 / HPDC-11 July 2002

165http://www.cs.wisc.edu/condor

Grid Communities

UW INFN

Page 166: Condor Tutorial GGF-5 / HPDC-11 July 2002

166http://www.cs.wisc.edu/condor

Key elements› Storage appliance, interposition

agents, schedulers and match-makers› Mechanism not policies› Policies are exposed to an upper layer

We will however demonstrate the strength of this mechanism

Page 167: Condor Tutorial GGF-5 / HPDC-11 July 2002

167http://www.cs.wisc.edu/condor

Storage appliances› Should run without special privilege

Flexible and easily deployable Acceptable to nervous sys admins

› Should allow multiple access modes Low latency local accesses High bandwidth remote puts and gets

Page 168: Condor Tutorial GGF-5 / HPDC-11 July 2002

168http://www.cs.wisc.edu/condor

NeSTCommon protocol layer

GFTP Chirp HTTP FTP

Dispatcher

StorageManager

Physical storage layer

Multiple concurrenciesTransferManager

Control flowData flow

Page 169: Condor Tutorial GGF-5 / HPDC-11 July 2002

169http://www.cs.wisc.edu/condor

Interposition agents› Thin software layer interposed

between application and OS› Allow applications to transparently

interact with storage appliances› Unmodified programs can run in

grid environment

Page 170: Condor Tutorial GGF-5 / HPDC-11 July 2002

170http://www.cs.wisc.edu/condor

PFS: Pluggable File System

Page 171: Condor Tutorial GGF-5 / HPDC-11 July 2002

171http://www.cs.wisc.edu/condor

Scheduling systems and discovery

› Top level scheduler needs ability to discover diverse resources

› CPU discovery Where can a job run?

› Device discovery Where is my local storage appliance?

› Replica discovery Where can I find my data?

Page 172: Condor Tutorial GGF-5 / HPDC-11 July 2002

172http://www.cs.wisc.edu/condor

Match-making› Match-making is the glue which

brings discovery systems together› Allows participants to indirectly

identify each other i.e. can locate resources without

explicitly naming them

Page 173: Condor Tutorial GGF-5 / HPDC-11 July 2002

173http://www.cs.wisc.edu/condor

Three way matching

Machine NeSTJob

JobAd

MachineAd

StorageAdm

atch

Refers toNearestStorage.

Knows whereNearestStorage is.

Page 174: Condor Tutorial GGF-5 / HPDC-11 July 2002

174http://www.cs.wisc.edu/condor

Two way ClassAdsType = “job”TargetType = “machine”Cmd = “sim.exe”Owner = “thain”Requirements = (OpSys==“linux”)

Job ClassAd

Type = “machine”TargetType = “job”OpSys = “linux”Requirements = (Owner==“thain”)

Machine ClassAd

Page 175: Condor Tutorial GGF-5 / HPDC-11 July 2002

175http://www.cs.wisc.edu/condor

Three way ClassAdsType = “job”TargetType = “machine”Cmd = “sim.exe”Owner = “thain”Requirements = (OpSys==“linux”) && NearestStorage.HasCMSData

Job ClassAd

Type = “machine”TargetType = “job”OpSys = “linux”Requirements = (Owner==“thain”)NearestStorage = ( Name = “turkey”) && (Type==“Storage”)

Machine ClassAd

Type = “storage”Name = “turkey.cs.wisc.edu”HasCMSData = trueCMSDataPath = /cmsdata”

Storage ClassAd

Page 176: Condor Tutorial GGF-5 / HPDC-11 July 2002

176http://www.cs.wisc.edu/condor

BOOM!

Page 177: Condor Tutorial GGF-5 / HPDC-11 July 2002

177http://www.cs.wisc.edu/condor

CMS simulator sample run

› Frieda’s jobs have high I/O : CPU ratio› Access about 20MB from 300MB

database› Write about 1 MB of output› ~160 seconds execution time

on a 600 MIPS machine with local disk

Page 178: Condor Tutorial GGF-5 / HPDC-11 July 2002

178http://www.cs.wisc.edu/condor

To infinity and beyond› Speedups of 2.5x possible when

we are able to use locality intelligently

› This will continue to be important Data sets are getting larger and

larger There will always be bottlenecks

Page 179: Condor Tutorial GGF-5 / HPDC-11 July 2002

179http://www.cs.wisc.edu/condor

I/O Communities

UW INFN

Page 180: Condor Tutorial GGF-5 / HPDC-11 July 2002

180http://www.cs.wisc.edu/condor

Two Grid Communities› INFN Condor pool

236 machines, about 30 available at any one time

Wide range of machines and networks spread across Italy

Storage appliance in Bologna• 750 MIPS, 378 MB RAM

Page 181: Condor Tutorial GGF-5 / HPDC-11 July 2002

181http://www.cs.wisc.edu/condor

Two Grid communities› UW Condor pool

~900 machines, 100 dedicated for us Each is 600 MIPS, 512 MB RAM Networked on 100 Mb/s switch One was used as a storage appliance

Page 182: Condor Tutorial GGF-5 / HPDC-11 July 2002

182http://www.cs.wisc.edu/condor

Policy specification› Run only with locality

Requirements = (NearestStorage.HasCMSData)

› Run in only one particular community Requirements = (NearestStorage.Name == “nestore.bologna”)

› Prefer home community first Requirements = (NearestStorage.HasCMSData) Rank = (NearestStorage.Name == “nestore.bologna” ) ? 10 : 0

› Arbitrarily complex Requirements = ( NearestStorage.Name == “nestore.bologna”)

|| ( ClockHour < 7 ) || ( ClockHour > 18 )

Page 183: Condor Tutorial GGF-5 / HPDC-11 July 2002

183http://www.cs.wisc.edu/condor

Policies evaluated› INFN local› UW remote› UW stage first› UW local (pre-staged)› INFN local, UW remote› INFN local, UW stage› INFN local, UW local

Page 184: Condor Tutorial GGF-5 / HPDC-11 July 2002

184http://www.cs.wisc.edu/condor

Completion Time

Page 185: Condor Tutorial GGF-5 / HPDC-11 July 2002

185http://www.cs.wisc.edu/condor

CPU Efficiency

Page 186: Condor Tutorial GGF-5 / HPDC-11 July 2002

186http://www.cs.wisc.edu/condor

Future work› Automation of locality specification

Configuration of communities Dynamically adjust size as load

dictates› Automation of scheduling policy

Selection of movement policy Add storage appliances as necessary

Page 187: Condor Tutorial GGF-5 / HPDC-11 July 2002

187http://www.cs.wisc.edu/condor

Lessons from I/O Communities

› I/O communities expose locality policies

› Users can increase throughput

› Owners can maximize resource utilization

Page 188: Condor Tutorial GGF-5 / HPDC-11 July 2002

188http://www.cs.wisc.edu/condor

Wrap Up› Condor…

…empowers ordinary users; …can harness resources globally; …keeps everyone happy with matchmaking; …is flexible, reliable, and proven.

› Condor powers the Grid!

Page 189: Condor Tutorial GGF-5 / HPDC-11 July 2002

189http://www.cs.wisc.edu/condor

Condor at HPDC› John Bent, “Flexibility, Manageability, and

Performance in a Grid Storage Appliance” Wednesday, 1630, Session I

› Douglas Thain, “Error Scope on a Computational Grid: Theory and Practice” Thursday, 1330, Session VII

Page 190: Condor Tutorial GGF-5 / HPDC-11 July 2002

190http://www.cs.wisc.edu/condor

Thank you!Check us out on the Web:

http://www.cs.wisc.edu/condor

Email:[email protected]