pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: Neto pr <netopr9@gmail.com>
Cc: Fabio Pardi <f.pardi@portavita.eu>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Why HDD performance is better than SSD in this case
Date: Wed, 18 Jul 2018 21:35:29 +1200
Message-ID: <0f90eb30-7a0e-1779-741d-db8221a69a79@catalyst.net.nz> (raw)
In-Reply-To: <CA+wPC0PzsKEV48D3ibFpaYUnjbKgeEBrN60W-O0Wh2WaT-ph1A@mail.gmail.com>
References: <CA+wPC0PsWacZpNX2OfRSSauUg9iNa7tReJU0oTLnM7K8PFFt6A@mail.gmail.com>
	<01bbbc88-2a47-f078-ea40-ab2c1acafa1f@portavita.eu>
	<CA+wPC0M=e5ZXd1NF1nz6mYfmPgys89vB4A74GmxnnK+KpA4_XA@mail.gmail.com>
	<d29dfb84-bb9a-d7c7-74eb-e263eae07901@catalyst.net.nz>
	<CA+wPC0PzsKEV48D3ibFpaYUnjbKgeEBrN60W-O0Wh2WaT-ph1A@mail.gmail.com>

Ok, so you are using 1 instance and tablespaces. Also I see you are 
restarting the instance between HDD and SSD tests, so all good there.

The point I made about having the OS on the SSD's means that if these 
tests make your system swap, and your swap device is on the SSDs (which 
is probably is by default), then swap activity will compete with db 
access activity for IOPS on your SSDs and spoil the results of your test 
(i.e slow down your SSDs).

You can check this using top, sar or iostat to see *if* you are swapping 
during the tests.

Ideally you would design your setup to use 3 separate devices:

- one device (or array) for os, swap, tmp etc

- one device (HDD array) for you 'HDD' tablespace

- one device (SDD array) for your 'SDD' tablespace

regards

Mark


On 18/07/18 13:13, Neto pr wrote:
>
> Dear  Mark
> To ensure that the test is honest and has the same configuration the
> O.S. and also DBMS, my O.S. is installed on the SSD and DBMS as well.
> I have an instance only of DBMS and two database.
> - a database called tpch40gnorhdd with tablespace on the HDD disk.
> - a database called tpch40gnorssd with tablespace on the SSD disk.
> See below:
>
> postgres=# \l
>                  List of databases
>       Name      |  Owner   | Encoding |   Collate   |    Ctype    |
> Access privileges
> ---------------+----------+----------+-------------+-------------+-----------------------
>   postgres      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
>   template0     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
> =c/postgres          +
>                 |          |          |             |             |
> postgres=CTc/postgres
>   template1     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
> =c/postgres          +
>                 |          |          |             |             |
> postgres=CTc/postgres
>   tpch40gnorhdd | user1    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
>   tpch40gnorssd | user1    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
> (5 rows)
>
> postgres=#
>
> After 7 query execution in a database tpch40gnorhdd I restart the DBMS
> (/etc/init.d/pg101norssd restart and drop cache of the O.S.) and go to
> execution test with the database tpch40gnorssd.
> You think in this case there is pollution of shared_buffers?
> Why do you think having O.S. on SSD is bad? Do you could explain better?
>
>





view thread (32+ messages)  latest in thread

Message-ID: <0f90eb30-7a0e-1779-741d-db8221a69a79@catalyst.net.nz>
Permalink:  ../0f90eb30-7a0e-1779-741d-db8221a69a79@catalyst.net.nz/
Also on:    postgresql.org/message-id/0f90eb30-7a0e-1779-741d-db8221a69a79@catalyst.net.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mark.kirkwood@catalyst.net.nz, netopr9@gmail.com, f.pardi@portavita.eu, pgsql-performance@lists.postgresql.org
  Subject: Re: Why HDD performance is better than SSD in this case
  In-Reply-To: <0f90eb30-7a0e-1779-741d-db8221a69a79@catalyst.net.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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