Project

General

Profile

Add SystemtapDtrace static markers » History » Version 1

Jessica Mack, 06/23/2015 01:51 AM

1 1 Jessica Mack
h1. Add SystemtapDtrace static markers
2
3
h3. Summary
4
5
Dtrace and SystemTap are monitoring tools, each providing a way to inspect what the processes on a computer system are doing. They both use domain-specific languages allowing a user to write scripts which:
6
  - filter which processes are to be observed
7
  - gather data from the processes of interest
8
  - generate reports on the data
9
10
Ceph can be built with embedded "markers" that can be observed by a SystemTap script, making it easier to monitor what the Ceph
11
processes on a system are doing.
12
 
13
h3. Owners
14
15
* Haomai Wang (UnitedStack)
16
* Danny Al-Gaaf (Deutsche Telekom AG)
17
* Marc Koderer (Deutsche Telekom AG)
18
* Name
19
20
h3. Interested Parties
21
22
* Guang Yang (Yahoo!)
23
* Saket Sinha (Google Summer of Code 2014)
24
* Current Status
25
 
26
Detailed Description
27
 
28
Now MySQL, PosgreSQL, Glibc, CPython and others all support static markers which benefits much for developers. Alghough Ceph already has intern "perf counter" component which plays  a subset role. see (ceph.com/docs/master/dev/logs/#performance-counters). Compared to Systemtap/Dtrace, It obviously has some limitations, for example, we can't program it when running, lack of flexibility, need to write toolchains to display, visualization or format it from the result of "perf dump". What's more, Systemtap/Dtrace static markers focus on Ceph developers, and "perf counter" is likely designed for system admin.
29
 
30
Static markers in Ceph can be enabled with build progress, like:
31
./configure --enable-systemtap
32
 
33
At first, We would like to add markers in critical I/O path similliar to perf counter.  
34
35
h3. Work items
36
37
Identify our Use Case
38
Following tasks can be performed in the Linux by System Tap-
39
1. Track Scheduling Time -
40
       a) Peek into kernel scheduler
41
       b) Visualize current activity
42
       c) Evaluate System Load
43
2. Tweak I/O usage -  which process responsible for most I/O
44
3. Kernel Profiling - Record stack traces
45
4. Call graph tracing - Start tracing when a trigger is called, Visualize all functions that are invoked, how long each step takes 
46
47
h4. Coding tasks
48
49
# Add basic workable infrastruction
50
# Add more static markers
51
52
h4. Build / release tasks
53
54
# Task 1
55
# Task 2
56
# Task 3
57
58
h4. Documentation tasks
59
60
# Add usage and build related document
61
62
h4. Pad
63
64
http://pad.ceph.com/p/cdsgiant-syste...static-markers
65
http://pad.ceph.com/p/GH-systemtap-l...static-markers
66
67
h4. Resources
68
69
Systemtap/DTrace:
70
* http://www.ibm.com/developerworks/ai...aceprobes.html
71
* https://sourceware.org/systemtap/wiki/HomePage?action=show&redirect=SystemTap
72
* https://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApp
73
 
74
LTTng:
75
* http://lttng.org/comparison-systemtap-and-dtrace
76
* https://lttng.org/files/doc/man-page...tng-ust.3.html