340 likes | 473 Views
Fast-Forward Runtime Monitoring — An Industrial Case Study. Christian Colombo Gordon Pace University of Malta. Runtime Verification in Industry. Fear of intrusiveness Code modification Slowdown. Runtime Verification in Industry. Fear of intrusiveness Code modification Slowdown.
E N D
Fast-Forward Runtime Monitoring— An Industrial Case Study Christian Colombo Gordon Pace University of Malta
Runtime Verification in Industry • Fear of intrusiveness • Code modification • Slowdown
Runtime Verification in Industry • Fear of intrusiveness • Code modification • Slowdown
Problem • It may take too long for the monitor to come/remain up to scratch with the system • During initialisation • During heavy load on system • If monitoring resources are low when compared to system resources
Approach • Pausing the system might not always be desirable
Approach • Fast-forwarding the monitor might be a better option
Approach System Monitor System Monitor
Approach System Monitor System Monitor Monitor
Approach System Monitor System Monitor
Fast-Forwarding • Ideal • Failure in normal Failure in fast-forward • Over approximation (high risk) • Failure in normal Failure in fast-forward • Under approximation (low risk) • Failure in normal Failure in fast-forward
Specification a b a b b c a
Normal Monitor Fast-forward Monitor Monitor Configurations Monitor Configurations Normal Trace Abstracted Trace a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p
Normal Monitor Fast-forward Monitor 2 1 1 3 3 a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p
Normal Monitor Fast-forward Monitor 2 1 1 3 3 a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p 1 3 z b y k w g h g s y n m p
Normal Monitor Fast-forward Monitor 2 1 1 3 3 a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p 2 1 1 3 3 a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p
Comparing Monitor Configurations • To cater for quasi-identical monitor configuration states the notion of equality is defined as: • B(1) = {w,w’,w’’} • 1 =c 2 iff B(1)=B(2) w w w' 1 w' 2 w'' w''
Faithful Fast-Forwarding α(w) w w' α(w') 1 1 w'' α(w'')
Over Approximation α(w) w w' α(w') 1 1 α(w'')
Under Approximation α(w) w w' α(w') 1 1 w''
Case Study Initialisation • System has been running for years • Thousands of users are already active • How many monitors to be instantiated? • What is their monitor state? • What are their variable values?
Example Trace U1: Dormant U2: Load U2: Purchase U1: Thaw U1: Load U1: Purchase U3: Transfer U3: Load U1: Transfer U4: Dormant U5: Dormant U1: Purchase U6: Transfer U5: Thaw U6: Load
Example – Monitors Trace Monitors U1: Dormant U2: Load U2: Purchase U1: Thaw U1: Load U1: Purchase U3: Transfer U3: Load U1: Transfer U4: Dormant U5: Dormant U1: Purchase U6: Transfer U5: Thaw U6: Load U1 U2 U3 U4 U5 U6
Example – Monitor States Trace Monitors Monitor States U1: Dormant U2: Load U2: Purchase U1: Thaw U1: Load U1: Purchase U3: Transfer U3: Load U1: Transfer U4: Dormant U5: Dormant U1: Purchase U6: Transfer U5: Thaw U6: Load U1 U2 U3 U4 U5 U6 U1: NonDorm U2: NonDorm U3: NonDorm U4: Dorm U5: Thawed U6: NonDorm
Example – Timers Trace Monitors Monitor States Dormancy Timer Reset 4: U1: Dormant 9: U2: Load 14: U2: Purchase 17: U1: Thaw 28: U1: Load 34: U1: Purchase 45: U3: Transfer 49: U3: Load 67: U1: Transfer 71: U4: Dormant 73: U5: Dormant 82: U1: Purchase 90: U6: Transfer 94: U5: Thaw 107: U6: Load U1 U2 U3 U4 U5 U6 U1: NonDorm U2: NonDorm U3: NonDorm U4: Dorm U5: Thawed U6: NonDorm U1: 82 U2: 14 U3: 49 U4: n/a U5: n/a U6: 107 Thaw Timer Reset U1: n/a U2: n/a U3: n/a U4: n/a U5: 94 U6: n/a
Theory Instantiation System Monitor System SQL Monitor SQL Monitor
Results • Normal monitoring • 15 hours / week’s data • Fast-forwarded monitoring • 0.6 hours/ week’s data • Fast-forward : Normal 1 : 25
Applications of Results • Fast monitor bootstrapping • Burst monitoring • Synchronous/asynchronous monitoring
Conclusion • Fine-tune system-monitor relationship • An affective way of initialising monitors quickly • Applied to an industrial case study with promising results • No automated way • Not easy to write fast monitors