Your application does indeed need more database memory. You have two types of graphs: Database node operating system memory and Application node operating system memory. The Mendix model is using the Application node memory and the Postgres database is using the Database node memory. The database node memory is mostly used by the indexes and earlier reads (ie the cache). In your case you see that the applications due too little memory is swapping its cache to the harddisk and making your applicaion slow. You also might want to check you Application node memory because you can swap out those memory settings. If you have more than enough application node memory you might reduce that and give it to the database and visa versa.
You also might check your application on why so much data is in the cache? Is everything really needed? Mistakes that are often made in long microflows is clearing lists for instance after there use is no longer needed.
And there are clearly peaks. Are the always on the same time? What is happening then? Are batches used and what does lowering the batch size do? But if everythins is as it should you sometimes just need more memory...
Regards,
Ronald