- lsof -nPp <pid>
- tcpdump
- write the data to a file, load it up in wireshark
- strace, trace systems calls and signals (jump into kernelspace)
- SIGVTALRM, ruby 1.8 every 10msec to switch threads (green threads)
- posix-spawn instead of fork-exec, check out posix-spawn gem
- ltrace
– ltrace -c ruby foo.rb # summary mode
- memcpy’ing a ton of data on the thread stack
- rbtrace
- rbtrace -p 20052 –slow=50 -m ‘include?(__source__)’
- Google perftools
– – sampling profiler
- perftool.rb (ruby wrapper around google perftools)
– Rack::PerftoolsProfiler (set number of workers down to 1 if using unicorn or passenger)
- gdb.rb !
– where, – ruby eval – ruby objects strings – ruby threads
- memprof
- Memprof.track - takes a block (like bleak_house)
- hotspots (new gem)