You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -92,7 +92,7 @@ mysql> SELECT * FROM malloc_stats ORDER BY TYPE DESC LIMIT 3;
92
92
93
93
The profiling samples the `malloc()` calls and stores the sampled stack traces in a separate location in memory. These samples can be dumped into the filesystem. A dump returns a detailed view of the state of the memory.
94
94
95
-
The process is global; therefore, only a single concurrent run is available and only the most recent runs are stored on disk.
95
+
The process is global; therefore, only a single concurrent run is available. Each dump creates a new file with a unique timestamp, and previous dumps are retained unless manually deleted.
96
96
97
97
Use the following command to create a profile dump file:
98
98
@@ -102,17 +102,35 @@ flush memory profile;
102
102
103
103
The generated memory profile dumps are written to the /tmp directory.
104
104
105
-
You can analyze the dump files with `jeprof` program, which must be installed on the host system in the appropriate path. This program is a perl script that post-processes the dump files in their raw format. The program has no connection to the `jemalloc` library and the version numbers are not required to match.
105
+
You can analyze the dump files with `jeprof` program, which must be installed on the host system and available in the system PATH. This program is a C program that post-processes the dump files in their raw format. While jeprof can work with dumps from different jemalloc versions, compatibility issues may occur with significantly different versions.
You can also access the memory profile to plot a graph of the memory use. This ability requires that `jeprof` and `dot` are in the /tmp path. For the graph to display useful information, the binary file must contain symbol information.
You can also access the memory profile to plot a graph of the memory use. This ability requires that `jeprof` and `dot` are available in the system PATH. For the graph to display useful information, the binary file must contain debug symbol information.
126
+
127
+
!!! warning "Important considerations"
128
+
129
+
* Ensure the MySQL process has write permissions to `/tmp`
130
+
131
+
* Profile dumps can be large; monitor available disk space
132
+
133
+
* Profiling has performance overhead and should be used judiciously
0 commit comments