ClickHouse/tests/instructions/jemalloc_memory_profile.txt

24 lines
537 B
Plaintext
Raw Normal View History

2018-11-28 16:51:43 +00:00
# Generate "jeprof" tool.
cd contrib/jemalloc
./autogen.sh
# The tool is in /bin directory. Copy it somewhere or add it to PATH.
cp bin/jeprof ...
# Build ClickHouse in debug mode.
# Set environment variable to enable profiling.
export MALLOC_CONF="prof:true,prof_accum:true,lg_prof_interval:28"
# Run clickhouse-server.
# ClickHouse will generate profile dumps with names like jeprof*
# Use jeprof tool to analyze them:
./jeprof ./clickhouse-server jeprof.4017.0.f.heap
# It will spend a few minutes before displaying prompt.