tweak memory settings, fix bash pipeline race condition