db2 update dbm cfg using Instance_Memory 001000000
db2 update db cfg using Database_Memory automatic
This will limit your RAM consumption to 1,000,000 pages (4G).
If the database starts normally, you can set Instance_Memory to automatic as well. You must stop/start the instance
To reset your bufferpools, you can
After start/stop all the bufferpools come up with 4096 pages. STMM will pick them up and bring them to the ideal values in a day or 2.