]> git.ipfire.org Git - thirdparty/snort3.git/commit
Pull request #3664: memory: use the process total instead of per thread totals to...
authorRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 6 Jan 2023 16:43:50 +0000 (16:43 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 6 Jan 2023 16:43:50 +0000 (16:43 +0000)
commit9ac428d8574f4ab8049668783f478ddb453db52f
tree94689ec010817f1e556af829ca019dd8abcd4761
parent5a93139f226fcdf8523970a223e66ed9a1cf6e2e
Pull request #3664: memory: use the process total instead of per thread totals to enforce cap

Merge in SNORT/snort3 from ~RUCOMBS/snort3:process_memory to master

Squashed commit of the following:

commit 3d3da0fd75a73eb43fd4aa6b7e8e252b9c6ea1ee
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Jan 4 08:31:40 2023 -0500

    memory: rename manager to overloads to better indicate purpose

commit e343738e2b178002b7e8f63f60cdbe7c512499db
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Jan 4 06:37:34 2023 -0500

    memory: update developer notes

commit 7f374a318e87662c1d7766ffd237d65eb605f60f
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Dec 28 09:01:20 2022 -0500

    memory: update stats regardless of state; add unit tests

commit 71822045d1ed62da660573d2c82a5566ba42967d
Author: Russ Combs <rucombs@cisco.com>
Date:   Tue Dec 27 09:33:34 2022 -0500

    memory: delete unnecessary includes

commit cc19d105f6b08a7071978de0681fdf840413967e
Author: Russ Combs <rucombs@cisco.com>
Date:   Thu Dec 22 16:02:14 2022 -0500

    memory: refactor jemalloc code and add relevant pegs

commit 7e30c6081c4fb0cac8c55658b50d5abfd14bc977
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Nov 23 13:51:30 2022 -0500

    build: exclude unused memory related sources

commit fc74bce73bd0db2b4fd67872615fd3f0dbf0a916
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Nov 23 12:21:38 2022 -0500

    build: error out if both jemalloc and tcmalloc are configured

commit 0663095ec3344f97cb80a9291bda6ed675edd469
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Nov 23 12:18:18 2022 -0500

    memory: incorporate overloads into profiler

commit 7824486ad5799116da4c825d991fc3d9d8e2738f
Author: Russ Combs <rucombs@cisco.com>
Date:   Thu Nov 10 14:03:23 2022 -0500

    memory: use the process total instead of per thread totals to enforce cap

    Since Snort doesn't always free memory in the thread that allocated it,
    switch to a process cap enforcement strategy when using jemalloc. To get
    updated stats.allocated it is necessary to bump the epoch, which can be
    expensive, so it is done by the main thread once per interval ms. If
    over limit, each packet thread will prune one flow per packet until the
    prune_target is reached.
44 files changed:
cmake/configure_options.cmake
cmake/create_options.cmake
cmake/create_pkg_config.cmake
configure_cmake.sh
src/flow/flow.cc
src/flow/flow_cache.cc
src/flow/flow_data.cc
src/flow/stash_item.h
src/main/analyzer.cc
src/main/snort.cc
src/main/test/distill_verdict_stubs.h
src/memory/CMakeLists.txt
src/memory/dev_notes.txt
src/memory/heap_interface.cc [new file with mode: 0644]
src/memory/heap_interface.h [moved from src/memory/prune_handler.cc with 63% similarity]
src/memory/memory_cap.cc
src/memory/memory_cap.h
src/memory/memory_config.h
src/memory/memory_module.cc
src/memory/memory_module.h
src/memory/memory_overloads.cc [moved from src/memory/memory_manager.cc with 81% similarity]
src/memory/prune_handler.h [deleted file]
src/memory/test/CMakeLists.txt [new file with mode: 0644]
src/memory/test/memory_cap_test.cc [new file with mode: 0644]
src/mime/file_mime_process.cc
src/network_inspectors/appid/appid_http_session.cc
src/network_inspectors/appid/test/appid_http_session_test.cc
src/service_inspectors/dce_rpc/dce_smb1.cc
src/service_inspectors/dce_rpc/dce_smb2.h
src/service_inspectors/dce_rpc/dce_smb_common.cc
src/service_inspectors/dce_rpc/smb_message.cc
src/service_inspectors/sip/sip.cc
src/service_inspectors/sip/sip_parser.cc
src/stream/file/file_session.cc
src/stream/icmp/icmp_session.cc
src/stream/ip/ip_defrag.cc
src/stream/ip/ip_session.cc
src/stream/tcp/tcp_reassembler.cc
src/stream/tcp/tcp_segment_node.cc
src/stream/tcp/tcp_session.cc
src/stream/tcp/tcp_stream_tracker.cc
src/stream/udp/udp_session.cc
src/stream/user/user_session.cc
src/utils/stats.cc