ClickHouse/tests/instructions/jemalloc_memory_profile.txt
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

24 lines
537 B
Plaintext

# 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.