Unix Technical Forum

Re: External Sort timing debug statements

This is a discussion on Re: External Sort timing debug statements within the Pgsql Patches forums, part of the PostgreSQL category; --> On Sun, 2005-10-02 at 19:43 +0100, Simon Riggs wrote: > The following patch implements a fairly light set of ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:56 AM
Simon Riggs
 
Posts: n/a
Default Re: External Sort timing debug statements

On Sun, 2005-10-02 at 19:43 +0100, Simon Riggs wrote:
> The following patch implements a fairly light set of timing statements
> aimed at understanding external sort performance. There is no attempt to
> alter the algorithms.


Minor update of patch, use this version please.

> Best Regards, Simon Riggs



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:56 AM
Tom Lane
 
Posts: n/a
Default Re: External Sort timing debug statements

Simon Riggs <simon@2ndquadrant.com> writes:
>> The following patch implements a fairly light set of timing statements
>> aimed at understanding external sort performance. There is no attempt to
>> alter the algorithms.


> Minor update of patch, use this version please.


Applied with revisions: I made it use the VacRUsage code so that we
could see both CPU and elapsed time, and moved the report points around
a bit. The output with trace_sort enabled looks like this:

NOTICE: begin tuple sort: nkeys = 1, workMem = 1024, randomAccess = t
NOTICE: switching to external sort: CPU 0.05s/0.10u sec elapsed 0.15 sec
NOTICE: finished writing run 1: CPU 0.14s/0.83u sec elapsed 0.99 sec
NOTICE: finished writing run 2: CPU 0.25s/1.67u sec elapsed 1.94 sec
NOTICE: finished writing run 3: CPU 0.37s/2.51u sec elapsed 2.90 sec
NOTICE: finished writing run 4: CPU 0.48s/3.36u sec elapsed 3.86 sec
....
NOTICE: finished writing run 45: CPU 5.06s/38.26u sec elapsed 43.55 sec
NOTICE: performsort starting: CPU 5.10s/38.62u sec elapsed 43.95 sec
NOTICE: finished writing run 46: CPU 5.11s/38.84u sec elapsed 44.18 sec
NOTICE: finished writing final run 47: CPU 5.11s/38.88u sec elapsed 44.22 sec
NOTICE: finished merge step: CPU 5.12s/39.02u sec elapsed 44.37 sec
NOTICE: finished merge step: CPU 5.13s/39.16u sec elapsed 44.53 sec
....
NOTICE: finished merge step: CPU 6.57s/67.78u sec elapsed 74.83 sec
NOTICE: performsort done: CPU 6.57s/67.78u sec elapsed 74.84 sec
NOTICE: sort ended: CPU 10.80s/74.73u sec elapsed 86.21 sec

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 12:57 AM
Simon Riggs
 
Posts: n/a
Default Re: External Sort timing debug statements

On Mon, 2005-10-03 at 18:59 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> >> The following patch implements a fairly light set of timing statements
> >> aimed at understanding external sort performance. There is no attempt to
> >> alter the algorithms.

>
> > Minor update of patch, use this version please.

>
> Applied with revisions: I made it use the VacRUsage code so that we
> could see both CPU and elapsed time, and moved the report points around
> a bit. The output with trace_sort enabled looks like this:
>
> NOTICE: begin tuple sort: nkeys = 1, workMem = 1024, randomAccess = t
> NOTICE: switching to external sort: CPU 0.05s/0.10u sec elapsed 0.15 sec
> NOTICE: finished writing run 1: CPU 0.14s/0.83u sec elapsed 0.99 sec
> NOTICE: finished writing run 2: CPU 0.25s/1.67u sec elapsed 1.94 sec
> NOTICE: finished writing run 3: CPU 0.37s/2.51u sec elapsed 2.90 sec
> NOTICE: finished writing run 4: CPU 0.48s/3.36u sec elapsed 3.86 sec
> ...
> NOTICE: finished writing run 45: CPU 5.06s/38.26u sec elapsed 43.55 sec
> NOTICE: performsort starting: CPU 5.10s/38.62u sec elapsed 43.95 sec
> NOTICE: finished writing run 46: CPU 5.11s/38.84u sec elapsed 44.18 sec
> NOTICE: finished writing final run 47: CPU 5.11s/38.88u sec elapsed 44.22 sec
> NOTICE: finished merge step: CPU 5.12s/39.02u sec elapsed 44.37 sec
> NOTICE: finished merge step: CPU 5.13s/39.16u sec elapsed 44.53 sec
> ...
> NOTICE: finished merge step: CPU 6.57s/67.78u sec elapsed 74.83 sec
> NOTICE: performsort done: CPU 6.57s/67.78u sec elapsed 74.84 sec
> NOTICE: sort ended: CPU 10.80s/74.73u sec elapsed 86.21 sec


Many thanks,

Best Regards, Simon Riggs


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 12:57 AM
Greg Stark
 
Posts: n/a
Default Re: [HACKERS] External Sort timing debug statements

Tom Lane <tgl@sss.pgh.pa.us> writes:

> Applied with revisions: I made it use the VacRUsage code so that we
> could see both CPU and elapsed time, and moved the report points around
> a bit. The output with trace_sort enabled looks like this:
>
> NOTICE: begin tuple sort: nkeys = 1, workMem = 1024, randomAccess = t
> NOTICE: switching to external sort: CPU 0.05s/0.10u sec elapsed 0.15 sec
> NOTICE: finished writing run 1: CPU 0.14s/0.83u sec elapsed 0.99 sec
> NOTICE: finished writing run 2: CPU 0.25s/1.67u sec elapsed 1.94 sec
> NOTICE: finished writing run 3: CPU 0.37s/2.51u sec elapsed 2.90 sec
> NOTICE: finished writing run 4: CPU 0.48s/3.36u sec elapsed 3.86 sec


I'm not actually involved in this so maybe I'm completely off base here. But
wouldn't you want to know how many tuples are being sorted and how many data
are being written in these runs in order to be able to actually make sense of
these timing measurements?

Otherwise you would never know whether the results people will send you are
really comparable. And even if you're testing things in a well controlled
environments you'll never know if you missed something and you're comparing
two incomparable results.

--
greg


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 12:57 AM
Tom Lane
 
Posts: n/a
Default Re: [HACKERS] External Sort timing debug statements

Greg Stark <gsstark@mit.edu> writes:
> I'm not actually involved in this so maybe I'm completely off base here. But
> wouldn't you want to know how many tuples are being sorted and how many data
> are being written in these runs in order to be able to actually make sense of
> these timing measurements?


In all plausible test cases you should be able to know the total number
of tuples being sorted independently. Counting the tuples processed in
each run would require extra per-tuple overhead, which I'd rather avoid
until proven necessary.

The total-data-volume aspect may or may not be interesting, not sure
yet. Let's see what we can learn from the present low-impact patch.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com