Let's see how much memory threads stacks actually use.
# do this first
sudo HOME="$HOME" PATH="$PATH" bash
# then inside the new shell
echo max > /sys/fs/cgroup/init.scope/pids.max
sysctl -w vm.max_map_count=3000000sudo cat /proc/$(pgrep threads-mem)/smaps_rollup
ps -o pid,vsz,rss,comm -p $(pgrep threads-mem)