Fuzzy Control meets Software Engineering
-
Upload
pooyan-jamshidi -
Category
Software
-
view
258 -
download
2
description
Transcript of Fuzzy Control meets Software Engineering
![Page 1: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/1.jpg)
Fuzzy Control meets Software Engineering
Pooyan Jamshidi
IC4- Irish Centre for Cloud Computing and Commerce
School of Computing, Dublin City University
Dagstuhl SeminarControl Theory meets Software EngineeringSeptember, 2014
![Page 2: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/2.jpg)
Naeem Esfahani and Sam Malek, “Uncertainty in Self-Adaptive Software Systems”
Knowledge SpecificationUncertainty
2
![Page 3: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/3.jpg)
3
![Page 4: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/4.jpg)
Application #1:
Auto-scaling
![Page 5: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/5.jpg)
~50% = wasted hardware
Actual traffic
Typical weekly traffic to Web-based applications (e.g., Amazon.com)
5
![Page 6: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/6.jpg)
Problem 1: ~75% wasted capacityActual
demand
Problem 2:
customer lost
Traffic in an unexpected burst in requests (e.g. end of year traffic to Amazon.com)
6
![Page 7: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/7.jpg)
Really like this??
Auto-scaling enables you to realize this ideal on-demand provisioning
Time
Dem
and
?Enacting change in the Cloud resources are notreal-time
7
![Page 8: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/8.jpg)
Capacity we can provision with Auto-Scaling
A realistic figure of dynamic provisioning
8
![Page 9: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/9.jpg)
9
![Page 10: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/10.jpg)
0 50 1000
500
1000
1500
0 50 100100
200
300
400
500
0 50 1000
1000
2000
0 50 1000
200
400
600
10
![Page 11: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/11.jpg)
11
![Page 12: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/12.jpg)
These quantitative values are required to be determined by the user requires deep
knowledge of application (CPU, memory, thresholds)
requires performance modeling expertise (when and how to scale)
A unified opinion of user(s) is required
Amazon auto scalingMicrosoft Azure Watch
12
Microsoft Azure Auto-
scaling Application Block
12
![Page 13: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/13.jpg)
13
![Page 14: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/14.jpg)
Uncertainty related to enactment latency: The same scaling action (adding/removing a VM with precisely the same size) took different time to be enacted on the cloud platform (here is Microsoft Azure) at different points and this difference were significant (up to couple of minutes).The enactment latency would be also different on different cloud platforms.
14
![Page 15: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/15.jpg)
Offline benchmarking
Trial-and-error
Expert knowledge
Costly and
not systematicA. Gandhi, P. Dube, A. Karve, A. Kochut, L. Zhang, Adaptive, “Model-driven Autoscaling for Cloud Applications”, ICAC’14
arrival rate (req/s)
95
% R
esp
. tim
e (m
s)
400 ms
60 req/s 15
![Page 16: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/16.jpg)
RobusT2Scale Initial setting + elasticity rules + response-time SLA
environment monitoring
application monitoring
scaling actions
Fuzzy ReasoningUsers
Prediction/Smoothing
16
![Page 17: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/17.jpg)
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Region of
definite
satisfaction
Region of
definite
dissatisfaction Region of
uncertain
satisfaction
Performance Index
Pos
sibi
lity
Performance IndexPos
sibi
lity
words can mean different things to different people
Different users often recommend different elasticity policies
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Type-2 MF
Type-1 MF
17
![Page 18: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/18.jpg)
18
![Page 19: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/19.jpg)
Workload
Response time
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x2
uM
embe
rship
gra
de
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x2
uM
embe
rship
gra
de
=>
=>
mean
sd
19
![Page 20: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/20.jpg)
Rule (𝒍)
Antecedents Consequent
𝒄𝒂𝒗𝒈𝒍
Workload Response-
time Normal
(-2) Effort
(-1)
Medium Effort
(0)
High Effort (+1)
Maximum Effort (+2)
1 Very low Instantaneous 7 2 1 0 0 -1.6 2 Very low Fast 5 4 1 0 0 -1.4 3 Very low Medium 0 2 6 2 0 0 4 Very low Slow 0 0 4 6 0 0.6 5 Very low Very slow 0 0 0 6 4 1.4 6 Low Instantaneous 5 3 2 0 0 -1.3 7 Low Fast 2 7 1 0 0 -1.1 8 Low Medium 0 1 5 3 1 0.4 9 Low Slow 0 0 1 8 1 1
10 Low Very slow 0 0 0 4 6 1.6 11 Medium Instantaneous 6 4 0 0 0 -1.6 12 Medium Fast 2 5 3 0 0 -0.9 13 Medium Medium 0 0 5 4 1 0.6 14 Medium Slow 0 0 1 7 2 1.1 15 Medium Very slow 0 0 1 3 6 1.5 16 High Instantaneous 8 2 0 0 0 -1.8 17 High Fast 4 6 0 0 0 -1.4 18 High Medium 0 1 5 3 1 0.4 19 High Slow 0 0 1 7 2 1.1 20 High Very slow 0 0 0 6 4 1.4 21 Very high Instantaneous 9 1 0 0 0 -1.9 22 Very high Fast 3 6 1 0 0 -1.2 23 Very high Medium 0 1 4 4 1 0.5 24 Very high Slow 0 0 1 8 1 1 25 Very high Very slow 0 0 0 4 6 1.6
Rule
(𝐥)
Antecedents Consequent
𝒄𝒂𝒗𝒈𝒍Work
load
Response
-time-2 -1 0 +1 +2
12 Medium Fast 2 5 3 0 0 -0.9
10 experts’ responses
𝑅𝑙: IF (the workload (𝑥1) is 𝐹𝑖1, AND the response-time (𝑥2) is 𝐺𝑖2), THEN (add/remove 𝑐𝑎𝑣𝑔
𝑙 instances).
𝑐𝑎𝑣𝑔𝑙 =
𝑢=1𝑁𝑙 𝑤𝑢
𝑙 × 𝐶
𝑢=1𝑁𝑙 𝑤𝑢
𝑙
Goal: pre-computations of costly calculations to make a runtime efficient elasticity reasoning based on fuzzy inference 20
![Page 21: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/21.jpg)
Liang, Q., Mendel, J. M. (2000). Interval type-2 fuzzy logic systems: theory and design. Fuzzy Systems, IEEE Transactions on, 8(5), 535-550.
Scaling Actions
Monitoring Data
21
![Page 22: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/22.jpg)
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.5954
0.3797
𝑀
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.2212
0.0000
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x2
u
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x2
uMonitoring data
Workload
Response time22
![Page 23: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/23.jpg)
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.5954
0.3797
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.95680.9377
23
![Page 24: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/24.jpg)
24
![Page 25: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/25.jpg)
𝑦𝑙 , 𝑦𝑟
25
![Page 26: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/26.jpg)
26
![Page 27: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/27.jpg)
0 50 1000
500
1000
1500
0 50 100100
200
300
400
500
0 50 1000
1000
2000
0 50 1000
200
400
600
0 50 1000
500
1000
0 50 1000
500
1000
27
![Page 28: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/28.jpg)
28
![Page 29: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/29.jpg)
0 10 20 30 40 50 60 70 80 90 100-500
0
500
1000
1500
2000
Time (seconds)
Num
ber
of
hits
Original data
betta=0.10, gamma=0.94, rmse=308.1565, rrse=0.79703
betta=0.27, gamma=0.94, rmse=209.7852, rrse=0.54504
betta=0.80, gamma=0.94, rmse=272.6285, rrse=0.70858
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Big spike Dual phase Large variations Quickly varying Slowly varying Steep tri phase
0 50 1000
500
1000
1500
0 50 100100
200
300
400
500
0 50 1000
1000
2000
0 50 1000
200
400
600
0 50 1000
500
1000
0 50 1000
500
1000
Roo
t Rel
ativ
e Squ
are
d E
rror
29
![Page 30: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/30.jpg)
SUT Criteria Big spike Dual phaseLarge
variations
Quickly
varying
Slowly
varying
Steep tri
phase
RobusT2Scale𝑟𝑡95% 973ms 537ms 509ms 451ms 423ms 498ms
𝑣𝑚 3.2 3.8 5.1 5.3 3.7 3.9
Overprovisioning𝑟𝑡95% 354ms 411ms 395ms 446ms 371ms 491ms
𝑣𝑚 6 6 6 6 6 6
Under
provisioning
𝑟𝑡95% 1465ms 1832ms 1789ms 1594ms 1898ms 2194ms
𝑣𝑚 2 2 2 2 2 2
SLA: 𝒓𝒕𝟗𝟓 ≤ 𝟔𝟎𝟎𝒎𝒔For every 10s control interval
•RobusT2Scale is superior to under-provisioning in terms of guaranteeing the SLA and does not require excessive resources•RobusT2Scale is superior to over-provisioning in terms of guaranteeing required resources while guaranteeing the SLA 30
![Page 31: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/31.jpg)
0
0.02
0.04
0.06
0.08
0.1
alpha=0.1 alpha=0.5 alpha=0.9 alpha=1.0
Roo
t M
ean S
quare
Err
or
Noise level: 10% 31
![Page 32: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/32.jpg)
Application #2: Self-Adaptive
Software Connectors
![Page 33: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/33.jpg)
⊭ 𝑅
Environment=D
Environment=D’
Environment=D’
⊨ 𝑅
⊨ 𝑅
Adapted to satisfy requirements while it is running
Reliable Runtime Efficient
33
![Page 34: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/34.jpg)
00.5
11.5
22.5
33.5
44.5
5
00.5
11.5
22.5
33.5
44.5
5
1.5
2
2.5
3
3.5
4
input2input1
outp
ut1
34
![Page 35: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/35.jpg)
35
![Page 36: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/36.jpg)
0
1
2
3
4
5
x 10-3
1 2 3 4 5 6 7 8
0
0.05
0.1
0.15
0.2
0.25
1 2 3 4 5
36
![Page 37: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/37.jpg)
0.05
0.1
0.15
0.2
0.25
0.3
0.35
Type-1 FLS Type-2 FLS
RM
SE
• The rule reduction reduced the rules quite considerably.
• IT2 FLCs are more robust due to less mean error and less variation in the estimation error.
• T1 FLCs in some realization drop more rules in comparison with the IT2 FLCs.
• IT2 FLC original designs can be designed with less rules.
37
![Page 38: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/38.jpg)
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
1% 2% 3% 4% 5% 6% 7% 8% 9% 10%
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1% 2% 3% 4% 5% 6% 7% 8% 9% 10%
0
0.2
0.4
0.6
0.8
1
1% 2% 3% 4% 5% 6% 7% 8% 9% 10%
Noise Amplitude (α=0.5)
RM
SE
α=0.95α=0.7
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1% 2% 3% 4% 5% 6% 7% 8% 9% 10%
T1 FLCIT2 FLC
38
![Page 39: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/39.jpg)
Future Directions
![Page 40: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/40.jpg)
Current Solution(my PhD Thesis+ IC4 work on auto-scaling)
Future PlanUpdating Kin MAPE-K@ RuntimeDesign-time
Assistance
Multi-cloud
![Page 41: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/41.jpg)
41
![Page 42: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/42.jpg)
42
![Page 43: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/43.jpg)
Challenge 1: ~75% wasted capacityActual
demand
Challenge 2:
customer lost
⊭ 𝑅
Environment=D
Environment=D’
Environment=D’
⊨ 𝑅
⊨ 𝑅
Adapted to satisfy
requirements
while it is running
Reliable
Run-time Efficient
Current Solution(my PhD Thesis+ IC4 work on auto-scaling)
Future PlanUpdating Kin MAPE-K@ RuntimeDesign-time
Assistance
Multi-cloud
RobusT2Scale Initial setting + elasticity rules + response-time SLA
environment monitoring
application monitoring
scaling actions
Fuzzy ReasoningUsers
Prediction/Smoothing
43
![Page 44: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/44.jpg)
http://computing.dcu.ie/~pjamshidi/PDF/SEAMS2014.pdf
More Details?
=> http://www.slideshare.net/pooyanjamshidi/
Slides?
=>
44
Thank you!
=>
Aakash Ahmad Claus Pahl Soodeh Farokhi
![Page 45: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/45.jpg)
![Page 46: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/46.jpg)
Requirement: R
0 50 1000
500
1000
1500
0 50 100100
200
300
400
500
0 50 1000
1000
2000
0 50 1000
200
400
600
0 50 1000
500
1000
0 50 1000
500
1000
Environment: D
Model: S
MonitoringImplementation
Execution
Runtime
Design-time
Reasoning
Self-adaptation
Specification
S,D⊨R
S,D⊭R
46
![Page 47: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/47.jpg)
Looking for references?http://computing.dcu.ie/~pjamshidi/PDF/SEAMS2014.pdf
47
![Page 48: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/48.jpg)
48
![Page 49: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/49.jpg)
49
![Page 50: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/50.jpg)
50
![Page 51: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/51.jpg)
𝑦𝑟 − 𝑦𝑙
51
![Page 52: Fuzzy Control meets Software Engineering](https://reader030.fdocuments.net/reader030/viewer/2022020218/5590202a1a28ab5e318b463c/html5/thumbnails/52.jpg)
52