A mathematical programming- and simulation-based framework...

10
A mathematical programming- and simulation-based framework to evaluate cyberinfrastructure design choices Zhengchun Liu * , Rajkumar Kettimuthu * , Sven Leyffer * , Prashant Palkar , and Ian Foster *‡ * Mathematics and Computer Science Division, Argonne National Laboratory, 9700 Cass Ave., Lemont, IL 60439, USA {zhengchun.liu, kettimut, leyffer, foster}@anl.gov Industrial Engineering and Operations Research, Indian Institute of Technology Bombay, Mumbai, MH, India 400076 [email protected] Department of Computer Science, University of Chicago, Chicago, IL 60637, USA Abstract—Modern scientific experimental facilities such as x- ray light sources increasingly require on-demand access to large- scale computing for data analysis, for example to detect experi- mental errors or to select the next experiment. As the number of such facilities, the number of instruments at each facility, and the scale of computational demands all grow, the question arises as to how to meet these demands most efficiently and cost-effectively. A single computer per instrument is unlikely to be cost-effective because of low utilization and high operating costs. A single national compute facility, on the other hand, introduces a single point of failure and perhaps excessive communication costs. We introduce here methods for evaluating these and other potential design points, such as per-facility computer systems and a distributed multisite “superfacility.” We use the U.S. Department of Energy light sources as a use case and build a mixed-integer programming model and a customizable superfacility simulator to enable joint optimization of design choices and associated operational decisions. The methodology and tools provide new insights into design choices for on-demand computing facilities for real-time analysis of scientific experiment data. The simulator can also be used to support facility operations, for example by simulating the impact of events such as outages. I. I NTRODUCTION New experimental modalities can generate extremely large quantities of data. The ability to make effective use of these new capabilities depends on the linking of data generation with computation, for example to filter out important results, identify experimental misconfigurations, or select the next experiment. X-ray light sources—crucial tools for addressing grand challenge problems in the life sciences, energy, climate change, and information technology [1–3]—illustrate these challenges well. A typical light source facility hosts dozens of beamlines, each with multiple instruments. Scientists who run experiments at beamlines want to collect the maximum information possible about the sample under study in as little time as possible. The ability to analyze data produced by detectors in near-real time can enable optimized data collection schemes, on-the-fly adjustments to experimental parameters, early detection of and response to errors (saving both beam time and scientist time), and ultimately improved productiv- ity [4–10]. At experimental science facilities such as Argonne’s Ad- vanced Photon Source (APS), data collected at beamline experiments are typically processed either locally on work- stations or at a central facility cluster—portions of which may be dedicated to specific beamlines. Inevitably, demand often outstrips supply, slowing analysis and/or discouraging the use of advanced computational methods. In this study, our goal is to ensure that compute resources are available on-demand to provide rapid turnaround time, which is crucial to ensure that data collected are useful and usable. With current state-of-the- art detectors, many beamlines already struggle to derive useful feedback rapidly with the locally available dedicated compute resources. Data rates are projected to increase considerably at many facilities in the next few years. Therefore, the ability to use high-performance computing (HPC) will be critical for these facilities. Real-time analysis is challenging because of the vast amounts of generated data that must be analyzed in short amounts of time. Detector technology is improving at rates far greater than Moore’s law, and modern detectors can generate data at multiple gigabytes per second. The com- putational power required to extract useful information from these streaming datasets in real time almost always exceeds the resources available at a beamline. Thus the use of remote computing facilities for analysis is no longer a luxury but a necessity. The use of remote computing facilities for real-time analysis requires effective and reliable methods for on-demand acquisi- tion of compute and network resources, efficient data stream- ing from beamline to compute facility, and analysis at data generation rates so that timely decisions can be taken. These tasks are complicated by the potential for competing load from different experiments. Researchers have performed a variety of preliminary studies on these problems, including methods for online analysis of data from microtomography [4, 5], high energy diffraction microscopy [6, 7], diffuse scattering [8], continuous motion scan ptychography [9], and linking of ultrafast three-dimensional x-ray imaging and continuum sim- ulation [10]. These studies illustrate that users of light source Published as a conference paper at IEEE eScience 2017

Transcript of A mathematical programming- and simulation-based framework...

Page 1: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

A mathematical programming- and simulation-basedframework to evaluate cyberinfrastructure design

choicesZhengchun Liu∗, Rajkumar Kettimuthu∗, Sven Leyffer∗, Prashant Palkar†, and Ian Foster∗‡

∗ Mathematics and Computer Science Division, Argonne National Laboratory, 9700 Cass Ave., Lemont, IL 60439, USA{zhengchun.liu, kettimut, leyffer, foster}@anl.gov

† Industrial Engineering and Operations Research, Indian Institute of Technology Bombay, Mumbai, MH, India [email protected]

‡ Department of Computer Science, University of Chicago, Chicago, IL 60637, USA

Abstract—Modern scientific experimental facilities such as x-ray light sources increasingly require on-demand access to large-scale computing for data analysis, for example to detect experi-mental errors or to select the next experiment. As the number ofsuch facilities, the number of instruments at each facility, and thescale of computational demands all grow, the question arises as tohow to meet these demands most efficiently and cost-effectively.A single computer per instrument is unlikely to be cost-effectivebecause of low utilization and high operating costs. A singlenational compute facility, on the other hand, introduces a singlepoint of failure and perhaps excessive communication costs. Weintroduce here methods for evaluating these and other potentialdesign points, such as per-facility computer systems and adistributed multisite “superfacility.” We use the U.S. Departmentof Energy light sources as a use case and build a mixed-integerprogramming model and a customizable superfacility simulatorto enable joint optimization of design choices and associatedoperational decisions. The methodology and tools provide newinsights into design choices for on-demand computing facilitiesfor real-time analysis of scientific experiment data. The simulatorcan also be used to support facility operations, for example bysimulating the impact of events such as outages.

I. INTRODUCTION

New experimental modalities can generate extremely largequantities of data. The ability to make effective use of thesenew capabilities depends on the linking of data generationwith computation, for example to filter out important results,identify experimental misconfigurations, or select the nextexperiment. X-ray light sources—crucial tools for addressinggrand challenge problems in the life sciences, energy, climatechange, and information technology [1–3]—illustrate thesechallenges well. A typical light source facility hosts dozensof beamlines, each with multiple instruments. Scientists whorun experiments at beamlines want to collect the maximuminformation possible about the sample under study in as littletime as possible. The ability to analyze data produced bydetectors in near-real time can enable optimized data collectionschemes, on-the-fly adjustments to experimental parameters,early detection of and response to errors (saving both beamtime and scientist time), and ultimately improved productiv-ity [4–10].

At experimental science facilities such as Argonne’s Ad-vanced Photon Source (APS), data collected at beamlineexperiments are typically processed either locally on work-stations or at a central facility cluster—portions of which maybe dedicated to specific beamlines. Inevitably, demand oftenoutstrips supply, slowing analysis and/or discouraging the useof advanced computational methods. In this study, our goal isto ensure that compute resources are available on-demand toprovide rapid turnaround time, which is crucial to ensure thatdata collected are useful and usable. With current state-of-the-art detectors, many beamlines already struggle to derive usefulfeedback rapidly with the locally available dedicated computeresources. Data rates are projected to increase considerably atmany facilities in the next few years. Therefore, the abilityto use high-performance computing (HPC) will be critical forthese facilities.

Real-time analysis is challenging because of the vastamounts of generated data that must be analyzed in shortamounts of time. Detector technology is improving at ratesfar greater than Moore’s law, and modern detectors cangenerate data at multiple gigabytes per second. The com-putational power required to extract useful information fromthese streaming datasets in real time almost always exceedsthe resources available at a beamline. Thus the use of remotecomputing facilities for analysis is no longer a luxury but anecessity.

The use of remote computing facilities for real-time analysisrequires effective and reliable methods for on-demand acquisi-tion of compute and network resources, efficient data stream-ing from beamline to compute facility, and analysis at datageneration rates so that timely decisions can be taken. Thesetasks are complicated by the potential for competing load fromdifferent experiments. Researchers have performed a varietyof preliminary studies on these problems, including methodsfor online analysis of data from microtomography [4, 5], highenergy diffraction microscopy [6, 7], diffuse scattering [8],continuous motion scan ptychography [9], and linking ofultrafast three-dimensional x-ray imaging and continuum sim-ulation [10]. These studies illustrate that users of light source

Published as a conference paper at IEEE eScience 2017

Page 2: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

facilities can understand their samples sufficiently during beamtime experiments to adjust the experiment in order to increasescientific output—if enough CPU and network resources canbe marshaled on demand. But it is far from clear how oneshould design a cyberinfrastructure that would allow these sci-ence workflows to marshal enough CPU and network resourceson demand.

In this work, we develop a framework to evaluate designchoices for such a cyberinfrastructure. Our framework consistsof a mathematical model, an optimization engine, and a dis-crete event simulator. It allows the users to identify optimal de-sign choices for a variety of objective functions and constraints(using the mathematical optimization for a smaller problemspace) and to evaluate how well they will work in practice(using simulation for a larger problem space). The objectivefunction could be a combination of constraints (e.g., maximumprocessing delay, minimum resource utilization) and scientificoutput (e.g., in terms of timeliness of data processing), systemreliability, and system cost. Our framework can be used toexplore interesting tradeoffs.

II. MOTIVATION

Various groups have demonstrated the connection of ex-perimental facilities with remote supercomputers using high-speed network connections such as ESnet to process datafrom experimental facilities in near-real time [5, 7, 8, 11].These demonstrations typically involved special arrangementswith compute facility and network operators to obtain thecompute and network resources on demand. But such specialarrangements are not efficient or scalable. Moreover, the batchqueue systems at supercomputers cannot meet the requirementof these experimental science workflows, which often requirecompute resources within minutes or even seconds of databecoming available.

New approaches are needed to provide the compute re-sources required by experimental facilities. For example, wemay build resources dedicated for a class of experimentalscience workflows (e.g., light source workflows) and scheduleexperiments to maximize their utilization. Or, we may addresources to the existing supercomputers, change schedulingpolicies to meet the needs of experimental science workflows,and share resources with batch jobs. Which approach is better?In either case, where do we place the new resources? Shouldwe put all resources in one place or distribute them across thedifferent sites? If distributed, how do we distribute them? Howmuch additional network capacity is needed? Other approachesare also possible: for example, commercial clouds leverage thelaw of large numbers and some degree of overprovisioning toenable immediate scheduling of at least modest-sized tasks.

Our goal is to develop a framework that will support awide range of analytical and simulation studies designed tounderstand the pros and cons of these different approachesand the inevitable tradeoffs between cost, performance, andother factors.

III. THE FRAMEWORK

When designing a cyberinfrastructure that caters to the on-demand requirements of one or more science communities orprojects, several factors should be considered. One key factoris flexibility. For example, an experiment schedule that hassome flexibility can be adjusted to minimize the peak demand.Thus, our framework has a demand optimization componentthat uses the flexibility in the demand to optimize the demand.Finding an optimal design that meets the user requirementswith the least budget would be ideal. Theoretically, one coulduse mathematical programming for this purpose, but this is anNP-complete problem. Mathematical programming also hasother restrictions such as a simplified data transfer modeland ideal scheduling based on a global vision of jobs. Thus,we include in our framework both mathematical program-ming and a discrete event simulator, so that mathematicalprogramming can be applied on a subset of the problem andthe top few most-optimal solutions can be evaluated on theoriginal (bigger) problem by using simulation (that is closerto reality) to identify a design that is most promising for areal-world environment. Figure 1 shows the architecture ofour framework.

A. Mathematical problem description

We are interested in formulating a mixed-integer program-ming (MIP) model that allows us to schedule jobs fromscientific facilities at HPC resources, taking into account thenetwork capacities and the resource capacities while ensuringthat slowdown for a given percentile of the jobs is below acertain threshold. The slowdown for a job is defined as theratio of the time length between the start and finish of a joband the run time of the job.

1) Definition of Sets: We use calligraphic letters to describethe sets in our mathematical model.Sites,S, is the set of scientific facilities/sites that create

compute jobs.Resources,R, is the set of HPC resources where the jobs are

processed.JobIds, I, is a set of unique job identifiers (we use integers).Jobs,J , is the set of jobs, where J ⊆ I × S .Time, T , is the set of (discretized) time intervals (again,

integers for us).Nodes,N , is the set of network nodes through which traffic

is routed.Links,L, is the set of links in the network, see Figure 9.Paths,P(s, r), is the set of (some) paths from site s ∈ S to

resource r ∈ R. Each path is described by a set of linksthat connect s to r.

2) Fixed Parameters and Constants: We use the followingparameters in the model. All are defined by using capitalletters.CreateTime, T 0

js ∈ T , is the time when job (j, s) ∈ J iscreated.

NumNodes, Njs, is the number of nodes required to processa job (j, s) ∈ J .

Page 3: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

Mathematical programming

Evaluate by simulator

Framework input Framework output

Analyze simple design choices / optimize demand

Top k solutions (design variables)

The framework

Parameters (e.g. arrival time, data size, resource demand, network topology.)

Revised parameters Constraints(e.g. utilization, budget.)

Objective (e.g. response time)

Desig

n ch

oice

Met

rics

Node

s at

eac

h sit

eNe

twor

kRe

spon

se

time

Utiliz

atio

nB

571

808

919

20 G

bps

4 m

in70

%

AC

1342

900

797

10 G

bps

1 m

in50

%

If not satisfied, Iterate utilization constraint / network bandwidth

Fig. 1: A framework to evaluate cyberinfrastructure design choices.

RunTime, TRjs, is the run time of job (j, s) ∈ J .DataSize, Djs, is the data size of job (j, s) ∈ J .Capacity, Ckl, is the maximum capacity of the link (k, l) ∈L.

ComputeBudget, B, is the maximum compute budget, mea-sured in number of nodes.

SlowDown, S, is the maximum slowdown for a predefinedpercentile of jobs.

Percentile, P, is the percentile of jobs that must have slow-down within S.

BigM,M, is a sufficiently large constant used for modelingpurposes, defined as follows.

M = max(j,s)∈J

|T | − T 0js

TRjs

3) Independent Problem Variables: We are interested inboth sizing the resources and allocating jobs to the resources.For better readability, we define the sets Tjs = {(T 0

js +1) . . . (|T | − TRjs)} and Tjs = {(T 0

js) . . . (|T | − TRjs − 1)},in other words, the set of time periods during which job(j, s) could run and the data corresponding to it could arrive,respectively. Next, we introduce the following sets of variables.

cr ≥ 0, an integer, is the maximum design capacity of re-source r ∈ R.

xjsrt ∈ {0, 1}, a binary variable, is 1 iff job (j, s) ∈ J is sentto resource r ∈ R at time t ∈ Tjs

λjsrpt : 0 ≤ λjsrpt ≤ 1 is the fraction of the data of job j ∈ Ithat is sent from site s ∈ S to resource r ∈ R along pathp ∈ P(s, r) at time t ∈ Tjs.

bkl : 0 ≤ bkl ≤ Ckl is the capacity of the link (k, l) ∈ L.zjsrp ∈ {0, 1}, a binary variable, is 1 iff job (j, s) ∈ J is sent

from site s ∈ S to resource r ∈ R along path p ∈ P(s, r).wjs ∈ {0, 1}, a binary variable, is 1 iff job (j, s) ∈ J has a

slowdown ≤ S.

4) Objective Function: The objective is to minimize theaggregate slowdown in scheduling of jobs.

minimizec,b,x,λ,z,w

∑(j,s)∈J

(∑r∈R

∑t∈Tjs t · xjsrt)− T

0js + TRjs

TRjs(III.1)

5) Constraints: The constraints fall into three sets: job-scheduling constraints, network constraints, and slowdownconstraints.

a) Job-Scheduling Constraints: We start by describingthe constraints that model the scheduling of the jobs. The firstconstraint states that every job is scheduled.∑

r∈R,t∈Tjs

xjsrt = 1, ∀(j, s) ∈ J (III.2)

Next, we model the compute capacity, cr, for every resourceand at all time instances.∑(j,s)∈J

Njs∑

τ∈Tjs:t−TRjs+1≤τ≤t

xjsrτ ≤ cr, ∀r ∈ R,∀t ∈ T

(III.3)The following constraint limits the total compute budget.∑

r∈Rcr ≤ B (III.4)

b) Network Constraints: The second set of constraintsmodels the fact that data cannot arrive at the compute resource,r ∈ R, after the job (j, s) ∈ J has started.∑

p∈P(s,r)

λjsrpt ≤∑

τ∈Tjs:τ≥(t+1)

xjsrτ ,

∀(j, s) ∈ J , ∀r ∈ R, ∀t ∈ Tjs(III.5)

Next, we write the capacity constraint for all links.∑(j,s)∈J

∑r∈R

∑p∈P(s,r):(k,l)∈p,

t∈Tjs

Djsλjsrpt ≤ bk,l,

∀(k, l) ∈ L, ∀t ∈ T .

(III.6)

Page 4: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

The next two constraints model the fact that data can betransmitted only on a unique path and only if it is processedat the target resource. First, we select a path.∑p∈P(s,r)

zjsrp =∑t∈Tjs

xjsrt, ∀(j, s) ∈ J , ∀r ∈ R (III.7)

Then, we constrain the transmission along links that are notpresent in the selected path.∑t∈Tjs

λjsrpt = zjsrp, ∀(j, s) ∈ J , ∀r ∈ R, ∀p ∈ P(s, r)

(III.8)c) Slowdown Constraints: The third set of constraints

models that at least a fixed percentile, P , of jobs must bewithin the slowdown limit, S.∑

(j,s)∈J

wj,s ≥ dP |J |e (III.9)

The following constraint enforces the condition that wjs is 1for a job (j, s) ∈ J if and only if the slowdown correspondingto this job is within S.

∑r∈R,t∈Tjs

t · xjsrt − T 0js ≤ TRjs(Swjs +M(1− wjs)),

∀(j, s) ∈ J(III.10)

d) Full Model: The complete mixed-integer optimizationproblem is then given as

minimizec,x,y,λ

(III.1) objective

subject to (III.2)− (III.4) job scheduling constraints(III.5)− (III.8) network constraints(III.9)− (III.10) delay constraints

We used AMPL [12, 13] to implement this mixed-integermodel. The model is not specific to any particular super-facility: parameters such as network topology, connectivity,HPC sites, and scientific facilities are customizable through aconfiguration file. The full code is open source and availableat https://github.com/ramsesproject/superfacility-mip.

B. A discrete event simulation

Finding an optimal solution by using mathematical program-ming for large problem sizes may not be feasible. Therefore,our framework uses mathematical programming on one ormore representative subsets of the problem and uses simulationto evaluate the solutions on large problem.

A discrete event simulation (DES) models the operation ofa system as a discrete sequence of events in time. Each eventoccurs at a particular instant in time and marks a changeof state in the system [14]. Between consecutive events, nochange in the system is assumed to occur; the simulationcan directly jump in time from one event to the next. TheDES approach thus contrasts with continuous simulation inwhich the simulation continuously tracks the system dynamicsover time. DES is called an activity-based simulation; time is

divided into small time slices, and the system state is updatedaccording to the activities that occur in each time slice. Thistype of simulation is ideal for modeling the execution processof workflow over distributed infrastructure.

We have built a discrete event simulator that encompassesexperiments at light source facilities, data transfers fromexperiment facilities to HPC sites, and job scheduling andexecution on HPC sites. It focuses on the process of thedistributed workflow. The simulator is implemented in thePython programming language with the ns-3 DES engine [15].The code and a tutorial are available at https://github.com/ramsesproject/superfacility.

1) Distributed workflow: Figure 2 shows the flow of simu-lation events. All actions are driven by events through callbackfunctions. Compared with a continuous implementation thatupdates state variables at each time step, this DES implemen-tation runs much faster because it does not have to simulateevery time step.

At each beamline of each light source facility, a job ischaracterized by its arrival time (tar), experiment setup time(Ts), data acquisition time (Tdaq), raw dataset size (Sraw),number of computing nodes required for analysis (Nnode),data analysis time (Trun), and size of the results (Sres). Insimulation, we obtain these job characteristics by samplingfrom the statistical data that we collect from each light sourcefacility. More specifically, in the beamline simulation module(on the top of Figure 2), when a previous experiment is done orat the beginning of simulation, a new job is initialized basedon data we collect at each facility if the current time is inthe operation time period (as shown in Figure 5). Then, anevent associated with a callback function setupFinishCB() isscheduled to happen after Ts seconds; that function updatesstate variables and schedules another event associated withcallback function daqFinishCB() to finish the data acquisition(i.e., right after Tdaq seconds). The callback function daqFin-ishCB() either triggers a new experiment if the current timeis in the operating period or schedules an event associatedwith a callback function to trigger a new experiment. Thus,each beamline of the light source facility keeps generating jobsduring its operating period (shown in Figure 5).

The job will be sent to the global scheduler once its data areready to be analyzed. Then the global scheduler will choosean HPC site for the job based on network and computingresource availability. We show in Figure 3 the job schedulingand network bandwidth reservation and sharing algorithm.

2) Scheduling: The scheduler or resource manager has aglobal view of resource availability and is responsible forfinding the best resource for each job. Scheduler policies havea great deal of influence on job slowdown and resource uti-lization. Currently we have implemented only one schedulingpolicy; other policies could be added, allowing the use of thesimulator to study the effectiveness of different schedulingpolicies before deployment.

Our current scheduling policy (also shown in Figure 3)assumes that there is a global scheduler that knows theavailability of the wide-area network and each HPC computing

Page 5: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

initiate a iob experiment setup callback

experiment finishing callback

schedule setup finish event

schedule experiment finish event

send job to scheduler

send job to data transfer node

schedule job to a HPC site

send job to HPC site

schedule start run event

start running callback

schedule run finish event

send results to its experiment site

raw data transfer finish callback

reschedule transfer finish event of other related jobs

Data transfer and job running are synchronized by bandwidth reservation. I.e., data transfer is guaranteed to be done (unless there is a failure) before scheduled running time of job at HPC site

reserve bandwidth

fair share free bandwidth

schedule transfer finish event

independent for each instrument

Iterate over each HPC site to calculate earliest job completion time based on HPC resource and network availability.

Fig. 2: Discrete event simulation flow chart of jobs over the superfacility. The detailed job scheduling algorithm is shown in Figure 3.

resource. When a new job is sent to the scheduler, we iterateover each HPC site to compute the earliest time when sufficientresources becomes available. Specifically, to calculate theearliest time, we first check the bandwidth availability fromthe light source facility to the tentative target HPC site in orderto compute the shortest data transfer time Ttrs. Then we checkthe computing resource availability from Ttrs seconds from thatmoment. The scheduler iterates over all HPC sites and selectsthe one with the earliest computing resource available time.

3) Data transfer service: We assume a guaranteed datatransfer time, as might be obtained by using a bandwidthreservation system such as OSCARS [16] over ESnet toreserve a specific amount of bandwidth from experiment site Eto HPC site C for a given time period. Thus, the data transfertime will be guaranteed, and the job can be started to run onthe HPC site as scheduled.

We also assume that the remaining (unreserved) bandwidthof each physical link is fair shared by all ongoing transfers.If, for example, there are 10 transfers over a 100 Gbps link attime t1 with a total reserved bandwidth of 80 Gbps, then eachjob will get extra 2 Gbps of bandwidth because of fair sharingof the unreserved 20 Gbps. This mechanism is applied becausesome new jobs may come at a future time t2; the new job willhave more bandwidth available if some of these 10 transfersare done before t2 because of the extra 2 Gbps of bandwidth.Thus, in simulation, an callback function that updates the extrabandwidth will be triggered when there is a new transfer or

an ongoing transfer has finished.

IV. CASE STUDY

We demonstrate the use of our framework to explore designchoices for a superfacility and to evaluate quantitatively thetradeoffs between user metrics (e.g., response time) and systemmetrics (e.g., utilization). Specifically, we evaluate the designchoices for a superfacility that provides on-demand computingresources for five U.S. Department of Energy light sourcefacilities [17]: the Advanced Light Source (ALS), AdvancedPhoton Source (APS), National Synchrotron Light Source II(NSLS), Linac Coherent Light Source (LCLS), and StanfordSynchrotron Radiation light source (SSRL).

A first factor to consider when studying computing needsat light sources is the facility operating schedules. As shownin Figure 4, each facility alternates between normal operatingperiods and shutdown periods in which maintenance is per-formed, with the latter scheduled on both weekly and longercadences. The shutdown periods of the different facilitiesoverlap a great deal, with aggregate operating hours beingparticularly reduced in January, September, and December.

A second factor is the nature of the computing tasksthat facilities generate when operating. Here we relied onmeasurements and/or estimates provided by the facilities ofexperiment setup time, data acquisition time, size of raw data,and computing demand in core-hours. Building on these data,we quantified and summed the hourly computing resource

Page 6: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

Get the max available bandwidth from E to C

A new job ready on E, foreach HPC site C

Calculate transfer time ttrttr(based on RTT, bandwidth and DTN load)

Starting from ttrttr+Now(), find computing resource available time on C, thpcthpc

Choosing HPC site based on thpcthpc

Recalculate bandwidth required. (to transfer all

data before thpcthpc)Reserve required bandwidth BresvBresv

Starting transfer with bandwidth Bresv + BexBresv + Bex

Fair share free bandwidth with other transfers BexBex

Update BexBex of transfers that share the link

Fig. 3: Simulated job scheduling and data transfer process.

Jan 2017 Feb 2017 Mar 2017 Apr 2017 May 2017 Jun 2017 Jul 2017 Aug 2017 Sep 2017 Oct 2017 Nov 2017 Dec 2017

NSLS

APS

SSRL

LCLS

ALS

Fig. 4: Shaded periods denote normal operating periods at each of the five DOE light source facilities during 2017. Other timeperiods are shutdown periods for maintenance.

demands across all five facilities. The resulting numbers areapproximate and do not necessarily capture future evolutionin demand, but they provide a basis for analysis.

Figure 5 shows the resulting aggregate computing resourcedemands. The green line indicates the (often substantial)computing resources required to ensure on-demand accessto computing during each period; the blue line shows thecomputing resources required to meet average demand overthe year, that is, to ensure that all demands are eventuallymet. As the figure shows, the difference between peak andaverage computing demand is high; thus, deploying sufficientresources to be able to meet peak demand at all times willresult in low utilization.

A. Analysis of simple design choices

Some design choices can be evaluated (and possibly elimi-nated) by using basic analysis.

a) Dedicated supercomputer for each facility: The moststraightforward way to realize on-demand analysis of lightsource data is to build a separate, dedicated computing re-source at each facility capable of meeting its peak require-ments. Doing so, however, will result in overall utilizations of20.7%. These utilization values are calculated by dividing theactual resource requirement (sum of the compute requirementfor each job in core-hours) by the total resource deployed (thepeak demand times 8760, which is the number of hours in oneyear). One reason for the low utilizations is that, as shown inFigure 4, each facility has its own shutdown periods on bothlong (months) and short (days) time scales. Indeed, NSLS,APS, SSRL, LCLS, and ALS operate for only 46.6%, 56.8%,63.4%, 57.8%, and 48.3% of the time, respectively, in 2017.

b) One supercomputer for all facilities: Another obviousdesign choice is to build a single centralized compute facilityto meet the aggregate demand of all five light source facilities.If we do so, however, the overall resource utilization is only28.7%. While better than building a separate computer foreach facility, this is still extremely low. The problem is thatthe difference between the peak and average demand is large,as shown in Figure 5.

c) Optimization of demand: We can improve computeresource utilization by reducing the gap between peak andaverage demand. For example, we could adjust the shutdownschedule for different facilities. One simple adjustment wouldbe to retain the current sequence of active and shutdownperiods at each facility, but to shift certain facilities’ annualoperating schedules forward in time in a manner that reducescontention for shared compute resources. We explored thisoption, performing an exhaustive search of potential whole-day shifts across the various facilities. (This search took about1,000 core-hours; but since this is a one-time optimization, itis not onerous.) We determined that the optimal shift to reducethe variance in demand for each facility would be SNSLS = 0days, SAPS = 159 days, SSSRL = 350 days, SLCLS = 202 days,and SALS = 318 days. Figure 6 shows the shifted schedule andFigure 7 the computing resource requirements after applyingthe optimal shift. Comparing with Figure 5, we see that thevariance in resource demand is indeed reduced after shiftingthe operating schedule.

Even with this shifted schedule, however, and if we deployenough compute resources to provide on-demand access for alljobs, the average resource utilization is still only 34%. Thisresult can be improved by other adjustments. For example, wecould adjust experiment schedules during operations. Alterna-

Page 7: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

Jan 2017 Feb 2017 Mar 2017 Apr 2017 May 2017 Jun 2017 Jul 2017 Aug 2017 Sep 2017 Oct 2017 Nov 2017 Dec 20170

1

2

3

4

5

6

7Nu

mbe

r of n

odes

requ

ried

(×1k

)

Fig. 5: Aggregate computing requirement for select data- and compute-intensive beamlines at the five facilities.

Jan 2017 Feb 2017 Mar 2017 Apr 2017 May 2017 Jun 2017 Jul 2017 Aug 2017 Sep 2017 Oct 2017 Nov 2017 Dec 2017

NSLS

APS

SSRL

LCLS

ALS

Fig. 6: Operating schedule of five DOE light source facilities after applying optimal shift to each facility’s 2017 schedule.

Jan 2017 Feb 2017 Mar 2017 Apr 2017 May 2017 Jun 2017 Jul 2017 Aug 2017 Sep 2017 Oct 2017 Nov 2017 Dec 20170

1

2

3

4

5

6

7

Num

ber o

f nod

es re

qurie

d (×

1k)

Fig. 7: Aggregate computing demand for data- and compute-intensive beamlines at the five facilities after applying optimal shift.

tively, we could allow certain (presumably lower-priority) jobsto be delayed. If 5% of the jobs can have slowdown greaterthan one, then resource utilization improves to 61%.

d) Distribution of the compute resources: A single com-pute facility introduces a single point of failure and potentiallyalso excessive communication costs. Distributing the comput-ing resources to multiple locations can improve availabilityand reduce network congestion.

Besides the five light source facilities, the DOE Office ofScience operates three major HPC sites: the Argonne Lead-ership Computing Facility (ALCF), Oak Ridge LeadershipComputing Facility (OLCF), and National Energy ResearchScientific Computing Center (NERSC). These HPC sites andthe light source facilities are all connected by the ESnet, ahigh-speed computer network serving DOE scientists and theircollaborators worldwide. To ease HPC resource management,we assume that the new computing resources can be deployedto those three HPC sites. Figure 9 shows the topology of theproposed superfacility.

Table I compares the 75th and 95th percentile slowdown forthe regular and shifted schedule with the compute resourcesdistributed equally across the three compute facilities.

TABLE I: Comparison of slowdown between regular operatingscheduling and optimally shifted operating schedule.

Resource Regular Schedule Optimal ScheduleQ75 Q95 Q75 Q95

1.00× 986.31 6321.02 457.48 1400.241.25× 141.30 991.51 14.71 73.681.50× 7.30 82.56 1.41 5.231.75× 3.12 10.06 1.12 1.992.00× 1.21 2.99 1.04 1.77

B. Joint optimization of design choices: A demonstration

Section IV-A excluded some straightforward design choicesthrough basic analysis. Both analytics in terms of resourceutilization, experiment job slowdown, and the influence ofunplanned outage imply that distributed-computing resourcesis a better choice. This section demonstrates the use of ourframework to evaluate the design choice.

The time taken by state-of-the-art mixed-integer linearprogramming algorithms to solve a particular instance maypartly depend on its size, that is, on the number of discretevariables and associated constraints. The model presented in

Page 8: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

DOE - ESnet

… Experiment Facility m

Data analysis process

Computing Facility 1

High Performance Computer

Data analysis process

Computing node 1

Computing node x

Data Read Process

HPC Storage

Data Transfer Process RAM Data analysis processData Transfer Process RAM

Computing node q

Data Transfer Process

Data Transfer Node

Data Transfer Process

Data Transfer NodeData Write Process

Computing Facility p

Data analysis process…

High Performance Computer

Data analysis process

Computing node 1

Computing node x

Data Read Process

HPC Storage

Data Transfer Process RAM Data analysis processData Transfer Process RAM

Computing node q

Data Transfer Process

Data Transfer Node

Data Transfer Process

Data Transfer NodeData Write Process

… …

Instrument n

Data acquisition process Data Transfer ProcessRAM

Data Acquisition Node

Visualization process Data Transfer ProcessRAM

Data Visualization Node

Instrument 1

Data acquisition process

Data Acquisition Node

Visualization process

Data Visualization Node Data Transfer ProcessData Transfer NodeData Read Process

Storage

Data Write Process

Experiment Facility 1

Instrument n

Data acquisition process Data Transfer ProcessRAM

Data Acquisition Node

Visualization process Data Transfer ProcessRAM

Data Visualization Node

Instrument 1

Data acquisition process

Data Acquisition Node

Visualization process

Data Visualization Node Data Transfer ProcessData Transfer NodeData Read Process

Storage

Data Write Process

Fig. 8: Sample superfacility over ESnet that supports both streaming and batch workflows.

SLAC

NERSCLBL

PNWG

DENV

ELPA

HOUS

KANS

NASH

ATLA

ORNL

ANL

CHIC

AOFANEWY

BNL

BOST

SUNN

SACR

WASH

SSRL

LCLS

ALCF

APS

OLCF

NSLS

ALSSTAR

Supercomputer centerHub

Lightsource facility

ALBQ

Fig. 9: DOE superfacility topology, showing the five light sources,three HPC facilities, and the ESnet backbone.

this paper has |J | × |R| × (∑

(j,s)∈J |Tjs|), |J | × |R| ×(∑s∈S,r∈R|P(s, r)|)× (

∑(j,s)∈J |Tjs|) and |J | instances of

the x, λ, and w binary variables, respectively. Since sites,resources, and links do not change frequently, the major factorsimpacting the number of variables and constraints (except(III.9)) are the number of jobs (|J |) and the time period (|T |)of the optimization.

Solving a model with many intervals is a challenge in termsof both compute and memory requirements. For example,when using a step size of 10 seconds, a model for fivehours (1,800 intervals, about 200 jobs) will have hundredsof thousands of variables. Therefore, instead of solving themodel for a whole year (T ), we solve the model for somerepresentative time periods and then use simulation to evaluatethe top-k optimal solutions of each time period in order toachieve the feasible optimal choice in practice.

After applying the optimal shift, we have four of the fivefacilities operating most of the time (see Figure 7). We pick sixshort (three-hour) representative time periods—one in whichall facilities are operating and five in which only four facilitiesare operating, with each of the latter involving a unique set offour operating facilities. We implemented the MIP model byusing AMPL [12, 13], solved with CPLEX optimizer [18] forthis subset, and evaluated the top 20 optimal solutions of theMIP model by using simulation.

Table II shows example simulation results. We have de-signed our framework to output multiple solutions, for tworeasons. First, many design choices have similar objectivefunction values (e.g., job slowdown). For example, Figure 10shows the objective function value of the top 20 solutions.The difference between the optimal objective function valueand the 20th optimal is small (only 1.6 %). However, theirresource distributions are different. Second, we do not expectthat even a good model will capture all design constraints.Thus an apparently suboptimal design choice (i.e., one with aslightly different objective function value) may be subjectivelymore feasible in practice. By presenting multiple solutions,we allow analysts to consider other factors in their decisionmaking.

V. RELATED WORK

The most straightforward way to evaluate the performanceof a new system before it is built is through modeling andsimulation. This process can help determine performancebottlenecks inherent in an architecture and provide a basis forrefining the system configuration.

Optimal job scheduling is NP-hard because of its com-binatorial nature. The study of scheduling algorithms forworkflows that run over distributed infrastructure has been anactive area of research. Given the nature of most scheduling

Page 9: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

0 2 4 6 8 10 12 14 16 18Top-k optimal solution index

1.375

1.380

1.385

1.390

1.395

1.400

1.405Av

erag

e jo

b slo

wdow

n

Fig. 10: Objective function values (average job slowdown) of top20 optimal solutions.

TABLE II: Tradeoff between resource distribution and jobslowdown. SD denotes the 75th percentile of job slowdown, UTis the computing resource utilization (%).

Design choice MetricComputer nodes Network User (SD) Provider (UT)

ANL NERSC ORNL

774 669 1653 20 Gbps 2.07 66.7771 1476 849 20 Gbps 1.54 66.7938 1050 1108 20 Gbps 1.41 66.7

1220 1050 826 20 Gbps 1.37 66.7990 757 653 30 Gbps 52.0 86.0966 778 656 30 Gbps 51.8 86.0

1122 1050 924 30 Gbps 1.13 66.7798 1184 1114 30 Gbps 1.13 66.7668 808 1620 30 Gbps 1.16 66.7571 808 1717 30 Gbps 1.17 66.7

problems, one needs to evaluate and compare their efficacyover a wide range of scenarios. It has thus become necessary tosimulate those algorithms for increasingly complex distributeddynamic and workflow applications. For example, Casanovaet al. [19, 20] developed SimGrid, a simulation toolkit for thestudy of scheduling algorithms for distributed applications. Wuet al. [21] used a simulation system to study the executiondynamics of distributed computing workflows and to evaluatethe network performance of workflow scheduling or mappingalgorithms before actual deployment and experimentation.However, these systems focused on evaluating individualworkflows, not infrastructure design.

Mathematical programming is widely used in operationsresearch to minimize or maximize an objective function ofmany variables, subject to constraints on the variables [12]. Itis also an important tool for optimizing design choices, jobscheduling, and resource configuration in distributed systems.For example, Chretien et al. [22] introduced an approach basedon successive linear programming approximations of a sparsemodel. They relaxed an integer linear program and used lpnorm-based operators to force the solver to find almost-integersolutions that can be assimilated to an integer solution. Kumaret al. [23] presented a metabroker that schedules multiple jobs

on utility grids, with a linear/integer programming model usedto schedule jobs. They also proposed a linear-programming-driven genetic algorithm that combines linear programmingand genetic algorithms to obtain a metaschedule that mini-mizes the combined cost of all users in a coordinated manner.However, these studies focused on evaluating scheduling al-gorithms and did not consider infrastructure constraints, suchas networks.

Although researchers have demonstrated near-real-time pro-cessing of data from experimental facilities [5, 7, 8, 11], theyhave not addressed the problem of how to obtain the computeand network resources on demand. The use of numericaloptimization and simulation methods to guide design of dis-tributed systems is well established [24, 25]. However, littlework has been done on applying such methods to the designof distributed computational facilities. The Models Of Net-worked Analysis at Regional Centers (MONARC) system [26]applied discrete event simulation methods to evaluate designalternatives for high energy physics computing; their focus wason specialized workflows involving a single data source andmany data analysis sites. Others have used simulation to studythe performance of distributed computing applications [19, 20],scheduling algorithms [27], or data replication strategies [28],among many other topics, but with a focus on applicationperformance rather than large-scale system design.

VI. DISCUSSION AND CONCLUSION

We have presented a framework to evaluate design choicesfor a cyberinfrastructure. The framework uses a combinationof mathematical programming and simulation to find near-optimal resource distributions that can work well in prac-tice. We used mixed-integer programming to find the topk optimal resource distributions for a representative subsetof the problem, and we evaluated these solutions using adiscrete event simulator that incorporates a number of aspectsto mimic the real-world environment. We used the exampleof a superfacility for analyzing light source data in orderto demonstrate how our framework can be used to evaluatedifferent design choices and understand associated tradeoffs.The customizable simulator developed in this work is alsouseful in superfacility operations, for example (1) to workas a part to decision support system to evaluate proposalsfor unforeseen scenarios; (2) to prove the feasibility of newproject in terms of its computing requirement; and (3) tostudy scheduling algorithms for workflows run over distributedinfrastructure.

We note that we did not consider the use of commercialclouds in our design choices; we plan to do so in futurework. Another topic of future work is integrating the simu-lator (it will work as a function to evaluate design choices)with derivative-free optimization methods in order to directlyoptimize superfacility design choices.

ACKNOWLEDGMENT

This material was based upon work supported in partby the U.S. Department of Energy, Office of Science, Ad-

Page 10: A mathematical programming- and simulation-based framework ...zcliu/file/eScience17-preprint-Liu.pdf · of preliminary studies on these problems, including methods for online analysis

vanced Scientific Computing Research, under Contract DE-AC02-06CH11357. The mathematical programming modelwas solved by using a cluster hosted by the Joint Laboratoryfor System Evaluation at Argonne National Laboratory. Wethank Amedeo Perazzo, Aina Cohen, Dula Parkinson, Alexan-der Hexemer, Brian Toby, and Nicholas Schwarz for providingus data about the experiment characteristics at light sourcefacilities.

REFERENCES

[1] “Directing Matter and Energy: Five Challenges for Science andthe Imagination,” https://science.energy.gov/∼/media/bes/pdf/reports/files/Directing Matter and Energy rpt.pdf, 2007.

[2] “Next-Generation Photon Sources for Grand Challenges in Sci-ence and Energy,” https://science.energy.gov/∼/media/bes/pdf/reports/files/Next-Generation Photon Sources rpt.pdf, 2009.

[3] “The Report of the BES Advisory Subcommittee on Future X-ray LightSources,” https://science.energy.gov/∼/media/bes/besac/pdf/Reports/Future Light Sources report BESAC approved 72513.pdf, 2013.

[4] T. Bicer, D. Gursoy, R. Kettimuthu, F. De Carlo, G. Agrawal, andI. T. Foster, “Rapid tomographic image reconstruction via large-scaleparallelization,” in Euro-Par 2015: Parallel Processing. LNCS 9233,2015, pp. 289–302. [Online]. Available: http://dx.doi.org/10.1007/978-3-662-48096-0 23

[5] T. Bicer, D. Gursoy, R. Kettimuthu, F. De Carlo, and I. T.Foster, “Optimization of tomographic reconstruction workflows ongeographically distributed resources,” Journal of Synchrotron Radiation,vol. 23, no. 4, pp. 997–1005, Jul 2016. [Online]. Available:https://doi.org/10.1107/S1600577516007980

[6] J. M. Wozniak, H. Sharma, T. G. Armstrong, M. Wilde, J. D. Almer, andI. Foster, “Big data staging with MPI-IO for interactive X-ray science,”in IEEE/ACM International Symposium on Big Data Computing. IEEEComputer Society, 2014, pp. 26–34.

[7] J. M. Wozniak, K. Chard, B. Blaiszik, M. Wilde, and I. Foster,“Streaming, storing, and sharing big data for light source science,” Proc.STREAM, 2015.

[8] I. Foster, R. Ananthakrishnan, B. Blaiszik, K. Chard, R. Osborn,S. Tuecke, M. Wilde, and J. Wozniak, “Networking materials data:Accelerating discovery at an experimental facility,” in Big Data andHigh Performance Computing. IOS Press, 2015, pp. 117–132.

[9] J. Deng, Y. S. Nashed, S. Chen, N. W. Phillips, T. Peterka, R. Ross,S. Vogt, C. Jacobsen, and D. J. Vine, “Continuous motion scan ptychog-raphy: characterization for increased speed in coherent x-ray imaging,”Optics Express, vol. 23, no. 5, pp. 5438–5451, 2015.

[10] M. J. Cherukara, K. Sasikumar, W. Cha, B. Narayanan, S. Leake,E. Dufresne, T. Peterka, I. McNulty, H. Wen, S. K. Sankaranarayananet al., “Ultra-fast three-dimensional X-ray imaging of deformationmodes in ZnO nanocrystals,” Nano Letters, 2017.

[11] L. Ramakrishnan, G. Fox, and S. Jha, “Stream2016: Streaming re-quirements, experience, applications and middleware workshop,” Tech.Rep. LBNL-1006355, 2016, https://pubarchive.lbl.gov/islandora/object/ir%3A1006355/.

[12] R. Fourer, D. M. Gay, and B. W. Kernighan, AMPL: A modelinglanguage for mathematical programming. Second edition. INFORMS,2002.

[13] “AMPL Optimization Inc.” 2009, http://ampl.com/about-us/.[14] S. Robinson, Simulation: The Practice of Model Development and Use.

John Wiley & Sons, 2004.[15] G. F. Riley and T. R. Henderson, “The ns-3 network simulator,”

Modeling and Tools for Network Simulation, pp. 15–34, 2010.[16] ESnet-OSCARS, On-Demand Secure Circuits and Advance Reser-

vation System, 2017 (accessed June 3, 2017), https://www.es.net/engineering-services/oscars/.

[17] U.S. DOE Office of Science, X-Ray Light Sources, 2017 (ac-cessed June 13, 2017), https://science.energy.gov/bes/suf/user-facilities/x-ray-light-sources/.

[18] “IBM ILOG CPLEX V12.1: Users manual for CPLEX,” 2009, Interna-tional Business Machines Corporation.

[19] H. Casanova, “SimGrid: A toolkit for the simulation of applicationscheduling,” in 1st IEEE/ACM International Symposium on ClusterComputing and the Grid, 2001, pp. 430–437.

[20] H. Casanova, A. Giersch, A. Legrand, M. Quinson, and F. Suter,“Versatile, scalable, and accurate simulation of distributed applicationsand platforms,” Journal of Parallel and Distributed Computing,vol. 74, no. 10, pp. 2899–2917, Jun. 2014. [Online]. Available:http://hal.inria.fr/hal-01017319

[21] Q. Wu and Y. Gu, “Modeling and simulation of distributed computingworkflows in heterogeneous network environments,” SIMULATION,vol. 87, no. 12, pp. 1049–1065, 2011. [Online]. Available: http://dx.doi.org/10.1177/0037549710396920

[22] S. Chretien, J.-M. Nicod, L. Philippe, V. Rehn-Sonigo, and L. Toch,“Job scheduling using successive linear programming approximationsof a sparse model,” in 18th International Euro-Par Parallel ProcessingConference. Springer, 2012, pp. 116–127. [Online]. Available:http://dx.doi.org/10.1007/978-3-642-32820-6 14

[23] S. K. Garg, P. Konugurthi, and R. Buyya, “A linear programming-driven genetic algorithm for meta-scheduling on utility grids,”International Journal of Parallel, Emergent and Distributed Systems,vol. 26, no. 6, pp. 493–517, 2011. [Online]. Available: http://dx.doi.org/10.1080/17445760.2010.530002

[24] A. N. Tantawi and D. Towsley, “Optimal static load balancing indistributed computer systems,” Journal of the ACM, vol. 32, no. 2, pp.445–465, 1985.

[25] L. Breslau, D. Estrin, K. Fall, S. Floyd, J. Heidemann, A. Helmy,P. Huang, S. McCanne, K. Varadhan, Y. Xu et al., “Advances in networksimulation,” Computer, vol. 33, no. 5, pp. 59–67, 2000.

[26] I. C. Legrand and H. B. Newman, “The MONARC toolset for sim-ulating large network-distributed processing systems,” in 32nd WinterSimulation Conference, 2000, pp. 1794–1801.

[27] H. Arabnejad, J. G. Barbosa, and R. Prodan, “Low-time complexitybudget–deadline constrained workflow scheduling on heterogeneousresources,” Future Generation Computer Systems, vol. 55, pp. 29–40,2016.

[28] K. Ranganathan and I. Foster, “Identifying dynamic replication strategiesfor a high-performance data grid,” in Grid Computing. LNCS 2242.Springer, 2001, pp. 75–86.