Re: Regarding postgreSQL performance on DRAM - Mailing list pgsql-admin

From Jerry Sievers
Subject Re: Regarding postgreSQL performance on DRAM
Date
Msg-id 87va1exlfo.fsf@jsievers.enova.com
Whole thread Raw
In response to Regarding postgreSQL performance on DRAM  (Rohan Kadekodi <kadekodirohan@gmail.com>)
Responses Re: Regarding postgreSQL performance on DRAM  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-admin
Rohan Kadekodi <kadekodirohan@gmail.com> writes:

> Hello,
>
> I am a researcher in the Storage and Systems Lab at UT Austin. I am
> working on analyzing the performance of PostgreSQL on Persistent
> Memory. To be more specific, I am trying to analyze the performance
> of PostgreSQL-10.5 on a ramdisk device mounted with the ext4 file
> system.
>
> My workload is simple. I  insert 1 million rows into a table with 100
> columns, where each column is 256 bytes in length, and every 10
> inserts are batched into a transaction. 

Your test workload qualifies for TOASTing due to the $unrealistically
long physical tuple size.

Thusly, by default compression is also in-scope and the heavy CPU impact
showing up in your performance metrics.

Revising the test to substantially reduce or eliminate the burden of
toasting and especially compression should help in the I/O measurements.

HTH

>
> On running strace on all the PostgreSQL processes spawned by the
> server, I am observing that the total time taken in system calls is
> less than 5% of the total time it takes to do the 1 million inserts.
> I changed the configuration file to make PostgreSQL as synchronous as
> possible, and even then the time spent in system calls is very low. 
>
> When I run the perf tool to check where the majority time is being
> spent, I see that there is a function called pglz_compress() where a
> lot of time is getting spent and also there is a function called
> heap_compute_data_size() where there is significant time spent. 
>
> Could I know why so much time is being spent in user space, and how I
> can make PostgreSQL more I/O bound than it is now?
>
> Thanks!
> - Rohan
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net


pgsql-admin by date:

Previous
From: Rohan Kadekodi
Date:
Subject: Regarding postgreSQL performance on DRAM
Next
From: Thomas Kellerer
Date:
Subject: Re: Regarding postgreSQL performance on DRAM