datastax / cstar_perf

Apache Cassandra performance testing platform
Apache License 2.0
72 stars 34 forks source link

Initial flamegraph implementation #125

Closed aboudreault closed 8 years ago

aboudreault commented 8 years ago

Here's the PR so we can begin to review.

Setup

  1. Install system dependencies

    sudo apt-get install cmake dtach linux-tools-`uname -r`
  2. Ensure your kernel has performance profling support:

    $ sudo perf record -F 99 -g -p <a_running_process_pid> -- sleep 10
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.098 MB perf.data (~4278 samples) ]
  3. Add NOPASSWD sudo configuration for the cstar user:

    echo "cstar ALL = (root) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/perf
  4. Enable flamegraph feature in your cluster configuration:

    "flamegraph": true,
    "flamegraph_directory": "/mnt/data/cstar_perf/flamegraph"

    The flamegraph working directory default to /tmp/flamegraph if not specified.

  5. Migrate the cstar_perf DB using the following script. (ENSURE you have a backup before)

    # Execute with CQL, DONT FORGET TO SET '[csv] field_size_limit=1000000000' in ~/.cassandra/cqlshrc
    frontend/cstar_perf/frontend/migrations/0002.cql

When enabled, you should see a new flamegraph artifact available in the ViewTest page.

aboudreault commented 8 years ago

flamegraph_view_test

aboudreault commented 8 years ago

flamegraph_view

aboudreault commented 8 years ago

UI Integration is done