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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Resp<strong>on</strong>se time (ms)<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

50<br />

λ 1 =2req/s, r 1 =70ms<br />

0<br />

0 2 4 6 8 10 12 14<br />

Request rate (req/s)<br />

(a) First measurement point selected such that<br />

the instance will not violate its SLO<br />

Resp<strong>on</strong>se time (ms)<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

Expected performance profile<br />

50<br />

λ1 =2req/s, r1 =70ms<br />

0<br />

0 2 4 6 8 10 12 14<br />

Request rate (req/s)<br />

(b) First estimati<strong>on</strong> of the instance’s profile<br />

thanks to queueing theory<br />

Resp<strong>on</strong>se time (ms)<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

Expected performance profile<br />

SLO<br />

0.8*SLO<br />

r 2expected =160ms<br />

λ 2 =9.7req/s, r 2 =138ms<br />

50<br />

λ1 =2req/s, r1 =70ms<br />

0<br />

0 2 4 6 8 10 12 14<br />

Request rate (req/s)<br />

(c) Selecti<strong>on</strong> of a sec<strong>on</strong>d measurement point<br />

close to the SLO<br />

Resp<strong>on</strong>se time (ms)<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

50<br />

Expected performance profile<br />

Fitted performance profile<br />

SLO<br />

0.8*SLO<br />

λ 1 =2req/s, r 1 =70ms<br />

λ 2 =9.7req/s, r 2 =138ms<br />

0<br />

0 2 4 6 8 10 12 14<br />

Request rate (req/s)<br />

(d) Fit performance profile of the new instance<br />

Resp<strong>on</strong>se time (ms)<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

Expected performance profile<br />

Fitted performance profile<br />

SLO<br />

0.8*SLO<br />

λ 1 =2req/s, r 1 =70ms<br />

λ 2 =9.7req/s, r 2 =138ms<br />

50<br />

λ3 =4.3req/s, r3 =78ms<br />

0<br />

0 2 4 6 8 10 12 14<br />

Request rate (req/s)<br />

(e) Correcti<strong>on</strong> of the performance profile of the<br />

new instance<br />

Figure 4: Online profiling process<br />

54 <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> <str<strong>on</strong>g>USENIX</str<strong>on</strong>g> Associati<strong>on</strong><br />

s =<br />

r1<br />

1+ λ1×r1<br />

n<br />

(4)<br />

where n is the number of CPU cores of this machine<br />

(as announced by the Cloud provider). The service time<br />

is the resp<strong>on</strong>se time of the instance under low workload<br />

where the effects of request c<strong>on</strong>currency are negligible.<br />

It indicates the capability of the instance to serve incoming<br />

requests. We can then use this service time to derive<br />

a first performance profile of the new instance as follows:<br />

s<br />

r(λ) =<br />

1 − λ×s<br />

(5)<br />

n<br />

Figure 4(b) shows the first performance profile of the<br />

new instance derived based <strong>on</strong> the calculated service<br />

time. One should however note that this profile built out<br />

of a single performance value is very approximate. For<br />

a more precise profile, <strong>on</strong>e needs to measure more data<br />

points.<br />

Using this profile, we can now calculate a sec<strong>on</strong>d<br />

workload intensity which should bring the instance close<br />

to the SLO. We select an expected resp<strong>on</strong>se time r2, then<br />

derive the workload intensity which should produce this<br />

resp<strong>on</strong>se time.<br />

r expected<br />

2 =0.8 × SLO (6)<br />

λ2 =<br />

n × (rexpected<br />

2<br />

r expected<br />

2<br />

− s)<br />

× s<br />

(7)<br />

Here we set the target resp<strong>on</strong>se time to 80% of the<br />

SLO to avoid violating the SLO of the profiled instance<br />

even though the initial performance profile will feature<br />

relatively large error margins. We can then address this<br />

workload intensity to the new instance and measure its<br />

real performance value (λ2, r2). As shown in Figure 4(c),<br />

the real performance of the sec<strong>on</strong>d point is somewhat different<br />

from the expected 80% of the SLO.<br />

We apply linear regressi<strong>on</strong> between the two measured<br />

points (λ1, r1), (λ2, r2) and get the fitted performance<br />

profile of the new instance as shown in Figure 4(d). We<br />

then let the load balancer calculate the weighted workload<br />

distributi<strong>on</strong> between the provisi<strong>on</strong>ed instance and<br />

the new <strong>on</strong>e.<br />

By addressing the weighted workload intensities to the<br />

two instances, we can measure the real resp<strong>on</strong>se time of<br />

the new instance. However, as shown in Figure 4(e), the<br />

real performance of the new instance differs slightly from<br />

the expected <strong>on</strong>e in Figure 4(d) due to the approximati<strong>on</strong><br />

error of its initial profile. We then correct the performance<br />

profile of the new instance by interpolating the<br />

third performance point(λ3, r3). We show that the above<br />

strategy is effective to profile heterogeneous virtual machines<br />

and provisi<strong>on</strong> single services in Secti<strong>on</strong> 5.

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

Saved successfully!

Ooh no, something went wrong!