My Postgresql databases are running on Google compute instances N1 with custom(26 vCPUs, 52 GB memmory) with a pessistent ssd disk 1.2TB . This setup is way underused, but keep the Read IOPS under 3k. So we reduce the setup to custom(20 vCPUs, 40 GB memmory). What couses the IOPS grows up over 7K?

The database workload still the same in both setups.

  • Because you have more active data than fit in 40gb so you constantly refresh data? otherwise - how the heck should we know, given you do not bother to provide ANY - and i really mean any - information, as required per site rules. Ergo: off topic. – TomTom Sep 23 '20 at 14:00
  • Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers. – TomTom Sep 23 '20 at 14:01

Reduced memory reduced your cache hits. Assuming you did not change the database's memory configuration, previously it was OS file system buffers which serviced those reads.

Relation of system memory size to storage IOPS is not linear. Caches are among the first to be reclaimed on any memory pressure. In other words, this 12 GB difference is likely entirely reduced cache.

Workload type also matters for how often data gets re-referenced, and thus what the IO patterns are. If users look at a record for 5 minutes on average, there is a big difference to IOPS when there is enough memory for 6 minutes of cache versus 4.

Not the answer you're looking for? Browse other questions tagged or ask your own question.