mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Add notes for 2020-02-07
This commit is contained in:
@ -303,4 +303,40 @@ $ ./run.sh -s http://localhost:8983/solr/statistics -a import -o ~/Downloads/sta
|
||||
|
||||
- OK that imported! I wonder if it works... maybe I'll try another day
|
||||
|
||||
## 2020-02-07
|
||||
|
||||
- I did some investigation into DSpace indexing performance using flame graphs
|
||||
- Excellent introduction: http://www.brendangregg.com/flamegraphs.html
|
||||
- Using flame graphs with java: https://netflixtechblog.com/java-in-flames-e763b3d32166
|
||||
- Fantastic wrapper scripts for doing perf on Java processes: https://github.com/jvm-profiling-tools/perf-map-agent
|
||||
|
||||
```
|
||||
$ cd ~/src/git/perf-map-agent
|
||||
$ cmake .
|
||||
$ make
|
||||
$ ./bin/create-links-in ~/.local/bin
|
||||
$ export FLAMEGRAPH_DIR=/home/aorth/src/git/FlameGraph
|
||||
$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
|
||||
$ export JAVA_OPTS="-XX:+PreserveFramePointer"
|
||||
$ ~/dspace63/bin/dspace index-discovery -b &
|
||||
# pid of tomcat java process
|
||||
$ perf-java-flames 4478
|
||||
# pid of java indexing process
|
||||
$ perf-java-flames 11359
|
||||
```
|
||||
|
||||
- All Java processes need to have `-XX:+PreserveFramePointer` if you want to trace their methods
|
||||
- I did the same tests against DSpace 5.8 and 6.4-SNAPSHOT's CLI indexing process and Tomcat process
|
||||
- For what it's worth, it appears all the Hibernate stuff is in the CLI processes, so we don't need to trace the Tomcat process
|
||||
- Here is the flame graph for DSpace 5.8's `dspace index-discovery -b` java process:
|
||||
|
||||

|
||||
|
||||
- Here is the flame graph for DSpace 6.4-SNAPSHOT's `dspace index-discovery -b` java process:
|
||||
|
||||

|
||||
|
||||
- If the width of the stacks indicates time, then it's clear that Hibernate takes longer...
|
||||
- Apparently there is a "flame diff" tool, I wonder if we can use that to compare!
|
||||
|
||||
<!-- vim: set sw=2 ts=2: -->
|
||||
|
Reference in New Issue
Block a user