Tata AIG General Insurance Company - Insurer Innovation Award 2024
Cloud Observation and Performance Analysis using Solaris 11 DTrace
1. DTrace, for Solaris (zones
inside) and Java
Amit Hurvitz, ISV Engineering, Oracle
2. Program Agenda
Introductory Demo
What's Dtrace?
Enabling Dtrace from Inside the Zone
Java Statically Defined Tracing
TCP Client and Server Flow Tracing - Demo
Future Thoughts
4. What's DTrace? - cont.
Zero performance impact when not in use
Completely safe; no way to cause panics, crashes, data corruption or
pathological performance degradation
Powerful data management primitives eliminate need for most postprocessing
5. DTrace – D Language
probe description
/predicate/
{
actions
}
Probes Which events we are interested in monitoring
Predicates (optional) When do we want to monitor the events
Actions (optional) What do we want to do when the above
happens
One liner
# dtrace -n 'probe/predicate/{actions}'
{actions}
6. DTrace – Probes
Programmable sensors (points of instrumentation) made available by
providers placed all over the Solaris system
provider:module:function:name
−
tcp:ip:tcp_send:entry
−
Syscall:::
Providers: syscall,io,pid,profile, hotspot, tcp, udp, ip, iscsi,...
Modules: nfs, zfs, cpc, …
Names: entry,return
Listing Probes
# dtrace -l [-P provider | -m module | -f function name | -n name]
11. Java Statically Defined Tracing (JSDT)
Make points of interest in your application easily monitored
Insert your own DTrace probes in desired locations inside your
methods
– Use them in conjunction with any other probes
#!/usr/sbin/dtrace -s
MyProvider:::start
{
self->start_time = timestamp;
}
syscall:::entry
/self->start_time/
{
@[probefunc] = quantize();
}
15. Next Thoughts
A special ‘Java-DTrace’ utility to do implicit instrumentation
Probes look like native DTrace PID provider:
−
−
JDDT$target:class-name:method-name:entry
JDDT$target:class-name:method-name:return
# jdtrace java-dtrace-script.d -p <process-id>
jdtrace will take care of all required dynamic instrumentation
−
Clean instrumented code on script end
Any suggestions?