As a second data point: I tried
table.groupBy(function (x) { ... }).count()
where the function maps the documents into one out of 32 groups (so that's less than your 94, but shouldn't make a giant difference... I just had this database around). Did that on both 1 million and a 25 million document table, and memory usage looked fine and very stable.
This was on RethinkDB 2.0, and I might retry that on 1.16 later to see if I can reproduce it there.Do you remember if you had set an explicit cache size back when you were testing RethinkDB?