Project

General

Profile

Add SystemtapDtrace static markers » History » Version 2

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 2 Jessica Mack
25
h3. Current Status
26 1 Jessica Mack
 
27 2 Jessica Mack
h3. Detailed Description
28 1 Jessica Mack
 
29
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.
30
 
31
Static markers in Ceph can be enabled with build progress, like:
32
./configure --enable-systemtap
33
 
34
At first, We would like to add markers in critical I/O path similliar to perf counter.  
35
36
h3. Work items
37
38
Identify our Use Case
39
Following tasks can be performed in the Linux by System Tap-
40
1. Track Scheduling Time -
41
       a) Peek into kernel scheduler
42
       b) Visualize current activity
43
       c) Evaluate System Load
44
2. Tweak I/O usage -  which process responsible for most I/O
45
3. Kernel Profiling - Record stack traces
46
4. Call graph tracing - Start tracing when a trigger is called, Visualize all functions that are invoked, how long each step takes 
47
48
h4. Coding tasks
49
50
# Add basic workable infrastruction
51
# Add more static markers
52
53
h4. Build / release tasks
54
55
# Task 1
56
# Task 2
57
# Task 3
58
59
h4. Documentation tasks
60
61
# Add usage and build related document
62
63
h4. Pad
64
65
http://pad.ceph.com/p/cdsgiant-syste...static-markers
66
http://pad.ceph.com/p/GH-systemtap-l...static-markers
67
68
h4. Resources
69
70
Systemtap/DTrace:
71
* http://www.ibm.com/developerworks/ai...aceprobes.html
72
* https://sourceware.org/systemtap/wiki/HomePage?action=show&redirect=SystemTap
73
* https://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApp
74
 
75
LTTng:
76
* http://lttng.org/comparison-systemtap-and-dtrace
77
* https://lttng.org/files/doc/man-page...tng-ust.3.html