ROOT_MAX_THREADS is ignorred when starting root

export ROOT_MAX_THREADS=22
root
ROOT::EnableImplicitMT(ROOT::Internal::LogicalCPUBandwidthControl())
ROOT::GetThreadPoolSize()

You could even put the first statement in your rootlogon