> On Jan 16, 2024, at 4:19 PM, David G. Johnston <david.g.johnston@xxxxxxxxx> wrote: > > On Tuesday, January 16, 2024, Atul Kumar <akumar14871@xxxxxxxxx> wrote: > Hi, > > I am new to RDS postgres, I have version 14 running on it with m7g.large > > I found that lots of parameters has DBInstanceClassMemory written, so what exactly is the value of this variable ? > > How should I calculate it? > > IIRC it’s the amount of RAM on your instance. You look it up in a table usually. Or check the web console. Yes, I’m pretty sure that it’s the amount of RAM *in bytes*. Although I like the flexibility of having that expressed in a variable, it wan’t always as easy to use as I wanted it to be. Specifically, I found that differences in units made it a little difficult to figure out how AWS was configuring things. For example, on an old instance we had, shared_buffers was defined as {DBInstanceClassMemory/10922}. It took me a while to figure out that that translates to “calculate 75% of available memory, and express that value in 8Kb blocks”. How? Well, 10922 = 8 * 1024 * 1.33333. shared_buffers is expressed in 8Kb blocks, so converting from units of bytes (DBInstanceClassMemory) to 8kB blocks (shared_buffers) requires dividing by 8 * 1024. And dividing by 1.3333 is the same as multiplying by 3/4, which is 75%. This may have been explained in AWS documentation but I couldn’t find it at the time and it took some work on my part to figure out the logic behind 10922 and some other config magic numbers. Maybe this will save you some time. Cheers Philip