Re: insert performance - Mailing list pgsql-performance

From Jim Nasby
Subject Re: insert performance
Date
Msg-id 5692C7B0.3060002@BlueTreble.com
Whole thread Raw
In response to insert performance  (Jinhua Luo <luajit.io@gmail.com>)
Responses Re: insert performance  (Jinhua Luo <luajit.io@gmail.com>)
List pgsql-performance
On 1/9/16 11:57 PM, Jinhua Luo wrote:
> But I do not understand that why the process do so many IO with async
> commit? And it does not even happen at the shared buffer flushing and
> locks waiting. Where's the code path doing these IO?

I assume you're asking about all the IO to the heap table. That is most
likely occurring as part of ReadBuffer(). As soon as you fill up shared
buffers, BufferAlloc() is likely to end up with a dirty buffer,
resulting in it calling FlushBuffer() (see
src/backend/storage/buffer/bufmgr.c#1084).

Note that that call is tracked by
TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START(), so I'd expect you to see it
in the relevant systemtap stats.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


pgsql-performance by date:

Previous
From: Jinhua Luo
Date:
Subject: insert performance
Next
From: Jeff Janes
Date:
Subject: Re: insert performance