Assuming that the Retain Server, Retain Worker, and Indexing engine are on one server, and the Database is on its own server.
500-5,000 active mailboxes:
12-16 GB RAM
5,000-30,000 active mailboxes:
16-32 GB RAM