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: 200105281349.f4SDnCp01903@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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 | http://candle.pha.pa.us
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

Attachment Content-Type Size
unknown_filename text/plain 959 bytes

In response to

Browse pgsql-patches by date

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