Multi-install performance

We like a have a separate install for our UAT environment and are also thinking of upgrading our (Amazon virtual) server

What have you found to be generally the key aspects that gives n8n performance and what can isn’t worth the money?

For example, given it queue based nature, is it better to spend the money on RAM rather cores?