29.11.2012 Views

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Although expressing performance profiles as a functi<strong>on</strong><br />

of request rate is useful for load balancing, for performance<br />

predicti<strong>on</strong> we need to express performance<br />

profiles as a functi<strong>on</strong> of CPU utilizati<strong>on</strong> (for applicati<strong>on</strong><br />

server tiers) or I/O utilizati<strong>on</strong> (for database server tiers).<br />

When profiling a machine instance, we also measure the<br />

relevant metrics of resource utilizati<strong>on</strong>, and use the exact<br />

same technique to build performance profiles that are<br />

suitable for performance predicti<strong>on</strong>.<br />

4.4 Performance predicti<strong>on</strong><br />

To efficiently select the tier in which a new instance will<br />

be most valuable to the applicati<strong>on</strong> as a whole, we first<br />

need to know the performance profile of this instance<br />

when running each of the applicati<strong>on</strong>’s tiers. A naive approach<br />

would be to successively measure this profile with<br />

each tier <strong>on</strong>e by <strong>on</strong>e before taking a decisi<strong>on</strong>. However,<br />

this strategy would be too slow to be of any practical use.<br />

Indeed, profiling a new machine with a real applicati<strong>on</strong><br />

tier requires to first replicate the hosted service to the new<br />

machine. For instance, when profiling a new machine<br />

for a database tier, <strong>on</strong>e needs to first replicate the entire<br />

database to the new machine before starting the profiling<br />

process. Replicating a medium-sized database can easily<br />

take tens of minutes, and this durati<strong>on</strong> increases linearly<br />

with the database size. We therefore need to be able to<br />

quickly predict the performance profiles, without needing<br />

to actually replicate the database.<br />

We found that the most characteristic feature of a virtual<br />

instance to predict the performance profile of a given<br />

tier in this instance is its resource utilizati<strong>on</strong>. Although<br />

the absolute resp<strong>on</strong>se time of two different tiers in the<br />

same machine under the same CPU or I/O utilizati<strong>on</strong> are<br />

not identical, they are highly correlated.<br />

We illustrate this in Figure 5. Each point in this graph<br />

represents the resp<strong>on</strong>se times of two different applicati<strong>on</strong><br />

server tiers running in the same machine instance,<br />

and having the same CPU utilizati<strong>on</strong> (respectively 15%,<br />

25%, 65% and 80%). The request rates necessary to<br />

reach a given CPU utilizati<strong>on</strong> varies from <strong>on</strong>e applicati<strong>on</strong><br />

to the next. We however observe that the points form<br />

an almost perfect straight line. This allows us to derive<br />

new performance profiles from already known <strong>on</strong>es. The<br />

same observati<strong>on</strong> is also true for database server tiers,<br />

taking the disk I/O bandwidth c<strong>on</strong>sumpti<strong>on</strong> as the resource<br />

utilizati<strong>on</strong> metric.<br />

Given the resp<strong>on</strong>se time and resource utilizati<strong>on</strong> of<br />

<strong>on</strong>e tier in a given machine instance, we can infer the<br />

resp<strong>on</strong>se time of the sec<strong>on</strong>d tier in the same machine instance<br />

under the same resource utilizati<strong>on</strong>. Figure 6 illustrates<br />

the input and output of this predicti<strong>on</strong>: we predict<br />

the performance of tier 1 and tier 2 <strong>on</strong> a new machine by<br />

50<br />

CPU utilizati<strong>on</strong> = 25% CPU utilizati<strong>on</strong> = 80%<br />

40<br />

110 115 120 125 130 135 140<br />

Tier service resp<strong>on</strong>se time (ms)<br />

<str<strong>on</strong>g>USENIX</str<strong>on</strong>g> Associati<strong>on</strong> <strong>Web</strong>Apps ’11: <str<strong>on</strong>g>2nd</str<strong>on</strong>g> <str<strong>on</strong>g>USENIX</str<strong>on</strong>g> <str<strong>on</strong>g>C<strong>on</strong>ference</str<strong>on</strong>g> <strong>on</strong> <strong>Web</strong> Applicati<strong>on</strong> <strong>Development</strong> 55<br />

Reference applicati<strong>on</strong> resp<strong>on</strong>se time (ms)<br />

110<br />

100<br />

90<br />

80<br />

70<br />

60<br />

Correlati<strong>on</strong> of two performance profiles<br />

CPU utilizati<strong>on</strong> = 15%<br />

CPU utilizati<strong>on</strong> = 65%<br />

Figure 5: Performance correlati<strong>on</strong> between reference applicati<strong>on</strong><br />

and tier service<br />

Input:<br />

perf (machinecalibrati<strong>on</strong>, app ref )=f(load)<br />

perf (machinecalibrati<strong>on</strong>, app tier1 )=f(load)<br />

perf (machinecalibrati<strong>on</strong>, app tier2 )=f(load)<br />

perf (machinenew, app ref )=f(load)<br />

Output:<br />

perf (machinenew, app tier1 )=f(load)<br />

perf (machinenew, app tier2 )=f(load)<br />

Figure 6: Input and output of the performance profile<br />

predicti<strong>on</strong><br />

correlating their performance and the reference applicati<strong>on</strong><br />

performance <strong>on</strong> a calibrati<strong>on</strong> machine.<br />

First, we need to measure the applicati<strong>on</strong>-specific demands<br />

of each tier of the applicati<strong>on</strong>. This has to be d<strong>on</strong>e<br />

<strong>on</strong>ly <strong>on</strong>ce per applicati<strong>on</strong>. This profiling should be d<strong>on</strong>e<br />

<strong>on</strong> a single calibrati<strong>on</strong> machine, which can be any particular<br />

virtual instance in the Cloud. To predict the performance<br />

of any particular tier <strong>on</strong> a new instance quickly,<br />

we also benchmark the calibrati<strong>on</strong> machine using two<br />

synthetic reference applicati<strong>on</strong>s which respectively exhibit<br />

CPU-intensive features characteristic of applicati<strong>on</strong><br />

servers, and I/O-intensive features characteristic of<br />

database servers. The Ref CPU applicati<strong>on</strong> receives customer<br />

names and generates detailed pers<strong>on</strong>al informati<strong>on</strong><br />

through CPU-intensive XML transformati<strong>on</strong>. The Ref I/O<br />

applicati<strong>on</strong> searches for items related to a customer’s previously<br />

ordered items from a large set of items. The operati<strong>on</strong>s<br />

of the reference applicati<strong>on</strong>s introduce typical<br />

CPU-intensive and disk I/O-intensive workloads. The<br />

reference applicati<strong>on</strong>s can be deployed very quickly <strong>on</strong><br />

any new machine instance, for example by including it<br />

to the operating system image loaded by the virtual machine<br />

instances. We use Ref CPU as a reference point<br />

to predict the performance profiles of applicati<strong>on</strong> server

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!