Skip to content

Commit

Permalink
memory-monitor: Remove redundant allocations dump in handler.
Browse files Browse the repository at this point in the history
Exclude the memory allocation sites dump for zedbox as it is a heavy
operation and the required memory usage information is already collected
through pprof. The pprof data is more frequently used, making the
allocation dump redundant.

Signed-off-by: Nikolay Martyanov <[email protected]>
  • Loading branch information
OhmSpectator committed Jan 17, 2025
1 parent ca3ca65 commit f3ec0e3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion pkg/memory-monitor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ local-clean-results-on-eve:
ssh local_eve rm -rf /persist/memory-monitor/output/*

local-analyze-results:
cat $(RESULTS_DIR)/*/allocations_pillar.out | cut -d";" -f3- | jq -r .msg | grep 'alloc' | awk '{bytes += $$2;} END {print "Total bytes allocated:", bytes, "bytes."}'
go tool pprof -http=:8080 $(RESULTS_DIR)/zedbox $(RESULTS_DIR)/*/heap_pillar.out


Expand Down
2 changes: 0 additions & 2 deletions pkg/memory-monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ The output directory contains:
* `event_info.txt`: A text file that contains metadata about the event. It
includes the type of the event and the EVE version that was running when the
event was triggered.
* `allocations_pillar.out`: A list of memory allocation sites of the zedbox
process.
* `heap_pillar.out`: A heap dump of the zedbox process. It's collected using
the built-in go tool. It's a binary file that can be analyzed using the
`pprof` tool. How to analyze the heap dump is described in the next section.
Expand Down
5 changes: 0 additions & 5 deletions pkg/memory-monitor/src/monitor/memory-monitor-handler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,6 @@ show_pid_mem_usage "eve/services/pillar" "$sorted_pillar_processes" "$current_ou

show_pid_mem_usage "eve" "$sorted_eve_processes" "$current_output_dir/memstat_eve.out" 1

# ==== Dump memory allocation sites for Pillar ====

eve dump-memory
logread | grep logMemAllocationSites > "$current_output_dir/allocations_pillar.out" || :

eve http-debug stop

# ==== Create a symlink to the current zedbox ====
Expand Down

0 comments on commit f3ec0e3

Please sign in to comment.