pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to calculate how too much memory ram need a PostgreSQL Server?
3+ messages / 3 participants
[nested] [flat]

* How to calculate how too much memory ram need a PostgreSQL Server?
@ 2021-04-05 18:21 DrakoRod <drakoflames@hotmail.com>
  2021-04-05 18:23 ` Re: How to calculate how too much memory ram need a PostgreSQL Server? Gopi Setty <gsp06268@gmail.com>
  2021-04-05 18:27 ` Re: How to calculate how too much memory ram need a PostgreSQL Server? Karl Denninger <karl@denninger.net>
  0 siblings, 2 replies; 3+ messages in thread

From: DrakoRod @ 2021-04-05 18:21 UTC (permalink / raw)
  To: pgsql-admin

 Hi folks!!

I support a PostgreSQL database it grew from 100 to 300 GB in couple months,
I we need tuning all OS parameters (is a virtual enviroment). Currently the
configuration is the follow:

Virtual Machine
Ubuntu 18.04
12 CPUS
8 GB in RAM
400 in Disk
Clúster database size 320 GB

Some queries have times too differents, the same query sometimes it execute
in 8 10 seconds sometimes  in 12 15 minutes, many querys make joins between
40, 50 millions rows. I know some factors like  relation between entities
affect times, but in general I suspect the mainly problem si resources in
OS.

I suspect is a lack to memory ram but we need justify the change in OS RAM,
so, How to calculate how too much memory ram need a PostgreSQL Server? Too
need know how because the database size continue grows.

Best Regards
DrakoRod



-----
Dame un poco de fe, eso me bastará.
Wolfgres - Postgres Enterprise 
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How to calculate how too much memory ram need a PostgreSQL Server?
  2021-04-05 18:21 How to calculate how too much memory ram need a PostgreSQL Server? DrakoRod <drakoflames@hotmail.com>
@ 2021-04-05 18:23 ` Gopi Setty <gsp06268@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Gopi Setty @ 2021-04-05 18:23 UTC (permalink / raw)
  To: DrakoRod <drakoflames@hotmail.com>; +Cc: pgsql-admin

https://pgtune.leopard.in.ua/#/


On Mon, Apr 5, 2021 at 1:22 PM DrakoRod <drakoflames@hotmail.com> wrote:

>  Hi folks!!
>
> I support a PostgreSQL database it grew from 100 to 300 GB in couple
> months,
> I we need tuning all OS parameters (is a virtual enviroment). Currently the
> configuration is the follow:
>
> Virtual Machine
> Ubuntu 18.04
> 12 CPUS
> 8 GB in RAM
> 400 in Disk
> Clúster database size 320 GB
>
> Some queries have times too differents, the same query sometimes it execute
> in 8 10 seconds sometimes  in 12 15 minutes, many querys make joins between
> 40, 50 millions rows. I know some factors like  relation between entities
> affect times, but in general I suspect the mainly problem si resources in
> OS.
>
> I suspect is a lack to memory ram but we need justify the change in OS RAM,
> so, How to calculate how too much memory ram need a PostgreSQL Server? Too
> need know how because the database size continue grows.
>
> Best Regards
> DrakoRod
>
>
>
> -----
> Dame un poco de fe, eso me bastará.
> Wolfgres - Postgres Enterprise
> --
> Sent from:
> https://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How to calculate how too much memory ram need a PostgreSQL Server?
  2021-04-05 18:21 How to calculate how too much memory ram need a PostgreSQL Server? DrakoRod <drakoflames@hotmail.com>
@ 2021-04-05 18:27 ` Karl Denninger <karl@denninger.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Karl Denninger @ 2021-04-05 18:27 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 4/5/2021 14:21, DrakoRod wrote:
>   Hi folks!!
>
> I support a PostgreSQL database it grew from 100 to 300 GB in couple months,
> I we need tuning all OS parameters (is a virtual enviroment). Currently 
the
> configuration is the follow:
>
> Virtual Machine
> Ubuntu 18.04
> 12 CPUS
> 8 GB in RAM
> 400 in Disk
> Clúster database size 320 GB
>
> Some queries have times too differents, the same query sometimes it execute
> in 8 10 seconds sometimes  in 12 15 minutes, many querys make joins between
> 40, 50 millions rows. I know some factors like  relation between entities
> affect times, but in general I suspect the mainly problem si resources in
> OS.
>
> I suspect is a lack to memory ram but we need justify the change in OS RAM,
> so, How to calculate how too much memory ram need a PostgreSQL Server? Too
> need know how because the database size continue grows.
>
> Best Regards
> DrakoRod

IMHO you need to profile the workload (e.g. "Explain analyze" on the 
queries in question), look at the indices in use and whether the planner 
can be helped with additional ones on the tables and then look at the 
size of said indices and how all of this fits into the RAM you have and 
what storage is behind it ( RAM -> SSD -> spinning rust.)

When the working set of the indices required for the queries in question 
(not so much the data itself) get outside of the available RAM space 
performance gets hit fast since any sort of storage is a lot slower, 
with spinning rust being excruciatingly slower since it has seek time 
penalties that SSDs do not.

-- 
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

Attachments:

  smime.p7s (application/pkcs7-signature, 4.8K) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-04-05 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 18:21 How to calculate how too much memory ram need a PostgreSQL Server? DrakoRod <drakoflames@hotmail.com>
2021-04-05 18:23 ` Gopi Setty <gsp06268@gmail.com>
2021-04-05 18:27 ` Karl Denninger <karl@denninger.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox