square-psychiatrist-19087
03/11/2025, 8:23 AMpants lint, how do I debug where the memory goes?square-psychiatrist-19087
03/11/2025, 8:24 AM- name: PANTS_PANTSD
value: "False"
- name: PANTS_PROCESS_EXECUTION_LOCAL_ENABLE_NAILGUN
value: "False"
- name: PANTS_PROCESS_PER_CHILD_MEMORY_USAGE
value: "512MiB"
- name: PANTS_PROCESS_EXECUTION_LOCAL_PARALLELISM
value: "6"
- name: PANTS_PROCESS_TOTAL_CHILD_MEMORY_USAGE
value: "6GiB"
- name: PANTS_RULE_THREADS_CORE
value: "4"
- name: PANTS_RULE_THREADS_MAX
value: "8"square-psychiatrist-19087
03/11/2025, 8:24 AMresources:
limits:
cpu: "12"
memory: "24Gi"
requests:
cpu: "6"
memory: "18Gi"gorgeous-winter-99296
03/11/2025, 1:47 PM--stats-memory-summary on the pants CLI to get some information about Pants memory usage, but it wouldn't record what's happening in subprocs.
I see you're using process-total-child-memory-usage, which per docs only applies to JVM, so just want to confirm that you're aware of this given that you're also disabling Nailgun.square-psychiatrist-19087
03/11/2025, 1:50 PMPANTS_PROCESS_EXECUTION_LOCAL_ENABLE_NAILGUNsquare-psychiatrist-19087
03/11/2025, 1:51 PMDo you have any idea if it's Pants itself or the processes Pants spawn that explodes?nope, i don't know yet
square-psychiatrist-19087
03/11/2025, 1:51 PMsquare-psychiatrist-19087
03/11/2025, 1:52 PMgorgeous-winter-99296
03/11/2025, 1:59 PMyeah, nailgun is disabled PANTS_PROCESS_EXECUTION_LOCAL_ENABLE_NAILGUNYeah, so you disable nailgun (a JVM tool) but set
PANTS_PROCESS_TOTAL_CHILD_MEMORY_USAGE which is a JVM option. Just raising the point that you're both removing JVM tooling and configuring JVM settings. So if you don't use JVM that memory option has no effect.
I'll try to look at some k8s pod metricsI can't share it but I've used a small psutil script that logs memory usage at 10Hz to stdout. Quite useful for debugging memory leaks when subprocs are involved.
square-psychiatrist-19087
03/11/2025, 2:00 PMSo if you don't use JVM that memory option has no effect.ah, I see, thanks
wide-midnight-78598
03/11/2025, 3:04 PMgorgeous-winter-99296
03/11/2025, 3:05 PMwide-midnight-78598
03/11/2025, 3:05 PMgorgeous-winter-99296
03/11/2025, 3:08 PMwide-midnight-78598
03/11/2025, 3:11 PMgorgeous-winter-99296
03/11/2025, 3:11 PMgorgeous-winter-99296
03/11/2025, 3:12 PMwide-midnight-78598
03/11/2025, 3:13 PM