For testing purposes is has become necessary to insert data in Postgres as quickly as possible. We are talking
- Ruby on Rails app
- 8 gigs sized binary psql dump put on RAMdisk
- Running on Ubuntu 18 server based VM with 32 gigs RAM
The goal is to spawn a very short-lived app instance for testing, so data security and persistence is not a concern. #1 priority is to insert dump to postgres and run any data migrations as quick as possible.
The first idea I get is put Postgres data-folder to RAMdisk. In theory, this should make I/O way faster even than using SSD.
Please share if you have any experience with running postgres in-memory.
P.S. I have read this: Optimise PostgreSQL for fast testing ; and still trying to get an edge with this RAMdisk idea.