Giter VIP home page Giter VIP logo

Comments (6)

mchristofides avatar mchristofides commented on June 12, 2024

Saw this and realised I could help.

shared_buffers without units is specified in blocks, typically 8kB – docs

max_wal_size without units is specified in segment files, typically 16MB – docs

from pgmetrics.

mdevan avatar mdevan commented on June 12, 2024

Yes, @mchristofides is correct. pgmetrics is showing the literal value in defined units of the setting, and in paranthesis, the effective value in bytes. In the line:

|                  shared_buffers |  524288 (4.0 GiB) |

it is trying to say that the value is 524288 blocks, which means 4.0 GB since each block is of size 8192 bytes.

from pgmetrics.

romulusFR avatar romulusFR commented on June 12, 2024

Thanks @mchristofides and @mdevan. So I'm OK with shared_buffers as 524288 blocks (4.0 GiB) is consistent with my settings. Maybe a default blocks unit would be worth but pgmetrics is ok, let's say it's and enhancement request.

Now, I understand max_wal_size and pgmetrics seems wrong on the left figure misinterpreting the default unit as 16MB, one should read 2048 (MB) (4 GiB) and not 2048 (16MB) (32 GiB) to be consistent with my settings. In that case it's closer to a bug maybe.

from pgmetrics.

mdevan avatar mdevan commented on June 12, 2024

Hmm, yes, you're right, there is a bug here.

For Postgres 9.4 and below, the setting was called checkpoint_segments (as the number of segments, unitless). For 9.5 and 9.6 the setting is max_wal_size with a unit of 16MB and for 10 and above it is max_wal_size with a unit of 1MB.

pgmetrics reporting code assumes 16MB for 9.5+, it does not use 1MB for 10+. Are you using Postgres 10 or above?

Will fix.

from pgmetrics.

romulusFR avatar romulusFR commented on June 12, 2024

For this specific case, it's PostgreSQL 12 indeed.

from pgmetrics.

mdevan avatar mdevan commented on June 12, 2024

Fixed in 513dcc0. Thanks for reporting.

from pgmetrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.