From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Nicolas PARIS <nicolas(dot)paris(at)riseup(dot)net> |
Cc: | pgsql-performance(at)lists(dot)postgresql(dot)org |
Subject: | Re: tablespace to benefit from ssd ? |
Date: | 2020-02-19 13:08:38 |
Message-ID: | 20200219130838.GI31889@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, Feb 19, 2020 at 05:42:41AM +0100, Nicolas PARIS wrote:
> Hi
>
> I have both hdd and ssd disk on the postgres server. The cluster is
> right now created on the hdd only. I am considering using a tablespace
> to put some highly used postgres object on the ssd disk. Of course the
> ssd is small compared to the hdd, and I need to choose carefully what
> objects are stored on that side.
>
> I am wondering what kind of object (indexes, data) would benefit from
> ssd. The database primary/foreign keys are highly used and there is
> almost no sequencial scan. However the server has a large amount of ram
> memory and I suspect all of those indexes are already cached in ram.
>
> I have read that tablespaces introduce overhead of maintenance and
> introduce complication for replication. But on the other hand I have
> this ssd disk ready for something.
To start with, you can:
ALTER SYSTEM SET temp_tablespaces='ssd';
That will improve speed of sorts which spill to disk (if any).
+1 to using LVM for purposes of instrumentation.
You can also:
ALTER TABLESPACE ssd SET (random_page_cost=1.0);
It'd be difficult to suggest anything further without knowing about your
workload or performance goals or issues.
--
Justin
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-02-19 15:23:53 | Re: SubtransControlLock and performance problems |
Previous Message | Lars Aksel Opsahl | 2020-02-19 10:49:14 | Re: SubtransControlLock and performance problems |