Re: insert/update tps slow with indices on table > 1M rows

From: Matthew Wakeling
Subject: Re: insert/update tps slow with indices on table > 1M rows
Date: ,
Msg-id: Pine.LNX.4.64.0806041607120.3987@aragorn.flymine.org
(view: Whole thread, Raw)
In response to: Re: insert/update tps slow with indices on table > 1M rows  (andrew klassen)
List: pgsql-performance

Tree view

insert/update tps slow with indices on table > 1M rows  (andrew klassen, )
 Re: insert/update tps slow with indices on table > 1M rows  (PFC, )
 Re: insert/update tps slow with indices on table > 1M rows  (andrew klassen, )
 Re: insert/update tps slow with indices on table > 1M rows  ("Scott Marlowe", )
 Re: insert/update tps slow with indices on table > 1M rows  (Matthew Wakeling, )
  Re: insert/update tps slow with indices on table > 1M rows  (James Mansion, )
 Re: insert/update tps slow with indices on table > 1M rows  (andrew klassen, )
  Re: insert/update tps slow with indices on table > 1M rows  (Matthew Wakeling, )
 Re: insert/update tps slow with indices on table > 1M rows  (andrew klassen, )
  Re: insert/update tps slow with indices on table > 1M rows  (James Mansion, )
 Re: insert/update tps slow with indices on table > 1M rows  (andrew klassen, )
  Re: insert/update tps slow with indices on table > 1M rows  (PFC, )
  Re: insert/update tps slow with indices on table > 1M rows  (Tom Lane, )
  Re: insert/update tps slow with indices on table > 1M rows  ("Heikki Linnakangas", )

On Wed, 4 Jun 2008, andrew klassen wrote:
> I am using multiple threads, but only one worker thread for insert/updated to this table.
> I don't mind trying to add multiple threads for this table, but my guess is it would not
> help because basically the overall tps rate is decreasing so dramatically. Since
> the cpu time consumed by the corresponding postgres server process for my thread is
> small it does not seem to be the bottleneck. There has to be a bottleneck somewhere else.
> Do you agree or is there some flaw in my reasoning?

There is indeed a flaw in your reasoning - there may be very little CPU
time consumed, but that just indicates that the discs are busy. Getting
Postgres to do multiple things at once will cause a more efficient use of
the disc subsystem, resulting in greater overall throughput. This is
especially the case if you have multiple discs in your box.

Matthew

--
Contrary to popular belief, Unix is user friendly. It just happens to be
very selective about who its friends are.                 -- Kyle Hearn


pgsql-performance by date:

From: James Mansion
Date:
Subject: Re: insert/update tps slow with indices on table > 1M rows
From: andrew klassen
Date:
Subject: Re: insert/update tps slow with indices on table > 1M rows