Skip site navigation (1) Skip section navigation (2)

Re: libpq performance issue

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Brent Ewing <bge(at)nootka(dot)mbt(dot)washington(dot)edu>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: libpq performance issue
Date: 2001-05-28 13:49:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
> I submitted the appended bug report two days ago, and I resubmit it
> because I do not see it in the mailing lists yet, and I feel that
> the problem constitutes a significant performance issue.
> In short, I see 20.3 gigabytes of data memmove()'ed (needlessly in
> this case, which is almost irrelevant) by the pqReadData function
> in the libpq library while retrieving 13 megabytes from the backend.
> It appears to me that the memmove is moving data from and to the
> same memory locations ~1500 times incrementing the number of bytes
> moved by 8K each time.
> I tried skipping the memmove when the conn->inStart == 0
> and found that the output sequence is identical to when it is not
> skipped, as I expected.

So you suggesting the following patch, right?  Seems safe enough, and I
can imagine memmove not checking if src and dest are the same.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-05-28 14:15:23
Subject: Re: [HACKERS] Support for %TYPE in CREATE FUNCTION
Previous:From: Bruce MomjianDate: 2001-05-28 13:22:01
Subject: Re: RE: [JDBC] ANT fix for jar creation

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group