request tracking in drops
play

Request Tracking in DROPS (Diplomverteidigung) Bj orn D obel - PowerPoint PPT Presentation

Introduction Instrumentation Applications Evaluation Conclusion and Outlook Request Tracking in DROPS (Diplomverteidigung) Bj orn D obel <doebel@os.inf.tu-dresden.de> 23.06.2006 Bj orn D obel Request tracking in DROPS


  1. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Request Tracking in DROPS (Diplomverteidigung) Bj¨ orn D¨ obel <doebel@os.inf.tu-dresden.de> 23.06.2006 Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 1 / 27

  2. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Contents Introduction 1 Instrumentation 2 Applications 3 Evaluation 4 Conclusion and Outlook 5 Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 2 / 27

  3. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Motivation Motivation Donald Knuth: ”Premature optimization is the root of all evil (or at least most of it) in programming.” Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 3 / 27

  4. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Motivation Motivation (2) Performance optimizations mostly inside the kernel Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 4 / 27

  5. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Motivation Motivation (2) Performance optimizations mostly inside the kernel What about the components on top of Fiasco? Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 4 / 27

  6. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Motivation Motivation (2) Performance optimizations mostly inside the kernel What about the components on top of Fiasco? Enable evaluation and verification of (inter-)component behavior (inter-)component resource usage (inter-)component performance Use offline monitoring for evaluation Use online monitoring for verification Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 4 / 27

  7. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Definitions Definitions Event An event contains data representing an action that happens at a certain point in time. Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 5 / 27

  8. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Definitions Definitions Event An event contains data representing an action that happens at a certain point in time. Sensor A sensor is a means to produce events, mostly some piece of software. Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 5 / 27

  9. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Definitions Definitions Event An event contains data representing an action that happens at a certain point in time. Sensor A sensor is a means to produce events, mostly some piece of software. Request A request is a structured set of events. Requests are interesting with respect to resource usage. Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 5 / 27

  10. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Instrumentation points Where to instrument? Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 6 / 27

  11. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Existing facilities What do we have? Fiasco tracebuffer needed for kernel events inflexible Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 7 / 27

  12. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Existing facilities What do we have? Fiasco tracebuffer needed for kernel events inflexible Ferret monitoring framework sensor directory predefined sensors scalars histograms lists Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 7 / 27

  13. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Instrumentation rules Instrumentation rules 1 Deterministic event layout Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 8 / 27

  14. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Instrumentation rules Instrumentation rules 1 Deterministic event layout 2 Use large events if possible less calls to monitoring framework Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 8 / 27

  15. Introduction Instrumentation Applications Evaluation Conclusion and Outlook Instrumentation rules Instrumentation rules 1 Deterministic event layout 2 Use large events if possible less calls to monitoring framework 3 Keep out monitoring overhead need to extract overhead from measurements might be necessary to obtain more data Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 8 / 27

  16. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing IPC tracing Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 9 / 27

  17. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing IPC tracing Automated instrumentation of IPC using a Dice tracing plugin: dice trace covers most L4 applications Sensor support library Global list sensor for Dice events initialized during application startup Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 10 / 27

  18. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing IPC tracing (2) Client-side: one event for each call Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 11 / 27

  19. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing IPC tracing (2) Client-side: one event for each call Server-side: one event for each client-side call tricky: allow reply only store pending events at server efficient lookup Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 11 / 27

  20. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing IPC tracing (2) Client-side: one event for each call Server-side: one event for each client-side call tricky: allow reply only store pending events at server efficient lookup alternative: split server-side event into multiple ones multiple times of monitoring overhead Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 11 / 27

  21. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing IPC tracing: event layout Timestamp Event head Major number Minor number Instance number CPU ID Producer ID Producer ID Additional data Start timestamp Start timestamp Stop timestamp Stop timestamp Send size Component start Receive size Dice opcode Component stop - Client-side Server-side Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 12 / 27

  22. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing L4Env tracing L4Env services used by nearly all applications Built-in instrumentation can help with profiling and debugging Global L4Env sensor Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 13 / 27

  23. Introduction Instrumentation Applications Evaluation Conclusion and Outlook IPC tracing L4Env tracing L4Env services used by nearly all applications Built-in instrumentation can help with profiling and debugging Global L4Env sensor Example: semaphores Critical sections: 1 How much contention? How long are critical sections? Consumer–producer scenarios: 2 How long are consumers/producers waiting for a semaphore? Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 13 / 27

  24. Introduction Instrumentation Applications Evaluation Conclusion and Outlook L4Linux tracing Tracing L4Linux Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 14 / 27

  25. Introduction Instrumentation Applications Evaluation Conclusion and Outlook L4Linux tracing Tracing the L4Linux kernel Several approaches to Linux kernel tracing: printk() manual instrumentation flexible Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 15 / 27

  26. Introduction Instrumentation Applications Evaluation Conclusion and Outlook L4Linux tracing Tracing the L4Linux kernel Several approaches to Linux kernel tracing: printk() manual instrumentation flexible LTT / LTTng fixed amount of predefined events visualization backend Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 15 / 27

  27. Introduction Instrumentation Applications Evaluation Conclusion and Outlook L4Linux tracing Tracing the L4Linux kernel Several approaches to Linux kernel tracing: printk() manual instrumentation flexible LTT / LTTng fixed amount of predefined events visualization backend kProbes instrument arbitrary locations inside the kernel by patching instructions with int3 flexible Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 15 / 27

  28. Introduction Instrumentation Applications Evaluation Conclusion and Outlook L4Linux tracing Tracing the L4Linux kernel (2) Adam Lackorzynski ported kProbes to L4Linux: cannot use int3 as break instruction use hlt instead Ferret sensor inside the L4Linux kernel kProbes overhead higher than in native Linux, but constant Differential analysis: run the same kProbe in L4Linux and Linux FerretLX kernel module for Linux Bj¨ orn D¨ obel Request tracking in DROPS 23.06.2006 16 / 27

Recommend


More recommend