I have a problem with some performance_schema tables (*_by_host_* and *_by_account_*) taking up too much RAM. It is caused by clients connecting from a /19 subnet (8190 unique addresses). The connections aren't long-lasting: clients connect, perform a task and quit. Which settings can I tweak to limit the memory usage and what are the downsides of each limit?
The DB is on AWS RDS and I would like to keep Performance Insights with as much data as possible.