Profile of current backend - Mailing list pgsql-hackers

From Mattias Kregert
Subject Profile of current backend
Date
Msg-id 34DA19A1.14BD647E@algonet.se
Whole thread Raw
In response to RE: [HACKERS] Hi  ("Meskes, Michael" <meskes@topsystem.de>)
Responses Re: [HACKERS] Profile of current backend  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Meskes, Michael wrote:
>
> I take it some of you have already run the backend against a profiler.
> Could anyone please tell me which functions need works most?

SYSTEM: Linux 2.0.29, gcc 2.7.2
-------------------------------
[make distclean]
[CVSup'ed current source 1998-02-05]
[./configure]
[make]
  [CUSTOM_LDFLAGS not settable in Makefile.custom ...]
  [... setting LDFLAGS=-pg ins Makefile.global]

  --> fmgr.c: In function `fmgr_pl':
  --> fmgr.c:46: `fmgr_pl_finfo' undeclared (first use this function)
  [fix] cp backend/utils/fmgr.h backend/utils/fmgr/fmgr.h

[make install]
[Run initdb]
[Regression tests]
  strings .. failed [ok]
  lseg .. failed [new operator <= on lseg]
  horology .. failed [daylight savings error?]
  triggers .. failed
  select_views .. failed


PROFILE OF REGRESSION TEST:
---------------------------
 time   seconds   seconds    calls  ms/call  ms/call  name
 35.16      7.97     7.97                             mcount (profiler overhead)
  5.91      9.31     1.34     9924     0.14     0.20  heapgettup
  4.54     10.34     1.03   234597     0.00     0.01  hash_search
  2.12     10.82     0.48   151781     0.00     0.00  SpinAcquire
  2.03     11.28     0.46    46635     0.01     0.02  SearchSysCache
  1.63     11.65     0.37   171345     0.00     0.00  tag_hash
  1.46     11.98     0.33    20511     0.02     0.02  yylex
  1.41     12.30     0.32    31311     0.01     0.03  LockAcquire
  1.28     12.59     0.29     1522     0.19     0.61  yyparse
  1.24     12.87     0.28    41176     0.01     0.01  fmgr_isbuiltin
  1.01     13.10     0.23   201572     0.00     0.00  AllocSetAlloc
  0.84     13.29     0.19   186214     0.00     0.00  OrderedElemPop
  0.75     13.46     0.17    42896     0.00     0.00  nocachegetattr
  0.71     13.62     0.16    29869     0.01     0.04  LockRelease
  0.66     13.77     0.15   151781     0.00     0.00  SpinRelease
  0.66     13.92     0.15    88766     0.00     0.01  newNode
  0.66     14.07     0.15    52248     0.00     0.00  _bt_compare
... around 1850 functions follows (0.66 - 0.0%)

heapgettup (called by, calling):
--------------------------------
index % time    self  children    called     name
                0.01    0.01      96/9924        heap_markpos [448]
                0.21    0.11    1566/9924        heap_restrpos [102]
                1.12    0.58    8262/9924        heap_getnext [20]
[14]    13.8    1.34    0.69    9924         heapgettup [14]
                0.04    0.14    9924/9924        RelationGetBufferWithBuffer [148]
                0.03    0.15    5642/5702        ReleaseAndReadBuffer [145]
                0.10    0.00   26276/42896       nocachegetattr [158]
                0.01    0.08    7111/9607        HeapTupleSatisfiesVisibility [185]
                0.04    0.00  117785/126582      char16eq [339]
                0.02    0.00  111941/111994      int4eq [427]
                0.02    0.00  109647/112329      nameeq [426]
                0.00    0.01    1770/31585       ReleaseBuffer [134]
                0.01    0.00   14000/50173       PageGetMaxOffsetNumber [341]
                0.01    0.00    5185/5433        chareq [537]
                0.01    0.00   15566/90147       BufferGetBlock [311]
                0.01    0.00   17336/240911      BufferIsValid [207]
                0.00    0.00       4/1973        int2eq [575]
                0.00    0.00    7412/7412        nextpage [1186]
                0.00    0.00     951/1358        SetBufferCommitInfoNeedsSave [1253]
--------------------------------

The *complete* gprof output is here:
  ftp://postgresql.org/pub/incoming/regression-profile-980205.gz 156k

/* m */

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] atttypmod problem
Next
From: rw12922@WCUVAX1.WCU.EDU
Date:
Subject: unsubscribe