Commit 244ab1b
authored
Provide configurable memory limit for Conn tracker buffer usage (#2196)
Summary: Provide configurable memory limit for Conn tracker buffer usage
Some memory conscious users want to prevent PEM's from having unbounded
memory use. The socket tracer's conn tracker component allows unbounded
memory growth due to storing an uncapped amount of socket data. From
profiling the [PEM's heap
use](https://github.com/pixie-io/pixie/blob/301198f2af6739f0de8b01e1cbcb3451b3075e28/scripts/collect_heap_pprofs.sh),
this memory growth is a significant contributor to the PEM's memory
footprint.
By leveraging the existing [table store
limit](https://github.com/pixie-io/pixie/blob/301198f2af6739f0de8b01e1cbcb3451b3075e28/src/table_store/table/table.cc#L44)
and this new configuration option, these memory conscious users run
Pixie with a smaller and more predictable steady state memory usage.
Relevant Issues: N/A
Type of change: /kind feature
Test Plan: Ran perf_tool and k9s based load tests to verify the
following:
- [x] Verified results by running PEM's with a 0.5-1 GiB memory limit
- [x] Verified Conn tracker buffers no longer showed up as significant
memory contributors in heap profiles.
Changelog Message: PEM's can now limit the total memory used by Pixie's
socket tracer buffers through the `--total_conn_tracker_mem_usage`
command line flag or the `PX_TOTAL_CONN_TRACKER_MEM_USAGE` env var. This
allows memory conscious users to have more predictable memory use when
paired with `PL_TABLE_STORE_TABLE_SIZE_LIMIT`.
Signed-off-by: Dom Del Nano <[email protected]>1 parent 8f18541 commit 244ab1b
File tree
2 files changed
+52
-5
lines changed- src/stirling/source_connectors/socket_tracer
2 files changed
+52
-5
lines changedLines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
834 | 839 | | |
835 | 840 | | |
836 | 841 | | |
| 842 | + | |
837 | 843 | | |
838 | 844 | | |
839 | 845 | | |
| |||
857 | 863 | | |
858 | 864 | | |
859 | 865 | | |
860 | | - | |
| 866 | + | |
| 867 | + | |
861 | 868 | | |
862 | 869 | | |
863 | 870 | | |
| |||
868 | 875 | | |
869 | 876 | | |
870 | 877 | | |
| 878 | + | |
871 | 879 | | |
872 | 880 | | |
873 | 881 | | |
| |||
1094 | 1102 | | |
1095 | 1103 | | |
1096 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1097 | 1118 | | |
1098 | 1119 | | |
1099 | 1120 | | |
| |||
1113 | 1134 | | |
1114 | 1135 | | |
1115 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1116 | 1147 | | |
1117 | 1148 | | |
1118 | 1149 | | |
1119 | 1150 | | |
1120 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1121 | 1163 | | |
1122 | 1164 | | |
1123 | 1165 | | |
| |||
1791 | 1833 | | |
1792 | 1834 | | |
1793 | 1835 | | |
1794 | | - | |
1795 | | - | |
| 1836 | + | |
| 1837 | + | |
1796 | 1838 | | |
1797 | 1839 | | |
1798 | 1840 | | |
| |||
1821 | 1863 | | |
1822 | 1864 | | |
1823 | 1865 | | |
| 1866 | + | |
1824 | 1867 | | |
1825 | 1868 | | |
1826 | 1869 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| |||
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| 319 | + | |
| 320 | + | |
317 | 321 | | |
318 | 322 | | |
319 | 323 | | |
| |||
0 commit comments